Send SMS from Salesforce using Textlocal API and External Services with absolutely zero Apex!
-
Sign-up for a free Textlocal account. Visit - https://www.textlocal.in
-
Generate an API Key.
-
Visit the Developer Docs - https://api.textlocal.in/docs/sendsms to learn how you can send an SMS using a simple GET verb.
-
Create a Named Credential with URL -
https://api.textlocal.in -
Create a Custom Setting (Hierarchy) to store the API Key and the name of the Sender:
TXTLCL(This is a constant)
- Register an External Service with below Swagger schema -
{ "swagger": "2.0", "info": { "title": "TextLocal Send SMS API", "description": "Send SMS from Salesforce using TextLocal", "version": "1.0.0" }, "host": "api.textlocal.in", "schemes": [ "https" ], "paths": { "/send": { "get": { "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "apikey", "type": "string", "required": true }, { "in": "query", "name": "numbers", "type": "string", "required": true }, { "in": "query", "name": "message", "type": "string", "required": true }, { "in": "query", "name": "sender", "type": "string", "required": true } ], "responses": { "200": { "description": "Successful Operation", "schema": { "$ref": "#/definitions/Response" } } } } } }, "definitions": { "Response": { "type": "object", "properties": { "balance": { "type": "integer", "format": "int64" }, "status": { "type": "string" } } } } }Note: To validate a Swagger Schema (written by yourself), visit - http://editor.swagger.io/
What if I want to learn more about External Services. Visit - https://trailhead.salesforce.com/en/content/learn/modules/external-services




