# Send SMS through BulkSMS

BulkSMS is the SMS provider PiGi sends text messages through — booking notifications by SMS, and the SMS that goes out when a WhatsApp message can't be delivered. You need a BulkSMS.com account with credits and an API token (Token ID and Token Secret).

Source: https://help.pigi.io/guides/integrations/communication/bulksms

## Quick answers

**Which SMS provider does PiGi use?**
BulkSMS (bulksms.com). Connect it under Company → Settings → Integrations → **BulkSMS**.
It is the provider that actually sends PiGi's text messages.

**Where do I find my BulkSMS Token ID and Token Secret?**
Log in to bulksms.com, then **Settings → Advanced → API Tokens → Create Token**. Give the
token a name, create it, and copy both the Token ID and the Token Secret into PiGi. Copy
the secret straight away and keep it somewhere safe.

**Do I need to buy BulkSMS credits?**
Yes. BulkSMS charges credits per message part, and the number of credits per message
depends on the country and network. PiGi does not sell or include SMS credits. See
BulkSMS's pricing page for current rates.

**Can my SMS show my school's name as the sender?**
Not to South African numbers. BulkSMS states that sender ID is not available in South
Africa because of mobile network policy, so messages arrive from a number. PiGi does not
set a sender ID for any country.

**Why does my SMS count as two or three messages?**
A plain SMS holds 160 characters (153 per part once it is split). One emoji, curly quote
or long dash switches the whole message to Unicode, which holds only 70 characters (67
per part). Keep SMS templates short and use plain letters, straight quotes and ordinary
hyphens.

**Will PiGi text overseas customers?**
Only if you allow it. **Countries to text** in the BulkSMS **Settings** dialog lists the
dial codes PiGi may text. Empty means South Africa (27) only; `*` means every country.
Customers in other countries get the email version instead.

**Does PiGi send an SMS when WhatsApp fails?**
Yes, when you have an SMS method set up. If a WhatsApp notification can't be delivered,
or the number is known not to be on WhatsApp, PiGi sends the event's SMS wording instead.
If you haven't written an SMS template for that event, PiGi sends a plain-text version of
the WhatsApp message.

**How do I see my BulkSMS balance from PiGi?**
Open the BulkSMS sheet on Company → Settings → Integrations and choose **Test
connection**. A successful test shows "Token valid" and the account's **Credits**.

## What this does

Connecting BulkSMS lets PiGi send text messages for your school: notifications you have
written an SMS template for (booking confirmations, reminders and so on), and automatic
SMS cover when a WhatsApp message can't be delivered. Messages are charged to your own
BulkSMS account in credits. BulkSMS says you pay for failed messages too, and costs vary
by destination country — see the BulkSMS pricing page.

## Before you start

- The **admin** role in PiGi.
- A BulkSMS.com account with credits loaded. BulkSMS accepts card, EFT and, for South
  African customers, PayGate.
- Your SMS wording ready — short, and in plain characters.

## Set up BulkSMS

1. Sign up or log in at bulksms.com.
2. Buy a credit bundle so the account can send.
3. Go to **Settings → Advanced → API Tokens**.
4. Click **Create Token**, give it a name such as "PiGi", and click **create**.
5. Copy the **Token ID** and the **Token Secret**. Store the secret safely; you need both
   in PiGi.

## Connect it to PiGi

1. Open **Company → Settings → Integrations** and click the **BulkSMS** tile (it sits
   under **Communication**; search "Search integrations…" if needed).
2. Click **Connect BulkSMS**. The sheet now reads "Installed — credentials needed".
3. Choose **Add credentials**, enter **Token ID** and **Token Secret**, and click **Save**.
4. Choose **Settings** if you need to change **Countries to text** (comma-separated dial
   codes, for example `27,264`, or `*` for everywhere). Click **Save**.
5. Open **Company → Settings → Notifications** and scroll to **Methods**. On the **SMS**
   card click **Set up**, pick **BulkSMS** in "Choose a provider…", and make sure the
   card's switch is on.
6. Add SMS templates: in the event list on the same page, click **Add** in the SMS column
   for each event you want texted, write the message and switch it live. The editor
   shows "… chars · … SMS" so you can see the part count before saving.

## Test it

1. On the BulkSMS sheet choose **Test connection**. "Connection works" with "Token valid"
   and your **Credits** means the token is accepted.
2. On Company → Settings → Notifications, use the **Send a test** button on one of your
   SMS templates and enter your own mobile number. Check the phone and your BulkSMS
   account's message history.

## Troubleshooting

| What you see | What to do |
|---|---|
| "No token_id / token_secret saved on this integration." | Choose **Add credentials** and save both values. |
| **Connection failed** with an authentication message | The Token ID or Secret is wrong or was deleted on BulkSMS. Create a new token and save both values again. |
| "Connected — credentials rejected" on the sheet | The last check failed. Fix the token, then run **Test connection** again to clear it. |
| A notification shows "international number: SMS not sent (email only)" | The number's country isn't in **Countries to text**. Add its dial code if you want to text it. |
| "BulkSMS credentials not configured for this company" | The integration is missing or empty. Connect it and add credentials. |
| "invalid recipient" | The phone number on the booking or profile can't be read. Correct it, including the country code. |
| Messages cost more than expected | Check the template for emoji, curly quotes or long dashes, and for messages over 160 characters. |

## Known limitations

- **Test mode does not hold back SMS.** Switching on **Test mode** in the BulkSMS
  **Settings** dialog does not redirect messages; real customers are still texted.
- **No custom sender name** to South African numbers, and PiGi does not set one
  elsewhere either.
- **No delivery reports in PiGi.** A sent SMS means BulkSMS accepted it; check BulkSMS's
  own reports for delivery.
- **One SMS provider.** PiGi sends SMS through BulkSMS only. A Twilio connection made
  before Twilio was retired can still show on the **SMS** card, but it sends nothing.

## Sources

- [BulkSMS: How do I generate my API Token and Secret](https://www.bulksms.com/resources/insights/generating-your-api-token-and-secret.htm)
- [BulkSMS: Frequently asked questions](https://www.bulksms.com/support/frequently-asked-questions.htm)
- [BulkSMS: Pricing](https://www.bulksms.com/pricing/)
