You can automate your SMS messages in Salesforce via Flows. This article will walk through how to add an SMS message action to a flow.
Note - There are 3 automation tools used in Salesforce: Workflow Rules, Process Builder, and Flows. Salesforce has announced they'll be retiring Workflow Rules and Process Builder in the near future. Based on this, we recommend only using Flows to automate SMS messages. |
SMS message actions can be added to any kind of flow. For help creating a flow, see this Salesforce article.
Adding SMS to the Flow
Before you get started, there're some important things to consider:
- The way an SMS message is triggered in a flow is by creating a task record with specific values.
- SMS messages triggered by flows must use a template, so you'll need to use an existing template when creating the task record.
- The template's object type must match the object type of the record you wish to send a message against (WhoId or WhatId)
1. Add a Create Records Action to your flow.
2. Configure the Create Records Action as follows:
FIELD | VALUE |
Label | User preference |
API Name | User preference |
Description | User preference |
How Many Records to Create | One |
How to Set the Record Fields | Select the option "Manually" |
Create a Record of this Object | Task |
3. In the Set Field Values for the Task section, add and set the following fields and values:
FIELD | VALUE |
ActivityDate | $Flow > Current Date |
Description |
{"template":"SMS_Code"} Note - Variable= Taskid from Send_SMS. Replace SMS_Code with the SMS Code found on the desired SMS Template as shown below. Include the quotations, colon, and brackets. The template chosen will define the Send from account and message content. |
OwnerId | The ID of the user that should be logged as sending the message |
Status | Completed |
Subject | User preference |
WhoId | The ID of the person object (contact or lead) the message is related to |
WhatId |
The WhatId field can be optionally used in conjunction with the WhoId field to add a related record other than a lead or contact (e.g. account, opportunity, etc.). Note - If your organization uses Person Accounts in Salesforce, the WhatId field should be used in place of the WhoId field and would become mandatory. |
4. Now all that's left to do is click Done and Save, and your Flow is ready to go.
Note - we recommend the flow is debugged and/or tested prior to activation. |
Comments
0 comments
Article is closed for comments.