BulkGate SMS Worker
Send transactional and promotional SMS messages through the BulkGate service.
Installation
import '@unchainedshop/plugins/worker/bulkgate';
Environment Variables
| Variable | Description |
|---|---|
BULKGATE_APPLICATION_ID | Your BulkGate application ID |
BULKGATE_APPLICATION_TOKEN | Your BulkGate application token |
Usage
Transactional SMS
mutation SendTransactionalSMS {
addWork(
type: BULKGATE
input: {
to: "+1234567890"
text: "Your order #123 has shipped!"
from: "YourCompany"
}
) {
_id
status
}
}
Promotional SMS
mutation SendPromotionalSMS {
addWork(
type: BULKGATE
input: {
to: "+1234567890;+0987654321"
text: "Special offer: 20% off!"
promotional: true
}
) {
_id
status
}
}
Note: Use semicolon-separated numbers for multiple recipients with promotional: true.
Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
to | String | - | Phone number(s) in international format |
text | String | - | SMS message content |
from | String | - | Sender name (uses gText sender type) |
unicode | Boolean | false | Enable unicode character support |
country | String | - | Country code for number validation |
schedule | String/Number | - | ISO 8601 date or Unix timestamp for scheduled delivery |
promotional | Boolean | false | Use promotional API (allows multiple recipients) |
Sender Types
- Without
from: UsesgSystem(system number) - With
from: UsesgText(custom alphanumeric sender, max 11 chars)
Result
{
"sms_id": "123456789",
"price": 0.05,
"credit": 99.95,
"number": "+1234567890",
"status": "accepted"
}
Adapter Details
| Property | Value |
|---|---|
| Key | shop.unchained.worker-plugin.bulkgate |
| Type | BULKGATE |
| Source | worker/bulkgate.ts |