Skip to main content

BulkGate SMS Worker

Send transactional and promotional SMS messages through the BulkGate service.

Installation

import '@unchainedshop/plugins/worker/bulkgate';

Environment Variables

VariableDescription
BULKGATE_APPLICATION_IDYour BulkGate application ID
BULKGATE_APPLICATION_TOKENYour 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

ParameterTypeDefaultDescription
toString-Phone number(s) in international format
textString-SMS message content
fromString-Sender name (uses gText sender type)
unicodeBooleanfalseEnable unicode character support
countryString-Country code for number validation
scheduleString/Number-ISO 8601 date or Unix timestamp for scheduled delivery
promotionalBooleanfalseUse promotional API (allows multiple recipients)

Sender Types

  • Without from: Uses gSystem (system number)
  • With from: Uses gText (custom alphanumeric sender, max 11 chars)

Result

{
"sms_id": "123456789",
"price": 0.05,
"credit": 99.95,
"number": "+1234567890",
"status": "accepted"
}

Adapter Details

PropertyValue
Keyshop.unchained.worker-plugin.bulkgate
TypeBULKGATE
Sourceworker/bulkgate.ts

External Resources