wigal-sms@0.1.2
This adaptor exports the following from common:
- cursor()
- dataPath()
- dataValue()
- dateFns
- each()
- field()
- fields()
- fn()
- fnIf()
- lastReferenceValue()
- merge()
- sourceValue()
Functions
sendSms
sendSms(data) ⇒ Operation
Send SMS using Wigal SMS Gateway API
Param | Type | Description |
---|---|---|
data | SMSRequestObject | SMS payload to push to Wigal. This includes the message, phone number, etc |
This operation writes the following keys to state:
State Key | Description |
---|---|
data | the parsed response body. containt status and message response |
response | the response from the Wigal SMS server, including headers, statusCode etc |
references | an array of all previous data objects used in the Job |
Example: Send General SMS message
sendSMS({
senderid: "Stevkky",
destinations: [{ destination: "0552825710" }],
message: "This is a sample message for SMS sending via Wigal FROG API.",
smstype: "text",
});
Example: Send Personalized SMS message
sendSMS({
senderid: "Stevkky",
destinations: [
{
destination: "0542709440",
message: "Hello Joe your order is ready",
msgid: "MGS1010101",
smstype: "text",
},
],
});
Interfaces
SendSMSState
State object
Properties
Name | Description |
---|---|
data | the parsed response body. containt status and message response |
response | the response from the Wigal SMS server, including headers, statusCode etc |
references | an array of all previous data objects used in the Job |
SMSRequestObject
SMS Request Object
Properties
Name | Type | Description |
---|---|---|
senderid | string | The senderID used for sending message. Approved SenderIDs only |
destinations | array | An array of objects containing the destination phone number and message to be sent |
message | string | The message to be sent to the destinations |
smstype | string | The type of message to be sent. Default is 'text' |