Introduction #
OneXtel is a leading CPaaS (Communication Platform as a Service) provider that offers seamless, end-to-end communication solutions. Our product offering includes channels like SMS, Voice, Whatsapp, Chatbot, RCS, and Email services tailored for businesses of all sizes.
Prerequisites :
1. You should have an active OneXtel Aura account with associated API key(s).
2. Make sure the Entity ID and Sender Id(s) are added in the OneXtel account.
Note: Kindly disable DND scrubbing while creating the API key to ensure complete submission from the connector to Onextel platform.
Recommended :
Add your DLT approved templates in Aura account using the bulk upload option.
Note : To create a new account or incase of any queries and concerns related to OneXtel account, kindly reach out to OneXtel Support team at support@onextel.com.
Install the Application
Package Stable Link: (Password: On3XSmsS@l3sF0rce#)
https://login.salesforce.com/packaging/installPackage.apexp?p0=04tQy0000007EuHIAU
DLR Configuration
Create a New Site:
Go to Setup > Search for Sites > Select Sites > Click New.
Fill in the following details:
- Site Label: “DLR Site” (or any preferred name).
- Active: Enabled.
- Active Site Home Page: InMaintenance (or any preferred page).
- Click Save.
Enable DLR Apex Class:
Open the created site and click Public Access Settings.
Navigate to Enabled Apex Class Access > Click Edit.
Move SMSReportUpdateApi to the enabled Apex classes list and click Save.
Retrieve and Share DLR Link:
Go to Sites and copy the Site URL.
Your DLR Link: {siteUrl}/services/apexrest/OneXtel/sms-report-update.
Share the DLR link with Onextel support to receive DLR information on SMS.
Configure SMS Account
Under the App Launcher Menu, select Onextel.
Navigate to the Provider Account tab > Click New.
Fill in the required fields and click Save.
Configure SMS Template
Go to the SMS Template tab
- Template Types – Default Template & Object Template
- Default Template: A base template approved in Onextel (e.g., Hi {{1}}, Thanks for signing up).
- Object Template: A Salesforce object template to trigger messages from specific objects. Agents must create templates associated with placeholders and assign object fields (e.g., Hi {{firstname}}, Thanks for signing up).
Add Default Template:
- Fill in the required fields.
- Select Type as Default and click Save.
Add Object Template:
- Open the default template you want to create an object template for.
- Select the object you want to target (e.g., Contact).
- Assign placeholders to object fields (e.g., {{1}} as firstname).
Enable Button in Standard/Custom Object
Add the Button:
Go to Setup > Object Manager.
Select the target object (e.g., Contact).
Navigate to Button > Search for Send SMS. If it doesn’t exist, create a new action: (Note: Only Contact Object its already created for other Object create on your own)
Action Type: Lightning Web Components.
Lightning Web Component: c:sendSmsForm.
Standard Label Type: None.
Label: Send SMS.
Name: Send_SMS.
Click Save.
Update Page Layout: Open the layout for the selected object.
Under Mobile and Lightning Actions, search for Send SMS.
Drag the Send SMS button to Salesforce Mobile and Lightning Experience Actions.
If the button cannot be dragged, click Override the predefined actions and try again.
Click Save.
Capture Object Reference in SMS Report
(Skip if reference lookup already exists.)
Go to Object Manager > SMS Report.
Under Fields & Relationships, click New.
Create a Lookup Relationship:
- Select Related to Object (e.g., Account or Contact) > Click Next.
- Set the following:
- Field Label: REF {objectname} (e.g., REF Account, REF College Details).
- Field Name: REF_{objectname} (e.g., REF_Account, REF_College_Details).
Follow the remaining steps and click Save.
Send SMS Using Button from Salesforce Object
Navigate to the target object (e.g., Contact).
Click the Send SMS button.
Choose the Phone Field, Onextel Account, and Object Template.
Click Send.
The success/failure notification is displayed and saved in the SMS Report object.
Send SMS Using Apex Function
Open the Developer Console.
Go to Debug > Open Execute Anonymous Window.
Enter the following code:
String accountId = ‘a00H3000001PfEEIA0’; // Provider Account Id
String templateId = ‘a02H3000001eWguIAE’; // Object Template Id
String recordId = ‘003H30000051Y81IAE’; // sObject Id
String phoneField = ‘Phone’; // Either PhoneField or Phone is a mandatory value
String phone = null; // Either PhoneField or Phone is a mandatory value
OneXtel.CustomResponse response = OneXtel.SendSmsController.sendSms(accountId,templateId, recordId, phoneField , phone );
System.debug(response);
Click Execute.
Send SMS Using Flow
Open Flow.
Choose Start From Scratch.
Select the type of flow: Record-Triggered Flow.
Select the object, trigger, and condition.
Choose Apex Action > Send SMS.
- Specify the Provider Account ID.
- Choose the Record ID.
- Specify the Template ID.
- Choose the Phone Value.
- Click Save and Activate.