docs
/
AI skills

SMS broadcast to a group

A text message to one customer group, saved as a draft from one of the business's own numbers — who can be texted, who said STOP, how many segments the text is and what one send costs. A person sends it.

An SMS broadcast is the same email_broadcast record as an email campaign, with channel set to sms. It goes to real phones as soon as it is sent, and every text costs money. There is no test send. So this skill only ever produces a draft, and a person presses Send Now.

The platform does not record or check whether people agreed to get texts. Nothing in a contact says "may text", and a broadcast texts everyone on the list who has a number. Ask the person, every time, before you draft.

For an email to a group, use Email campaign draft to a customer group. To pick people by a filter instead of a group, see Broadcast audience from a filter.

Ask first

  • Which group? The customer group by name. If they describe people ("everyone in Dallas"), build the audience first with Broadcast audience from a filter.
  • Have these people agreed to get texts from you? If the answer is not a clear yes, stop. Texting people who did not agree breaks carrier rules and, in many places, the law.
  • The words. What the text says, or what it should say if the AI writes it.
  • From which number? One of the business's numbers that can send texts.
  • Not at night? Only if they want sends held outside certain hours (step 5).

Steps

1. Customers & Benefits: the group, counted by phone

Find the customer group (customer_group) by name. A broadcast addresses it by its sk. Static or smart (dynamic), the broadcast reaches whoever the group holds at the moment it sends.

Count who a text reaches with call_appengine POST /broadcast/audience/count and { "lists": ["<group sk>"], "channel": "sms" }. Then ask who is left out, and why: POST /broadcast/audience/people with { "lists": ["<group sk>"], "channel": "sms", "show": "out" }.

How a send picks each person's number:

RuleWhat it means
The numberthe contact's phone, else phoneNumber, else the primary (or first) entry in phones
No country codea number saved without + is read as a US/Canada number (+1). A number from another country must be saved with its + code.
One text per numbertwo contacts with the same number get one text, addressed by the first one's name. The other is left out as Same number as someone already on the list.
STOPa number that texted STOP to the business is left out as Asked not to be texted or called (STOP) (see step 3)
Email opt-outsan email unsubscribe does not stop texts

Hands on: the group's sk, the count, and the left-out list. Check: open the group (/customers-benefits?view=groups&groupId=<sk>). Tell the person how many have no number.

2. Phone & SMS: the sending number

Find the business's numbers (phone) with data.status = active and data.capabilities.sms = true. These are the numbers the composer offers for SMS.

Look at the chosen number's smsRegistration:

  • status = registered, or requiresRegistration = false, or no smsRegistration at all: it can text.
  • anything else (pending, unregistered, rejected, suspended): stop and say so. A US number that has not cleared A2P 10DLC (local) or toll-free registration is accepted by the carrier and then quietly dropped. The broadcast does not check this before sending.

Hands on: the number itself, in + form (e.g. +12145550142). The broadcast stores the number, not the phone record's sk. Check: the number is listed under Broadcast › Channels › Phone & SMS (/broadcast?tab=channels&channel=sms). If the business has no number that can text, stop: adding or buying one costs money and is the person's decision.

3. IVR & Phone System: STOP replies

A STOP reply is only recorded when the number has an SMS routing (sms_routing) with opt-out on. Find the one where data.phoneNumbers holds the number and data.enabled = true, and read data.optOut.enabled.

  • On: a reply of STOP, UNSUBSCRIBE, CANCEL, END or QUIT (the default words; the routing can list others) is remembered for that number, and every later SMS, WhatsApp or voice broadcast leaves it out.
  • No routing, or opt-out off: a STOP reply is not recorded by the platform, so later broadcasts keep texting that person. Tell the person. A new routing has opt-out on by default, in IVR & Phone System → SMS routing (/ivr?tab=sms). Setting one up changes how the number answers incoming texts, so it is their decision. Don't create it yourself.

A STOP is remembered for one year. After that, the number can be texted again.

Hands on: whether STOP replies are recorded for this number. Check: the routing shows the Opt-Out badge in the SMS routing list.

4. The message: plain text, with its opt-out line

