Why Integrate SMS with Salesforce?
Email from a CRM is easy to ignore; an SMS usually gets read. With SMS wired into Salesforce, a new web lead gets a welcome text while your rep is still opening the record, the account manager hears when a deal changes stage, and a customer knows the moment their case is resolved.
Two integration methods: Apex HTTP callouts for developers, or Salesforce Flows + HTTP callout actions for admins (no code).
Lead Follow-Up
Instant SMS to new leads and assigned sales reps on lead creation
Deal Alerts
SMS notifications when opportunities change stage or close
Case Notifications
SMS customers on case status changes and resolution
Campaign SMS
Send promotional SMS to campaign members from Salesforce
// Apex Class: SpringEdge SMS Service
public class SpringEdgeSms {
private static final String API_URL =
'https://web.springedge.com/api/web/send/';
private static final String API_KEY =
'YOUR_API_KEY';
@future(callout=true)
public static void send(
String phone, String message
) {
Map<String, String> params =
new Map<String, String>{
'apikey' => API_KEY,
'sender' => 'SEDEMO',
'to' => phone,
'message' => message,
'format' => 'json'
};
List<String> pairs = new List<String>();
for (String key : params.keySet()) {
pairs.add(key + '=' + EncodingUtil
.urlEncode(params.get(key), 'UTF-8'));
}
HttpRequest req = new HttpRequest();
req.setEndpoint(API_URL);
req.setMethod('POST');
req.setHeader('Content-Type',
'application/x-www-form-urlencoded');
req.setBody(String.join(pairs, '&'));
req.setTimeout(10000);
Http http = new Http();
HttpResponse resp =
http.send(req);
// {"groupID":61,"MessageIDs":"61-1",
// "status":"AWAITED-DLR"}
System.debug('SMS Response: '
+ resp.getBody());
}
// For Flow: shows up as the Apex Action
// "Send SpringEdge SMS"
public class Request {
@InvocableVariable(required=true
label='Mobile (91XXXXXXXXXX)')
public String phone;
@InvocableVariable(required=true
label='Message')
public String message;
}
@InvocableMethod(label='Send SpringEdge SMS')
public static void sendFromFlow(
List<Request> requests
) {
for (Request r : requests) {
send(r.phone, r.message);
}
}
}
APEX CODE
Salesforce Apex HTTP Callout
This Apex class sends SMS via the SpringEdge /api/web/send/ endpoint using a @future(callout=true) method: a form-encoded POST with your apikey, DLT sender ID, number and message. Call it from any trigger, Flow, or Process Builder. See the SMS API documentation for all parameters.
Setup Steps:
- Add
https://web.springedge.comto Remote Site Settings - Create the Apex class in Setup → Apex Classes
- Call from a trigger:
SpringEdgeSms.send(lead.Phone, 'Welcome message'); - Or, in Flow Builder, add an Action and pick Send SpringEdge SMS (the
@InvocableMethodabove)
Use Cases
Lead Welcome SMS
Instant SMS to new leads when they enter the pipeline. Includes rep's name and next steps.
Opportunity Alerts
Notify managers when deals move to negotiation, close, or are at risk.
Case Resolution
SMS customers when support cases are updated or resolved.
Task Reminders
SMS reminders to reps for overdue tasks and upcoming meetings.
Frequently Asked Questions
- How do I send SMS from Salesforce?
Create an Apex class that calls the SpringEdge SMS API using HTTP callouts. Add the API endpoint to Remote Site Settings, then invoke the class from triggers, Flows, or Process Builder. Alternatively, use Flow HTTP Callout actions for a no-code approach.
- Do I need coding knowledge?
For the Apex approach, basic Apex/Java knowledge is helpful. For the Flow approach, no coding is needed: configure HTTP callout actions visually in Salesforce Flow Builder.
- Does this work with Salesforce Lightning and Classic?
Yes. Apex HTTP callouts and Flows work in both Lightning Experience and Salesforce Classic. The integration is backend-based, so it's UI-independent.
- Is DLT required for SMS from Salesforce to Indian numbers?
Yes. All SMS to Indian mobile numbers requires DLT-approved sender ID and templates, regardless of the sending system. Ensure your Apex message text matches the registered DLT template exactly.
- How much does it cost?
Prepaid, with no monthly fees. The smallest pack is 10,000 SMS at ₹0.20 each (₹2,000 + GST), falling to ₹0.13 per SMS at 5 lakh+. Visit our pricing page for details.
