ModulesSMS

AlloConnect Allo for texts and call tasks

How to connect Allo to OpenSequence: the API key and its permissions, each sender's number, allowed countries, consent, quiet hours, STOP and call tasks.

Edit on GitHub

The Allo module sends texts from each rep's Allo number and closes call tasks when the rep calls. Set one key per project, then one number per sender.

What it gives you

  • Texts from the sender's own number, with replies read back.
  • A reply made only of STOP (or QUIT, END, CANCEL, UNSUBSCRIBE, OPT OUT, STOPALL) suppresses SMS for the contact and exits their enrollments.
  • Call tasks that complete themselves when the rep calls the contact from Allo.
  • Optional: call tasks pushed into the rep's Allo power dialer.

What you need

  • An Allo workspace API key with these permissions: SMS_SEND, WEBHOOKS_READ_WRITE, PHONE_NUMBERS_READ, USERS_READ, CONVERSATIONS_READ and DIALING_QUEUE_READ_WRITE.
  • SEQ_PUBLIC_URL set to an HTTPS address Allo can reach.
  • An OpenSequence admin key.

Steps

Save the Allo key

curl
curl -X PUT $SEQ/v1/project/providers/allo -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
  -d '{"api_key":"allo_…"}'

OpenSequence registers its own webhook at Allo for inbound texts, sent texts and finished calls, at SEQ_PUBLIC_URL/hooks/allo/{project slug}. It keeps the signing secret. There is nothing to set up in Allo. Then it checks the key's permissions and stores the key encrypted.

Give each sender a number

curl
curl $SEQ/v1/project/providers/allo/users -H "Authorization: Bearer $ADMIN_KEY"     # [{ id: "usr-…", email, name }]
curl $SEQ/v1/project/providers/allo/numbers -H "Authorization: Bearer $ADMIN_KEY"   # [{ address, capabilities, users }]
curl -X PUT $SEQ/v1/senders/u_42/channels/sms -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
  -d '{"allo_user_id":"usr-…","number":"+14155551234"}'

allo_user_id is Allo's usr-… id, not an email. Set it for senders who only call, too: call tasks are matched by this number.

Choose the countries texts may go to

curl
curl -X PUT $SEQ/v1/project/settings -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
  -d '{"sms_countries":["US","CA"]}'

The default is ["US"]. A contact's country (ISO-2) must be in the list.

Record consent per contact

curl
curl -X PUT $SEQ/v1/contacts/p_7/outreach-consent -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
  -d '{"consent":true,"source":"signup form"}'

Only an admin key can record consent. The same consent gates agent calls.

Rules every text follows

These checks are fixed. A text is skipped when one fails, except quiet hours, which wait.

CheckSkip reason
The contact has outreach consentno_consent
The contact has a phone numberno_phone
The contact's country is in sms_countriescountry_not_allowed
The contact's time zone is known, from timezone, the phone number or a one-zone countryno_timezone
No SMS suppressionsuppressed
Quiet hours: only 08:00 to 21:00 in the contact's zone, every daywaits until 08:00

The default limit is 100 texts a day per sender. Nothing is appended to the body, so write "Reply STOP to opt out" yourself.

Call tasks

A task step with kind: "call" gives the rep a call to make. When Allo reports a finished outbound call from the sender's number to the contact, the open call task completes by itself:

Allo resultOutcome
ANSWERED, TRANSFERRED_AI, TRANSFERRED_EXTERNALconnected
VOICEMAILvoicemail
anything elseno_answer

Allo's call summary becomes the task note. Change the mapping with PUT /v1/project/settings and { "allo": { "outcome_map": { "VOICEMAIL": "no_answer" } } }. With dialer: true on the step, the contact's number goes into the rep's Allo power dialer within a minute.

Your app can also complete a task: POST /v1/tasks/{id}/complete with an outcome (oseq.tasks.complete()).

Check it works

  1. GET /v1/project shows webhook_urls.allo and the Allo credential.
  2. GET /v1/senders/u_42/readiness returns "sms": { "ok": true }.
  3. Enroll a consenting test contact with your own phone in a one-text sequence, between 08:00 and 21:00 their time. Reply to the text: the enrollment exits with replied when exit_on lists reply.

Common errors

ErrorFix
422 INVALID_CREDENTIALThe key is wrong or lacks a permission. details.missing lists the missing ones.
401 or 403 with an Allo error codeAllo refused the webhook registration. The key needs WEBHOOKS_READ_WRITE.
422 UNKNOWN_NUMBERThe key cannot see that number. Pick one from GET /v1/project/providers/allo/numbers.
422 NUMBER_HAS_NO_SMSThe number cannot send texts. Pick one with SMS in capabilities.
Texts skip with no_consent or country_not_allowedRecord consent, set the contact's country, or add it to sms_countries.
No replies arriveSEQ_PUBLIC_URL was not reachable when you saved the key. Fix it and save the key again.

Each save registers a new webhook at Allo. Delete old OpenSequence webhooks in Allo's settings after a rotation.

A text whose result is unknown is never retried blindly: the run becomes needs_review, because a double text is worse than a late one.

On this page