Knowledge Base > Salesforce > Send SMS through Salesforce Flow

in Salesforce

Notifying by SMS those who have registered for the service that the shipment has left for them, sending an SMS reminder that the event is in 24 hours, sending a welcome SMS to those who have registered for the service – these are just some examples of uses you can make with the Salesforce and inwise integration.

The Flow builder allows you to automate SMS sending after certain events. When the flow builder identifies the trigger, it will send an SMS automatically through the inwise system.

**This method of sending is beneficial in that your Salesforce account will display sending statistics

Setting the trigger

First, define in the Flow builder which event or trigger would lead to the sending of an SMS. Such as when a contact is registered, a meeting is rescheduled for 3 hours, a purchase is made, a donation is received,  a delivery has been sent, etc’.

In order to define the action “Action”, you have to first create the Formula, as follows:

  1. Click on the “new resource” button
  2. In the panel that opens,  in the “Resource Type” field choose “Formula”.
  3. In the “Data type” field choose “Text”
  4. In the field “Formula” field, enter the code (you can add more parameters to this code):
    ‘{“recordID”: “‘ + {!$Record.Id} + ‘”,”mobileNumber”:”‘ + {!$Record.MobilePhone} + ‘”,”smsText”:”put your text here. \n Add parameters if needed. For example: ‘ + {!$Record.FirstName} + ‘\n’+‘”,”saveToInwiseMessagingHistory”:true}’

**In the case that you receive an error in the formula, please contact us so that we can update the code for you.

Flow builder - new resource - 1


Parameters values for the formula

  • recordId – Optional.  Identify your contact/lead ID. You should use this if you want to save history.
  • smsText – Holds the text that you want to send . {!$Record.FirstName} is an example of how to concatenate a parameter. Text can be entered here directly in the formula or it can be taken from a parameter field.
    To add a line break (ENTER) – use \n.
  • mobileNumber –The phone number to which the SMS message will be sent. You can use a hard-coded value, a field name, or any other object you want.
    The format can be either international or local. If a local format is used, inwise will append the country prefix defined in the add-on account settings.
  • saveToInwiseMessagingHistory – Optional. “true” will add a row to the contact/lead’s inwise messaging history (true must be lowercase).
    In order to use this feature, it is necessary to activate the messaging history feature in the add-on settings of inwise – You can find more information in the following guide – Settings – adding inwise modules – fast SMS.
    The new record will be created in the contact/lead layout in the inwise messaging history section

inwise messaging history

Meaning of status:

Status Value Remark
sent The send was valid
invalid Invalid mobile number The number format is invalid
rejected The mobile number is a kosher number kosher-number
rejected The mobile number is defined as unsubscribe in inwise The mobile phone is unsubscribe in inwise
When the from sender name is not a valid string according to inwise account Error log: “Parameter value ‘message.from’ is not allowed.”

The following parameters are only relevant for version 2.1

  • “inwiseAccount” – Optional. If you have more than one inwise account that associated with your SF domain, use this setting to indicate which account will be used to send the SMS message.
    You can get the account value from the account edit screen in inwise.
  • “from” – Optional. CompanyName. If you have more than one sender name in your inwise account, use this setting to indicate from which sender name of the SMS will be send
    If you don’t set it, the default sender name from your inwise account will be chosen or the value defined in your salesforce account.
  • “createTask”“true”
    Optional. “True” will created the contact/lead object.
  • saveToInwiseActivity – This setting is obsolete, do not use it.

Setting the Action

In the flow builder screen, click on the plus icon (+).
Search “inwise” and choose the action: “Send (apex-inwise__SMS)”

(If you don’t have these options you might not have the latest version of inwise addon version. To receive an updated version, contact our support team).

Select an action


Mark “Include” in the “Set Input Values” section, then select the formula you previously created.

Choose the formula that you previously created.



That’s it! You have finished setting up, now activate your flow and send it