Write the text as plain text. No HTML.

  • Start with the business's name, so the reader knows who it is from.
  • End with an opt-out line, e.g. Reply STOP to opt out. The platform does not add one to texts (it only adds an unsubscribe link to emails).
  • Personal fields work as in email: {{firstName}}, {{lastName}}, {{name}}, {{phone}}, and any {{data.<namespace>.<field>}} the composer's variables panel inserts. A contact with no first name gets their whole name in {{firstName}}, or nothing if the record has no name, so write the greeting to read well either way.

Count the segments, because carriers bill per segment, not per text:

The text holdsOne segment up toEach segment after that
only plain letters, digits and common punctuation (GSM-7)160 characters153 characters
any emoji, curly quote or most non-Latin letters70 characters67 characters

^ { } \ [ ] ~ | € count as two characters each. A personal field makes the text longer for some people, so count with a long name.

What one send costs: segments × people. On the platform's shared phone account, the business's wallet is charged per segment at the Twilio SMS price in its service pricing (by default $0.0083 plus a 100% markup, about $0.017 a segment in the US). On the business's own Twilio account, Twilio bills it directly.

Hands on: the text, its segment count, and the cost estimate.

5. Broadcast: the draft

Create an email_broadcast record with create_record, the same write as the composer's Save Draft:

FieldValue
namethe campaign's name
channelsms
contentthe text, plain
senderAccounts["<the number, + form>"]
recipientMethodlists
selectedLists["<group sk>"]
statusdraft

Only if they asked for no texts at night, also set respectQuietHours: true, quietHoursStart and quietHoursEnd (hours 0–23, e.g. 21 and 8) and timezone (e.g. America/Chicago). A send that starts inside those hours waits until they end. The hours are checked when the send starts, not while it runs.

Never set status to pending or scheduled, never add a schedule, and never create a schedule record for it: a schedule sends it when due, even while it says draft. A sweep every five minutes sends anything pending. Never use the lists all-contacts or all-leads. Never call POST /broadcast/<id>/send.

Hands on: the broadcast's sk. Check: read it back. status is draft, type is sms (the server fills type and broadcastName), and selectedLists holds the group. POST /broadcast/audience/total with { "lists": ["<group sk>"], "channel": "sms" } gives the same count as step 1. Open it (/broadcast?openId=<sk>).

The composer's Message tab edits a text with the same rich-text editor as an email. Once the text is edited or clicked into there, it is saved wrapped in HTML (<p>…</p>), and the SMS send does not strip it, so people receive the tags. If the person changes the wording in the composer, read content back and save it as plain text again before anything is sent.

Stop

Sending costs money and reaches real phones. It is the person's decision. Show:

  • the text exactly as it will go, and its segment count;
  • the sending number, and whether STOP replies are recorded for it;
  • the group, how many numbers it reaches, and who is left out and why;
  • the cost of one send;
  • that they confirmed these people agreed to get texts.

To send, they press Settings & Send → Send Now in the composer. To send later, they add a time under Settings & Send → Schedule → Add schedule. If they say "send it" in chat, repeat the count, the number and the cost, and send only after a clear yes.

If the business has no phone service, each text fails with Phone service is not set up for this organisation. The report then shows every person as failed.

When it's done

Tell the person:

  • the draft's name and the text;
  • the number it comes from, and whether STOP replies are recorded;
  • the group, its count by phone, and how many were left out (no number, shared number, STOP);
  • the segment count and the cost of one send.

Then say that nothing has been sent and that it is waiting in Broadcast under draft.

What it can't do yet

  • No consent record. Nothing stores or checks that a person agreed to texts. The person answers for it.
  • No automatic opt-out line. The text goes exactly as written.
  • No registration check. A broadcast texts from an unregistered number without warning, and the carrier may drop every message.
  • STOP needs an SMS routing. Without one with opt-out on, replies are not recorded, and a recorded STOP lapses after a year.
  • No opens or clicks for texts. The report shows sent, delivered and failed, from the carrier's status updates. See Broadcast report.
  • Non-US numbers without + are read as US/Canada numbers and go to the wrong place, or fail.

Don'ts

  • Don't draft a text for people the person hasn't said agreed to it.
  • Don't put HTML, an email signature or long links in a text. Every character counts toward the cost.
  • Don't add numbers by typing them into the broadcast (manualEmails) when the person named a group. The group is what the count and later sends reuse.
  • Don't state offers, codes, dates or prices the person didn't give you. Leave a clearly marked gap (e.g. [the code]), and say the gap must be filled before sending.