User Guide | Setting up Automations in Salesforce®

Blog Banner _User Guide _ Setting up Automations in Salesforce®

 

Easy Automation with Process Builder and Flow

Do Less. Get More. 

Let Mogli do the heavy lifting with Process Builder and Flow. Utilizing standard Salesforce automation functionality allows you to methodically scale your text message communications while ensuring no messages go untended.

Use Cases for Process Builder

  • Mogli Opt-Out - automatically check and uncheck the Mogli Opt-Out checkbox based on inbound keywords you specify.  This will keep you in compliance with Opt-In/Out practices so that you keep your recipients happy.
  • Send an email to a particular user based on a specific Question Response in a Form Template
  • Create or update a record when a specific message is received or a specific Form is completed
  • Trigger text messages to be sent according to users or recipients based on field status changes, scheduled events, and more
  • Chatter and email notifications for important inbound messages (see Notifications section)

Use Cases for Flow

  • Auto-creation of Contacts and Leads from Inquiry Form Templates, including population of certain fields based on Question Responses in a Form.  This is great for lead generation and securing opt-in consent.
  • Populate fields based off of information provided in Form Templates.  This will safe your users time and preserve data accuracy!

A Few Frequently Asked Questions

If I build a process on the SMS object, will I run into queueable errors?

When many incoming messages come in quickly through Salesforce, there is a chance that you may receive a Flow or Apex error.  Mitigate this risk by minimizing how often the process runs by making your criteria as specific as possible.

How do I trigger an outbound automated conversation/survey (Form Template) from Process Builder?

Follow the steps outlined in the Trigger a text message with Process Builder section below.  In the Message field, include the exact text of the First Question of your Form Template.  This should also be the exact text of the SMS Template to which it’s associated.  When your process fires, it will initiate the Form Template and your recipient will be able to engage.

Can I trigger a text message with Flow?

Absolutely.  Simply create your criteria in Flow and generate an SMS record with the same field values as you would using Process Builder.

Mogli Opt-Out Automation for Contacts and Leads

Step by Step:

  1. From Setup, enter Process Builder and select Process Builder
  2. Click New
  3. Fill in your information for the New process.  Be sure to start the process when a record changes. Click SaveNew Process page in Process Builder for Opt-out automation
  4. Start your process on the SMS object, and when a record is created or edited.  Click SaveStart a new process view  for opt-out automation
  5. Click Add Criteria and Define your Criteria for the Action Group as follows: Defining your Criteria for the Contacts Action Group view for Opt-Out Automation
  6. In the Conditions section, select the Customize the logic radio button and populate the field as so: 1 and 2 and (3 or 4 or 5 or 6 or 7 or 8)Customize the logic field for opt-out automation
  7. Check the checkbox in the Advanced section and click Save
  8. In the Immediate Actions section, click Add Action.  Enter your criteria and SaveAdding an action for contact Opt-out automation
  9. Click Add Criteria, repeat the process for Leads, and click Save: Define the Criteria for Leads Action Group for Opt-Out AutomationAdding an action for Lead Opt-out automation
  10. Now, add your criteria for when a Contact decides to opt back in.  Click Add Criteria and populate the fields as such:Add criteria for Contact Opt back in in Automation
  11.  In the Immediate Actions section, click Add Action.  Select the radio button for Select a record related to the Mogli_SMS__SMS__c.  Enter your criteria as such and click Save Adding an action for Contact opt-back-in automation
  12. Click Add Criteria, repeat the process for Leads, and click SaveAdd criteria for Lead Opt back in in Automation
    Adding an action for Lead Opt-back-in automation

Your Process Builder should now look like this: Process Builder view with Opt-in and opt-out automation

  • In the upper right corner, click Activate
  • Create a test Contact or Lead for yourself (if you haven’t already) and be sure that your Mogli Number is correctly populated.  Text in one of your specified Opt-Out keywords to one of your Gateways.  Ensure that the Mogli Opt-Out checkbox has been checked and that Conversation View is greyed out.  Then, text in one of your specified Opt-In keywords to that same Gateway.  Ensure that the Mogli Opt-Out checkbox is unchecked and that Conversation View is enabled.

Admin Tip:

Depending upon the version of Mogli you’re running (4.2 and below), you may need to allow 5-10 minutes for the Mogli Opt-Out Automation to take effect.  The Process will run at the rate of your batch process, which runs anywhere from 5-10 minutes.  To see how often your batch process is running, go to Setup > Scheduled Jobs. To modify your batch process, go to the SetupMogliSMS tab, click unschedule, enter 5 and click Schedule.

 

 

Send an Email Alert based on a question response in a Form Template (Survey) 

Automation makes it easy to efficiently follow up with customers, making sure they feel cared for and stay engaged. 

In this example, we’re going to trigger an email notification to be sent out to a user when someone responds with one of the possible YES answers to the Question Templates that asks if they’d like help scheduling an appointment.

  1. From Setup, enter Classic Email Templates, and customize the email to be triggered by the Process you’re about to create.  Click Save.
  2. From Setup, enter Process Builder and select Process Builder
  3. Click New
  4. Fill in your information for the new process.  Be sure to start the process when a record changes.  Click Save.
  5. Select the Question Response object to start the Process, and start the process when a record is created or editedimage158
  6. Click Add Criteria, and populate the criteria as such, including the Filter Logic, and click SaveDefine criteria to trigger email alert off question response
  7. Click Immediate Actions and populate the fields as such, including the Email Template you’ve just created, and click SavePopulate immediate actions to trigger email
    Your Process Builder should now look like this:image81
  8. In the upper right corner, click Activate
  9. Create a test record for yourself (if you haven’t already) and be sure that your Mogli Number is correctly populated.  Initiate the survey by texting in the Query String (keyword) to one of your active Gateways.  Respond to the survey in accordance with your Process Builder criteria.  Check your email.

Trigger a text message with Process Builder 

In this automation example, we’re going to trigger a text message to be sent to a Contact when certain criteria are met.  You may also trigger text messages to recipients associated with any Mogli-configured objects.

To trigger a text message:

  1. From Setup, enter Process Builder and select Process Builder.  Click New.
  2. Fill in your information for the new process.  Click Save.
  3. Select the appropriate object to start the Process, and start the process when a record is created or edited.
  4. Add your specific criteria (when a Status changes, picklist value changes, when a checkbox = TRUE or FALSE, etc.)  Click Save.
    • Phone Number = the Mogli Number of your recipient.In the Immediate Actions section, trigger your text message to be sent out by populating the Field Values as follows and click Save
      • Direction = Outgoing
      • Status = Queued (this tells Mogli to send the message right away)
      • Gateway = ID of the Gateway to send the message, or pull from the value in the Default Gateway field on the record.  The ID is found within your browser’s URL of the appropriate Gateway.
      • Message = enter a String.  If using a merge field, you must use a Type of Formula and enter your message there.
      • Contact (or pertinent record) = ID of your recipient. Triggering a text by populating action field values
  5. In the upper right corner, click Activate.
  6. Create a test Contact or other pertinent record for yourself (if you haven’t already) and be sure that your Mogli Number is correctly populated (+12223334444).  Click Edit, set the appropriate criteria on your record, and Save.   Check to see if you’ve received the text message.

Additional Resources

User Guide | SMS and WhatsApp™ Opt-In and Opt-Out

User Guide | Branching form Templates in Salesforce®

User Guide | SMS Templates in Salesforce®

User Guide | Linear Form Templates in Salesforce®

All Knowledge Base articles