Skip to main content
Skip table of contents

Salesforce: Setting Up SMS for Salesforce

Retarus SMS for Salesforce makes text messaging simple and intuitive. The seamless integration allows teams to automate personalized text messages directly in Salesforce. Users can send messages with Flow Builder to streamline customer interactions and improve satisfaction. The solution supports instant two-way messaging. It also offers flexible customization, so administrators can add tailored components to the user dashboard to meet specific business needs.

Developer: Retarus

Category: CRM, ERP Integration

Prerequisites

How to get started

1. Install Retarus Enterprise SMS for Salesforce
2. Create Named Credentials
  • From Setup, enter Named Credentials in the Quick Find search field, then select Named Credentials.

named-credentials.png
  • Within Named Credentials, select New and then New Legacy.

    named-credentials-2.jpg

    This lets you create multiple accounts and labels for your Salesforce organization.

  • For your use cases or organizations, choose a label that matches the URL provided by Retarus. The label must not contain spaces or special characters.

named-credentials-3.jpg
  • Click the created label and enter your authentication details.

  • Leave the Certificate field empty.

  • Select Named Principal as the identity type.

  • Select Password Authentication as the authentication protocol.

  • Enter the username and password for the Retarus API.

  • Click Save.

    image-20240618-143052.png
3. Configure LWC (Lightning Web Component) for Record Page

On the record page (such as Account or Contact):

  • Click the gear icon and select Edit Page.

  • On the edit page, find the Retarus - Send SMS under Custom Components on the left.

  • Drag and drop the component onto the page.

  • In the configuration panel on the side, select the field that stores the phone number.

  • As an admin, you can choose whether users can change these values.

  • Select the API.

  • Use the component settings to decide which options are available to users. The screenshot shows all available settings. Admins can enable only the options they need.

    • API Label: Enter a name for the dashboard.

    • Phone number field: Select the field that contains the phone number.

    • Name or Number of the sender: Enter the name or number that appears as the sender for the recipient. You can use up to 11 alphanumeric characters. Spaces are not allowed.

    • BillCode: Enter a billing code to assign the message to a specific user or user group.

component-screen.png

For more information, see the SMS-for-Applications documentation.

4. Configure LWC (Lightning Web Component) for Screen Flow
  • In the Screen Flow, add a new screen.

  • Provide the name and label for your screen.

  • Make sure to uncheck Show Footer under Configure Footer in the right-side panel.

  • Find the Retarus - Send SMS (Flow) component from the left side list under custom component.

  • Drag and drop the component onto any part of the screen.

  • Provide an API Name (this is different than the API for Retarus).

  • You can also set the values in the component configuration panel.

  • Click Done.

5. Apex Action Configuration Editor in Screen Flow
  • Add an action in the flow.

  • In the search bar, type SMS and select Send SMS.

    image-20240618-143448.png

  • Select an API (this is the API for Retarus - Named Credentials). 

  • You can configure the destination and message with either reference values or actual values.

  • If you choose to send bulk SMS (only one message to multiple numbers), you need to insert a collection variable reference in the destination.

  • In the Advanced configuration section, you can set additional parameters (see the screenshot below).

  • Click Done.

image-20240618-143547.png
6. How to send an SMS using Apex Code

The method sendSMS in the Class named Retarus should be used. You can check the example.

  • The following classes are set as global to give the developer the ability to send SMS directly in apex in the org where the package is installed.

  • SMSConfiguration

    • Retarus

    • JobStatus

      image-20240618-143656.png
7. Reporting via myEAS Portal
  • Admins can get a comprehensive overview in the myEAS Portal.

  • SMS report details like status and status code can be reported by the related SMS Job ID.

  • The status codes are described in the Retarus SMS for Application status code online documentation.

image-20240813-152829.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.