XCALLY as a Messaging Gateway
In certain scenarios, such as working with specific CRMs/ERPs, it is desired to send a SMS or MMS to a contact with the click of a programmable button or even run campaigns in those platforms but have XCALLY to send the actual message. In other words, the idea is to use XCALLY as a messaging gateway. This article walks through the requirements and steps involved to achieve such task.
Requirements
In order to allow XCALLY to act as a Messaging Gateway the following requirements need to be met:
- A XCALLY OmniGold or XCALLY Ultimate Edition
- An OpenChannel SMS/MMS integration
- An enabled SMS/MMS phone number
- An A2P TCPA campaign registration
- A specific URL POST endpoint
For details on these requirements or if you are missing one of these items please contact us at support@linkedip.com.
Steps to send out a SMS with XCALLY as a Messaging Gateway
Before sending out a message please make sure you have data for the following parameters as they are mandatory:
- URL endpoint: the URL that was assigned for your gateway.
- SenderID: The number which you are sending the text from.
- Destination Number: The number that is intended to receive a text message.
- Body: The actual message. Consider that for SMS there is a limit of 160 characters per segment.
CURL POST EXAMPLE
Here is an example using curl how you should send a message to XCALLY:
curl -X POST https://my.xcallymessaginggatewayurl.com/smscampaign.php \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "BODY='Hello, this is a test.'" \
-d "XMDPHONE=1234567890"
This command will result in sending message Hello, this is a test. to number 1234567890 using your gateway at https://my.xcallymessaginggatewayurl.com/smscampaign.php.
Instead curl you may use your favorite POST tool or preferred webhook service to establish a connecting with the gateway.
SALESFORCE APEX POST EXAMPLE
HttpRequest req = new HttpRequest();
req.setEndpoint('https://my.xcallymessaginggatewayurl.com/smscampaign.php');
req.setMethod('POST');
req.setHeader('Content-Type', 'application/x-www-form-urlencoded');
req.setBody('BODY=Hello, this is a test.&XMDPHONE=1234567890');
Http http = new Http();
HttpResponse res = http.send(req);
if (res.getStatusCode() == 200) {
System.debug('Response: ' + res.getBody());
} else {
System.debug('Failed with status code: ' + res.getStatusCode());
}
This command will result in sending message Hello, this is a test. to number 1234567890 using your gateway at https://my.xcallymessaginggatewayurl.com/smscampaign.php.
Steps to send out a MMS with XCALLY as a Messaging Gateway
Before sending out a message please make sure you have data for the following parameters as they are mandatory:
- URL endpoint: the URL that was assigned for your gateway.
- SenderID: The number which you are sending the text from.
- Destination Number: The number that is intended to receive a text message.
- Body: The actual message if any. Consider that for SMS there is a limit of 160 characters per segment.
- Image URL: the URI address where the image to be sent is stored.
CURL POST EXAMPLE
Here is an example using curl how you should send a message to XCALLY:
curl -X POST https://my.xcallymessaginggatewayurl.com/mmscampaign.php \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "BODY='Yo! check this out'" \
-d "XMDPHONE=1234567890" \
-d "MEDIAURL=https://my.url.site/image.jpg" \
This command will result in sending message Yo! check this out including the image at URL https://my.url.site/image.jpg to number 1234567890 using your gateway at https://my.xcallymessaginggatewayurl.com/mmscampaign.php.
Instead curl you may use your favorite POST tool or preferred webhook service to establish a connecting with the gateway.
Conclusion
If you need more information on how to send SMS and MMS through XCALLY please do not hesitate to contact us at support@linkedip.com.
Comments
0 comments
Article is closed for comments.