1. Introduction

1.1. Who should be looking at this document?

This guide is intended for Salesforce system administrators installing and configuring LiveMessage in a Salesforce instance. This document details the architecture and methodology behind LiveMessage’s Lightning Process Builder integration for automated inbound and outbound messaging.

If you are a Web Developer or Salesforce developer looking add a Text / Call button to your organization’s website or to create apps that utilize LiveMessage please skip to the Salesforce Developer Guide for LiveMessage.

1.2. Nomenclature

References to both “LiveMessage” and “LiveText” exist throughout this document. While the name of the product was recently changed to LiveMessage, object names, labels and other items in the product still reference LiveText. This document references LiveText when referring to specific items contained in the product that are still branded LiveText or need to be branded LiveText. The reader of this document should assume that “LiveText” should be used in these circumstances to enable the appropriate product functionality or to locate specific objects, commands, etc. contained in the LiveMessage package.

1.3. Process builder overview

LiveMessage relies heavily on Salesforce’s Lightning Process Builder. If you are not already familiar with the process builder we recommend reviewing the instructional material provided by Salesforce before continuing:

1.4. Limits

Since LiveMessage relies on the process builder for automated messaging, Salesforce org limits are applicable. Workflow and Approval Limits of 500 processes per hour for the Enterprise Edition and 1000 processes per hour for the Unlimited Edition of Salesforce apply directly to process builder use. Please consult the Salesforce Limits Quick Reference Guide for more information. To have specific limits raised for your Salesforce org a case must be opened with Salesforce. Please visit the Salesforce Partner Community to log a case to have your org limits raised. We recommend raising the Workflow and Approval Limits to the maximum of 10,000 processes per hour while utilizing any of the automated messaging capabilities of LiveMessage.

2. Inbound / Mobile Originate (MO) Messaging

For inbound or MO messages to be automatically handled, LiveMessage relies on public methods, objects and process builder processes. These methods, objects and processes work together to process MO messages while providing Salesforce developers and administrators with the flexibility to control how and when to respond to MO messages.

The following MO use cases are a sample of the types of automated use cases that are supported
  1. Opt-in / Opt-out tracking

  2. Campaign response tracking (For more info see the Bulk Messaging Guide available from LiveMessage’s AppExchange listing)

  3. Routing to agent queues (Via Omnichannel - For more info see the Omnichannel Setup Guide from LiveMessage’s AppExchange listing)

  4. Personalization (Via data stored in object records located by a texter’s phone number)

  5. Text-to-Case

  6. Opt-in by keyword

  7. Data lookup in additional objects or custom objects

  8. Others

2.1. Omnichannel overview

LiveMessage’s Inbound / Mobile Originate (MO) Messaging relies heavily on Salesforce’s Omnichannel functionality. If you are not already familiar with Omnichannel we recommend reviewing the instructional material provided by Salesforce before continuing:

2.2. Supported Channels

The following channels are supported for Inbound Messaging:

  • SMS

  • Facebook

2.3. Object overview

ITR Message

If the 'ITR Enabled' checkbox is selected for a particular LiveMessage number / Channel ID in the LiveMessage admin app then records are added to the ITR Message table. This record insert occurs if a LiveMessage agent is NOT engaged in an active text session for the combination of LiveMessage Number / Channel ID and Mobile Number / User ID that is used to send a message to LiveText. An existing ITR Message record is updated when all of the previously mentioned conditions are true AND an ITR Message record already exists for the combination of LiveMessage Number / Channel ID and Mobile Number / User ID used to send a message to LiveText.

The following process flow depicts the logic LiveMessage uses for populating the ITR Message table:

Logic for populating the ITR Message Table
Figure 1. Logic for populating the ITR Message Table
By default the insertion of a record to the ITR Message object will trigger the ConfirmOptIn Process. However, no action will be taken by the ConfirmOptIn Process until the Message field has been populated with data. As noted in the diagram above an ITR Message record is updated immediately after a record is inserted in the ITR Message table.

API Name: LiveText__ITR_Message__c
Description: Object for automatically processing inbound (MO) messages
Custom Fields & Relationships:

Field Label API Name Data Type Notes

Account

LiveText__Account__c

Lookup(Account)

The most recently modified account that matches a texter’s phone number or is linked with a Social Persona record matching a user’s unique ID

Available Agents

LiveText__Available_Agents__c

Number(3, 0 )

The number of LiveMessage agents that are available to accept a LiveMessage session from the console

Campaign Send Member

LiveText__Campaign_Send_Member__c

Lookup(Campaign Send Member)

The most recently modified Campaign Send Member record that is linked with a Campaign Member record that contains a texter’s phone number

Case

LiveText__Case__c

Lookup(Case)

The most recently modified case that is linked with a contact, account or person account that matches a texter’s phone number or is linked with a Social Persona record matching a user’s unique ID

Contact

LiveText__Contact__c

Lookup(Contact)

The most recently modified contact that matches the texter’s phone number in either the phone or mobile phone field or the contact record that is linked with a Social Persona record matching a user’s unique ID

Formatted Originating Number

LiveText__Formatted_Originating_Number__c

Formula (Text)

The texter’s phone number or the user’s unique ID

HTML Transcript

LiveText__HTML_Transcript__c

Rich Text Area(32768)

The transcript for the texter’s / user’s interaction with the ITR in HTML format.

Is Within Business Hours

LiveText__Is_Within_Business_Hours__c

Checkbox

Is set to True if the texter / user has messaged during the business hours configured in the LiveMessage admin for the applicable LiveMessage Number / Channel ID

ITR Context

LiveText__ITR_Context__c

Text(100)

Null by default. Used to maintain state for the texter’s ITR interaction. ITR Context should be updated whenever a process builder process is triggered from ITR Message if the LiveText__RouteInboundConversationAction Global Method is not being called.

Lead

LiveText__Lead__c

Lookup(Lead)

The most recently modified lead that matches the texter’s phone number or is linked with a Social Persona record matching a user’s unique ID

LiveText Number

LiveText__LiveText_Number__c

Lookup(LiveText Number)

The LiveMessage Number or Channel ID being messaged

Message

LiveText__Message__c

Long Text Area(480)

The texter’s / user’s message

Mo Message Counter

LiveText__Mo_Message_counter__c

Number(18, 0 )

Starting at 1 this field is incremented by 1 whenever a new inbound / mobile originate (MO) message is received by the ITR. Using this field, a threshold may be set to route a texter / user to an agent after an excessive number of ITR interactions have occurred.

Opportunity

LiveText__Opportunity__c

Lookup(Opportunity)

The most recently modified opportunity that is linked with an account or person account that matches the texter’s phone number or is linked with a Social Persona record matching a user’s unique ID

Opt-In Status

LiveText__Opt_In_Status__c

Text(1)

The texter’s / user’s opt-in status for combination of the texter’s mobile number / unique ID and LiveMessage number / Channel ID at the time the message is received by LiveText. 0=Texter / user is Opted Out, 1=Texter / user is Opted In, Null=No opt-in information has been collected by LiveMessage.

Originating Number

LiveText__Originating_Number__c

Text(20)

The mobile number or unique ID the texter / user is using to message with LiveMessage

Queue Name

LiveText__Queue_Name__c

Text(100)

The queue name that is passed by LiveMessage to Salesforce’s Omnichannel functionality when routing a LiveMessage session to the Omnichannel notification widget

Text Transcript

LiveText__Text_Transcript__c

Long Text Area(32768)

The transcript for the texter’s / user’s interaction with the ITR in plain text format

<Custom Object Field Name>

<Custom_Object_API_Name__c>

Lookup(<Custom Object Name>)

Up to 10 custom objects and/or additional standard objects may be linked to ITR Message by adding a lookup field to ITR Message to the custom object or additional standard object. When an ITR Message record is created or updated LiveMessage will attempt to populate the newly added lookup field with a reference to a custom object or additional standard object record. For this field to be populated a custom object or additional standard object record must exist that matches a texter’s phone number. This field will also be populated if a custom object record or additional standard object record exists that is linked with a record that matches a texter’s phone number or a record that is linked with a Social Persona record matches the user’s unique ID.

NOTE: For an additional standard object to work with LiveMessage the additional standard object must contain a field with the field name equal to Name. Many standard objects like Orders and Contracts contain this field. Other objects like Solutions, Tasks and Events do not.

2.4. Process Mobile Originate (MO) Messages

2.4.1. ConfirmOptIn Process

The following process builder process is included with the LiveMessage package and is enabled by default. It is triggered after a record has been created or a record has been updated in the ITR Message object. This process is used to verify a texter’s / user’s opt-in status, request that the texter / user opt-in if the texter / user is opted-out, routes the texter / user to the LiveMessage console after opt-in has been confirmed, opt’s-out the texter when the opt-out command is received and provides help information when requested by the texter/ user.

ConfirmOptIn Process
Figure 2. ConfirmOptIn Process

The following images and tables depict the details of the each process builder decision and action. The full process is repeated for each decision and action to improve readability.

ConfirmOptIn Process - Decision: User Requests Opt-out and has Campaign Send Member Id?
ConfirmOptIn Process
Figure 3. ConfirmOptIn Process
ScheduleMessage Process - Decision: User Requests Opt-out and has Campaign Send Member Id?
Figure 4. ConfirmOptIn Process - Decision: User Requests Opt-out and has Campaign Send Member Id?
Table 1. ConfirmOptIn Process - Decision: User Requests Opt-out and has Campaign Send Member Id?
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Message__c

Equals

String

STOP

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

False

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Equals

String

1

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Is null

Boolean

True

NOTE: Additional opt-out keywords may be utilized by customizing this decision’s logic.

ConfirmOptIn Process - Action: Add Opt-out Record
ConfirmOptIn Process
Figure 5. ConfirmOptIn Process
ConfirmOptIn Process - Action: Add Opt-out Record
Figure 6. ConfirmOptIn Process - Action: Add Opt-out Record
Table 2. ConfirmOptIn Process - Action: Add Opt-out Record
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.Id

Status

Number

0

SubscriberPhoneNumber

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Reset ITR Context
ConfirmOptIn Process
Figure 7. ConfirmOptIn Process
ConfirmOptIn Process - Action: Reset ITR Context
Figure 8. ConfirmOptIn Process - Action: Reset ITR Context
Table 3. ConfirmOptIn Process - Action: Reset ITR Context
Field Type Value

ITR Context

Global Constant

$GlobalConstant.Null

ConfirmOptIn Process - Action: Send Opt-out Confirmation
ConfirmOptIn Process
Figure 9. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-out Confirmation
Figure 10. ConfirmOptIn Process - Action: Send Opt-out Confirmation
Table 4. ConfirmOptIn Process - Action: Send Opt-out Confirmation
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You have been opted out.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-out reference

Bypass Opt-in

Boolean

True

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Update Campaign Member Status - Opt-out
ConfirmOptIn Process
Figure 11. ConfirmOptIn Process
ConfirmOptIn Process - Action: Update Campaign Member Status - Opt-out
Figure 12. ConfirmOptIn Process - Action: Update Campaign Member Status - Opt-out
Table 5. ConfirmOptIn Process - Action: Update Campaign Member Status - Opt-out
Field Type Value

Campaign Member ID

Reference

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Response

String

Opt Out

ConfirmOptIn Process - Decision: User Requests Opt-out?
ConfirmOptIn Process
Figure 13. ConfirmOptIn Process
ScheduleMessage Process - Decision: User Requests Opt-out?
Figure 14. ConfirmOptIn Process - Decision: User Requests Opt-out?
Table 6. ConfirmOptIn Process - Decision: User Requests Opt-out?
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Message__c

Equals

String

STOP

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Equals

String

1

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Is null

Boolean

True

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

True

NOTE: Additional opt-out keywords may be utilized by customizing this decision’s logic.

ConfirmOptIn Process - Action: Add Opt-out Record
ConfirmOptIn Process
Figure 15. ConfirmOptIn Process
ConfirmOptIn Process - Action: Add Opt-out Record
Figure 16. ConfirmOptIn Process - Action: Add Opt-out Record
Table 7. ConfirmOptIn Process - Action: Add Opt-out Record
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.Id

Status

Number

0

SubscriberPhoneNumber

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Reset ITR Context
ConfirmOptIn Process
Figure 17. ConfirmOptIn Process
ConfirmOptIn Process - Action: Reset ITR Context
Figure 18. ConfirmOptIn Process - Action: Reset ITR Context
Table 8. ConfirmOptIn Process - Action: Reset ITR Context
Field Type Value

ITR Context

Global Constant

$GlobalConstant.Null

ConfirmOptIn Process - Action: Send Opt-out Confirmation
ConfirmOptIn Process
Figure 19. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-out Confirmation
Figure 20. ConfirmOptIn Process - Action: Send Opt-out Confirmation
Table 9. ConfirmOptIn Process - Action: Send Opt-out Confirmation
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You have been opted out.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-out reference

Bypass Opt-in

Boolean

True

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Decision: User Request Help
ConfirmOptIn Process
Figure 21. ConfirmOptIn Process
ConfirmOptIn Process - Decision: User Request Help
Figure 22. ConfirmOptIn Process - Decision: User Request Help
Table 10. ConfirmOptIn Process - Decision: User Request Help
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Message__c

Equals

String

HELP

NOTE: Additional help keywords may be utilized by customizing this decision’s logic.

ConfirmOptIn Process - Action: Send Help Message
ConfirmOptIn Process
Figure 23. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Help Message
Figure 24. ConfirmOptIn Process - Action: Send Help Message
Table 11. ConfirmOptIn Process - Action: Send Help Message
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

Text STOP to quit. Msg&Data rates may apply.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Help reference

Bypass Opt-in

Boolean

True

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Decision: User Subscribes and has Campaign Send Member Id?
ConfirmOptIn Process
Figure 25. ConfirmOptIn Process
ConfirmOptIn Process - Decision: User Subscribes and has Campaign Send Member Id
Figure 26. ConfirmOptIn Process - Decision: User Subscribes and has Campaign Send Member Id?
Table 12. ConfirmOptIn Process - Decision: User Subscribes and has Campaign Send Member Id?
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Message__c

Equals

String

SUBSCRIBE

[LiveText__ITR_Message__c].LiveText__ITR_Context__c

Equals

String

OPTIN

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

False

NOTE: Additional opt-in keywords may be utilized by customizing this decision’s logic.

ConfirmOptIn Process - Action: Add Opt-in Records
ConfirmOptIn Process
Figure 27. ConfirmOptIn Process
ConfirmOptIn Process - Action: Add Opt-in Records
Figure 28. ConfirmOptIn Process - Action: Add Opt-in Records
Table 13. ConfirmOptIn Process - Action: Add Opt-in Record
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.Id

Status

Number

1

SubscriberPhoneNumber

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Send Opt-in Confirmation
ConfirmOptIn Process
Figure 29. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-in Confirmation
Figure 30. ConfirmOptIn Process - Action: Send Opt-in Confirmation
Table 14. ConfirmOptIn Process - Action: Send Opt-in Confirmation
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You have been opted in. An agent will be with you shortly.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-in Confirmation

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
ConfirmOptIn Process
Figure 31. ConfirmOptIn Process
ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Figure 32. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Table 15. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Field Type Value

Campaign Member ID

Reference

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Response

String

Responded

ConfirmOptIn Process - Action: Route Inbound Conversation
ConfirmOptIn Process
Figure 33. ConfirmOptIn Process
ConfirmOptIn Process - Action: Route Inbound Conversation
Figure 34. ConfirmOptIn Process - Action: Route Inbound Conversation

Apex Class: LiveText__RouteInboundConversation

Table 16. ConfirmOptIn Process - Action: Route Inbound Conversation
Field Type Value

Object Id

Reference

[LiveText__ITR_Message__c].Id

ConfirmOptIn Process - Decision: User Subscribes
ConfirmOptIn Process
Figure 35. ConfirmOptIn Process
ConfirmOptIn Process - Decision: User Subscribes
Figure 36. ConfirmOptIn Process - Decision: User Subscribes
Table 17. ConfirmOptIn Process - Decision: User Subscribes
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Message__c

Equals

String

SUBSCRIBE

[LiveText__ITR_Message__c].LiveText__ITR_Context__c

Equals

String

OPTIN

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

True

NOTE: Additional opt-in keywords may be utilized by customizing this decision’s logic.

ConfirmOptIn Process - Action: Add Opt-in Records
ConfirmOptIn Process
Figure 37. ConfirmOptIn Process
ConfirmOptIn Process - Action: Add Opt-in Records
Figure 38. ConfirmOptIn Process - Action: Add Opt-in Records
Table 18. ConfirmOptIn Process - Action: Add Opt-in Record
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.Id

Status

Number

1

SubscriberPhoneNumber

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Send Opt-in Confirmation
ConfirmOptIn Process
Figure 39. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-in Confirmation
Figure 40. ConfirmOptIn Process - Action: Send Opt-in Confirmation
Table 19. ConfirmOptIn Process - Action: Send Opt-in Confirmation
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You have been opted in. An agent will be with you shortly.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-in Confirmation

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Route Inbound Conversation
ConfirmOptIn Process
Figure 41. ConfirmOptIn Process
ConfirmOptIn Process - Action: Route Inbound Conversation
Figure 42. ConfirmOptIn Process - Action: Route Inbound Conversation

Apex Class: LiveText__RouteInboundConversation

Table 20. ConfirmOptIn Process - Action: Route Inbound Conversation
Field Type Value

Object Id

Reference

[LiveText__ITR_Message__c].Id

ConfirmOptIn Process - Decision: User Needs to Opt-in and has Campaign Send Member ID?
ConfirmOptIn Process
Figure 43. ConfirmOptIn Process
ConfirmOptIn Process - Decision: User Needs to Opt-in and has Campaign Send Member ID?
Figure 44. ConfirmOptIn Process - Decision: User Needs to Opt-in and has Campaign Send Member ID?
Table 21. ConfirmOptIn Process - Decision: User Needs to Opt-in has Campaign Send Member ID?
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Equals

String

0

NOTE: To force all users to opt-in before routing the user to the console add the following condition and customize the logic as follows: 1 AND (2 OR 3) AND 4

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Is Null

Boolean

True

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

True

ConfirmOptIn Process - Action: Send Opt-in Request
ConfirmOptIn Process
Figure 45. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-in Request
Figure 46. ConfirmOptIn Process - Action: Send Opt-in Request
Table 22. ConfirmOptIn Process - Action: Send Opt-in Request
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You are not opted-in. Please respond SUBSCRIBE to opt in.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-in Confirmation

Bypass Opt-in

Boolean

True

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Set ITR Context to Opt-in
ConfirmOptIn Process
Figure 47. ConfirmOptIn Process
ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Figure 48. ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Table 23. ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Field Type Value

ITR Context

String

OPTIN

ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
ConfirmOptIn Process
Figure 49. ConfirmOptIn Process
ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Figure 50. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Table 24. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Field Type Value

Campaign Member ID

Reference

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Response

String

Responded

ConfirmOptIn Process - Decision: User Needs to Opt-in
ConfirmOptIn Process
Figure 51. ConfirmOptIn Process
ConfirmOptIn Process - Decision: User Needs to Opt-in
Figure 52. ConfirmOptIn Process - Decision: User Needs to Opt-in
Table 25. ConfirmOptIn Process - Decision: User Needs to Opt-in
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Equals

String

0

NOTE: To force all users to opt-in before routing the user to the console add the following condition and customize the logic as follows: 1 AND (2 OR 3) AND 4

[LiveText__ITR_Message__c].LiveText__Opt_In_Status__c

Is Null

Boolean

True

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

True

ConfirmOptIn Process - Action: Send Opt-in Request
ConfirmOptIn Process
Figure 53. ConfirmOptIn Process
ConfirmOptIn Process - Action: Send Opt-in Request
Figure 54. ConfirmOptIn Process - Action: Send Opt-in Request
Table 26. ConfirmOptIn Process - Action: Send Opt-in Request
Field Type Value

LiveText Number

Reference

[LiveText__ITR_Message__c].LiveText__LiveText_Number__c.LiveText__Number__c

Message

String

You are not opted-in. Please respond SUBSCRIBE to opt in.

Object ID

Reference

[LiveText__ITR_Message__c].Id

Reference ID

String

Opt-in Confirmation

Bypass Opt-in

Boolean

True

Message Source

String

ITR

To

Reference

[LiveText__ITR_Message__c].LiveText__Originating_Number__c

ConfirmOptIn Process - Action: Set ITR Context to Opt-in
ConfirmOptIn Process
Figure 55. ConfirmOptIn Process
ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Figure 56. ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Table 27. ConfirmOptIn Process - Action: Set ITR Context to Opt-in
Field Type Value

ITR Context

String

OPTIN

ConfirmOptIn Process - Decision: Route Inbound Conversation and has Campaign Send Member ID?
ConfirmOptIn Process
Figure 57. ConfirmOptIn Process
ConfirmOptIn Process - Decision: Route Inbound Conversation and has Campaign Send Member ID?
Figure 58. ConfirmOptIn Process - Decision: Route Inbound Conversation
Table 28. ConfirmOptIn Process - Decision: Route Inbound Conversation and has Campaign Send Member ID?
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

False

ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
ConfirmOptIn Process
Figure 59. ConfirmOptIn Process
ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Figure 60. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Table 29. ConfirmOptIn Process - Action: Update Campaign Member Status - Responded
Field Type Value

Campaign Member ID

Reference

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Response

String

Responded

ConfirmOptIn Process - Action: Route Inbound Conversation
ConfirmOptIn Process
Figure 61. ConfirmOptIn Process
ConfirmOptIn Process - Action: Route Inbound Conversation
Figure 62. ConfirmOptIn Process - Action: Route Inbound Conversation

Apex Class: LiveText__RouteInboundConversation

Table 30. ConfirmOptIn Process - Action: Route Inbound Conversation
Field Type Value

Object Id

Reference

[LiveText__ITR_Message__c].Id

ConfirmOptIn Process - Decision: Route Inbound Conversation
ConfirmOptIn Process
Figure 63. ConfirmOptIn Process
ConfirmOptIn Process - Decision: Route Inbound Conversation
Figure 64. ConfirmOptIn Process - Decision: Route Inbound Conversation
Table 31. ConfirmOptIn Process - Decision: Route Inbound Conversation
Field Operator Type Value

[LiveText__ITR_Message__c].LiveText__Message__c

Is changed

Boolean

True

[LiveText__ITR_Message__c].LiveText__Campaign_Send_Member__c

Is null

Boolean

True

NOTE: This decision is a 'catch-all' process that will route the texter / user to the console. Remove this decision before building on this process for your own purposes.

ConfirmOptIn Process - Action: Route Inbound Conversation
ConfirmOptIn Process
Figure 65. ConfirmOptIn Process
ConfirmOptIn Process - Action: Route Inbound Conversation
Figure 66. ConfirmOptIn Process - Action: Route Inbound Conversation

Apex Class: LiveText__RouteInboundConversation

Table 32. ConfirmOptIn Process - Action: Route Inbound Conversation
Field Type Value

Object Id

Reference

[LiveText__ITR_Message__c].Id

The following method is called by the ConfirmOptIn Process to update the status of campaign member records.

LiveText__UpdateCampaignMemberStatusAction Global Method

Set the status of the given campaign member based on the Response Type.

All fields are required.

Parameters

CampaignMemberId

Type: ID
The ID for the Campaign Member to Update.

ResponseType

Type: String
The type of response to set for the Campaign Member. Acceptable values are "Responded" or "Opt Out".

The following method is called by the ConfirmOptIn Process to route inbound conversations to the LiveMessage console.

LiveText__RouteInboundConversationAction Global Method

Routes the given conversations to the appropriate queues/console.

Only ObjectId is required.

Parameters

ObjectId

Type: ID
The ID for the ITR Message object to be routed to the console.

Status

Type: String
The status of the Text Session Header that is created when the ITR Message object is routed to the console. If Status='New' the Text Session Header that is created will send a notification to the console. If Status='Offline' the Text Session Header that is created will not send a notification to the console. 'New' is the default value if no value is specified.

The LiveText__ScheduleMessageAction Global Method is called by the ConfirmOptIn Process to send Outbound / Mobile Terminate (MT) Messages.

The following method is NOT called by the ConfirmOptIn Process, but may be called by custom built processes that are triggered from the ITR Message Table

LiveText__UpdateITRMessageAction Global Method

Updates the lookup fields (Account, Contact, Lead, Opportunity, Case, custom object fields and any additional standard object fields) found in the ITR Message object by re-querying the Salesforce DB to locate matching records. This method should be used after records are created so that the ITR Message table has access to those records immediately after they are created.

Only ObjectId is required.

Parameters

ObjectId

Type: ID
The ID for the ITR Message object to be updated.

ITRContext (Optional)

Type: String
Used to maintain state for the texter’s ITR interaction.

QueueName (Optional)

Type: String
The queue name that is passed by LiveMessage to Salesforce’s Omnichannel functionality when routing a text session to the Omnichannel notification widget.

3. Outbound / Mobile Terminate (MT) Messaging

To send outbound messages, otherwise known as mobile terminate (MT) messages, LiveMessage relies on public methods, objects and process builder processes. These methods, objects and processes work together to send MT messages while providing Salesforce developers and administrators with the maximum flexibility to control several attributes related to how and when a message is sent.

The following attributes are customizable
  1. When a message is sent

  2. How a message should be handled when a message is designated to be delivered to a LiveTextNumber / ToPhoneNumber combination that has been opt-ed out

  3. If a message should be sent when a message is designated to be delivered to a LiveTextNumber / ToPhoneNumber combination that has not been explicitly opt-ed in

  4. When error messages are logged

  5. The content of error messages

  6. If a scheduled message should be sent if the object used to trigger the sending of a message was deleted.

  7. If any follow-up actions should be taken after a message is successfully sent (This includes the creation of a task or event record)

  8. If a scheduled message should be sent if the object used to trigger the sending of a message is modified.

3.1. Supported Channels

The following channels are supported for Outbound Messaging:

  • SMS

  • Facebook - Note: Although the following objects and methods are used by Inbound / Mobile Originate (MO) Messaging to send messages these objects and methods are used for interactions initiated by a Facebook Messenger user. Outbound messaging uninitiated by a Facebook Messenger user is NOT supported by LiveMessage.

3.2. Object overview

SMS Schedule

Records added to the LiveTextScheduler object are created by the LiveText__ScheduleMessageAction Global Method. The insertion of a record to this object is used to trigger the ScheduleMessage Process.


API Name: LiveText__SMS_Schedule__c
Description: Object for sending out a scheduled Message
Custom Fields & Relationships:

Field Label API Name Data Type

Account

LiveText__Account__c

Lookup(Account)

Contact

LiveText__Contact__c

Lookup(Contact)

EnforceObjectPresence

LiveText__EnforceObjectPresence__c

Checkbox

Lead

LiveText__Lead__c

Lookup(Lead)

LiveText Number

LiveText__LiveText_Number__c

Lookup(LiveText Number)

Message

LiveText__Message__c

Long Text Area(480)

Object Id

LiveText__Object_Id__c

Text(20)

Reference Id

LiveText__Reference_Id__c

Text(50)

Schedule Date

LiveText__Schedule_Date__c

Date/Time

To Phone Number

LiveText__To_Phone_Number__c

Phone

SMS Message

Records in the SMS Message object are created by the LiveText__QueueMessageAction Global Method. The insertion of a record to this object is used to trigger the SendMessage Process. Records in the SMS Message object are updated by the LiveText__SetMessageStatusAction Global Method. The updating of a record to this object is used to trigger the ScheduledMessageStatusChange Process.


API Name: LiveText__SMS_Message__c
Description: A Mobile Terminate (MT) SMS message
Custom Fields & Relationships:

Field Label API Name Data Type

Account

LiveText__Account__c

Lookup(Account)

Contact

LiveText__Contact__c

Lookup(Contact)

EnforceObjectPresence

LiveText__EnforceObjectPresence__c

Checkbox

Error Message

LiveText__Error_Message__c

Text(255)

Lead

LiveText__Lead__c

Lookup(Lead)

LiveText Number

LiveText__LiveText_Number__c

Lookup(LiveText Number)

Message

LiveText__Message__c

Long Text Area(480)

Message Status

LiveText__Message_Status__c

Text(20)

Object Id

LiveText__Object_Id__c

Text(20)

Opt-in Status

LiveText__Opt_in_Status__c

Text(20)

To Phone Number

LiveText__To_Phone_Number__c

Phone

Opt-In_Status

The Opt-In Status object is referenced by the LiveText__QueueMessageAction Global Method. The current opt-in / opt-out status retrieved from the Opt-In Status object is populated in the SMS Message object when a new record is created in the SMS Message object.


API Name: LiveText__SMS_Message__c
Description: Opt-in status for a given phone number. The status regards communication between the relevant LiveMessage phone number and the given phone number
Custom Fields & Relationships:

Field Label API Name Data Type

LiveText Number

LiveText__LiveText_Number__c

Lookup(LiveText Number)

Status

LiveText__Status__c

Number(1, 0)

SubscriberPhoneNumber

LiveText__SubscriberPhoneNumber__c

Phone

3.3. Schedule messages to be sent

The following method schedules messages for delivery.

LiveText__ScheduleMessageAction Global Method

Schedules messages for immediate or future delivery. Scheduled items are inserted into the SMS Schedule Object.

All fields except LiveTextNumber, ToPhoneNumber, ScheduleDate, EnforceObjectPresence, BypassOptinCheck and MessageSource are required.

Parameters

ObjectId

Type: ID
The ID for the item to be scheduled. This is used in conjunction with the ReferenceId when object presence is enforced. If a contact, lead or account record is referenced in the ObjectId field then the subsequently created record in the LiveTextScheduler object will reference the same contact, lead or account record. This reference is used later by the ScheduledMessageStatusChange process to create activity records for the appropriate contact, lead or account record. When scheduling outbound messages from Events or Tasks the Activity ID field is used to uniquely reference the Event or Task.

ReferenceId

Type: String
A unique referrer for this outbound message. This string is used by LiveMessage when identifying if a scheduled message should be updated when the object used to schedule an outbound message is modified.

Message

Type: String
The Message to send. An error will be produced when this method is called if more than 480 characters have been specified.

LiveTextNumber (Optional)

Type: String
The LiveMessage number / Channel ID from which the message will be sent. Only numbers / channel IDs configured for use with the LiveMessage environment should be specified. An error will be produced when a message is attempted to be sent if a number / channel ID other than a number / channel ID that has been configured for use with the environment is specified. If LiveTextNumber is not specified LiveMessage will select the first number / channel ID configured. If no LiveTextNumber's are configured then LiveMessage will insert a record into the LiveText Exception table.

ToPhoneNumber (Optional)

Type: String
The number / user to send the message to. If an SMS message is being sent and ToPhoneNumber is not specified, LiveMessage will attempt to retrieve the appropriate phone number to send a message to based on the ObjectID. The following logic is utilized:
If a standard or custom record is referenced via the ObjectID parameter then the ToPhoneNumber will attempt to be retrieved from a phone number field containing the word “mobile”. LiveMessage will attempt to locate this field by querying records in the following order: 1.) The object specified 2.) In a contact record linked with the object specified 3.) In a standard object linked with the object specified 4.) In a custom object linked with the object specified.
If a phone number field containing the word “mobile” cannot be located then the ToPhoneNumber will attempt to be retrieved from a phone number field containing the word “phone” by querying records in the following order: 1.) The object specified 2.) In a Contact record linked with the object specified 3.) In a Lead record linked with the object specified 4.) In a Account record linked with the object specified 5.) In a standard object linked with the object specified 6.) In a custom object linked with the object specified.
If a phone number field containing the word “phone” cannot be located then the ToPhoneNumber will attempt to be retrieved from a any phone number field by querying records in the following order: 1.) The object specified 2.) In a Contact record linked with the object specified 3.) In a Lead record linked with the object specified 4.) In a Account record linked with the object specified 5.) In a standard object linked with the object specified 6.) In a custom object linked with the object specified.
Under normal circumstances (if no custom fields have been added to standard Salesforce objects) the following phone number selection logic will apply:
If a Contact record is referenced via the ObjectID parameter then the ToPhoneNumber will attempt to be retrieved from the Contact's Mobile field first and the Contact's Phone field second.
If an Account record is referenced via the ObjectID parameter then the ToPhoneNumber will attempt to be retrieved from the Account's Phone field.
If a Lead record is referenced via the ObjectID parameter then the ToPhoneNumber will attempt to be retrieved from the Lead's Phone field.
If a Person Account record is referenced via the ObjectID parameter then the ToPhoneNumber will attempt to be retrieved from the Person Account's PersonMobilePhone field first and the Person Account's Phone field second.
If a Case record is referenced via the ObjectID parameter then LiveMessage attempts to retrieve the ToPhoneNumber from a Contact linked with the Case first. LiveMessage attempts to retrieve the ToPhoneNumber from the Contact’s Mobile field first and the Contact’s Phone field second. If a Contact is not linked with a case or no phone numbers are specified for the Contact then LiveMessage will attempt to retrieve the ToPhoneNumber from the Phone field from the Account linked with a Case.
If an Event or Task record is referenced via the ObjectID parameter then LiveMessage attempts to retrieve a phone number from the object linked to the Event or Task via the ‘Name’ field first and the ‘Related To’ field second. The same logic for retrieving phone numbers from objects detailed above applies to the objects referenced via the 'Name' and 'Related To' fields.
Under normal circumstances (if no custom fields have been added to standard Salesforce objects) the following phone number selection logic will apply:
If a Contact is linked via the ‘Name’ field then the ToPhoneNumber will attempt to be retrieved from the Contact's Mobile field first and the Contact's Phone field second.
If a Person Account is linked via the ‘Name’ field then the ToPhoneNumber will attempt to be retrieved from the Person Account's PersonMobilePhone field first and the Person Account's Phone field second.
If a Lead is linked via the ‘Name’ field then the ToPhoneNumber will attempt to be retrieved Lead's Phone field.
If an Event or Task record is referenced via the ObjectID parameter then LiveMessage attempts to retrieve a phone number from the object linked to the Event or Task via the ‘Related To’ field second:
If an Account is linked via the ‘Related to’ field then the ToPhoneNumber will attempt to be retrieved from the Account's Phone field.
If a Person Account is linked via the ‘Related to’ field then the ToPhoneNumber will attempt to be retrieved from the Person Account's PersonMobilePhone field first and the Person Account's Phone field second.
If no phone number can be retrieved for the ToPhoneNumber then LiveMessage will insert a record into the LiveMessage Exception table.

ScheduleDate (Optional)

Type: String
The date and time for when a message is scheduled to be delivered. If ScheduleDate is not specified then the message is queued for immediate delivery. (Not for use with Facebook Messenger)

EnforceObjectPresence (Optional)

Type: Boolean
If 'True' and the object specified by the ObjectId is deleted prior to the message attempting to be sent, the message will not be sent.

BypassOptinCheck (Optional)

Type: Boolean
If 'True' the message will be sent immediately without checking to see the opt-out status for the LiveTextNumber / ToPhoneNumber pair. This should only be set to 'True' when an opt-out confirmation message is sent.

MessageSource (Optional)

Type: String
If set to 'ITR' the message will appear to have been sent from the 'ITR' in the LiveMessage Console.

3.4. Queue messages to be sent

3.4.1. ScheduleMessage Process

The following process builder process is included with the LiveMessage package and is enabled by default. It is triggered after a record has been created in the SMS Schedule object. This process is used to schedule messages with the Salesforce environment if a ScheduleDate has been set when the LiveText__ScheduleMessageAction Global Method was invoked.

ScheduleMessage Process
Figure 67. ScheduleMessage Process

The following images and tables depict the details of the each process builder decision and action. The full process is repeated for each decision and action to improve readability.

ScheduleMessage Process - Decision: Has Schedule Date
ScheduleMessage Process
Figure 68. ScheduleMessage Process
ScheduleMessage Process - Decision: Has Schedule Date
Figure 69. ScheduleMessage Process - Decision: Has Schedule Date
Table 33. ScheduleMessage Process - Decision: Has Schedule Date
Field Operator Type Value

[LiveText__SMS_Schedule__c].LiveText__Schedule_Date__c

Is null

Boolean

False

ScheduleMessage Process - Action: Queue_Message
ScheduleMessage Process
Figure 70. ScheduleMessage Process
ScheduleMessage Process - Action: Queue_Message
Figure 71. ScheduleMessage Process - Action: Queue_Message
Table 34. ScheduleMessage Process - Action: Queue_Message
Field Type Value

Schedule Item Id

Reference

[LiveText__SMS_Schedule__c].Id

ScheduleMessage Process - Decision: No Schedule Date
ScheduleMessage Process
Figure 72. ScheduleMessage Process
ScheduleMessage Process - Decision: No Schedule Date
Figure 73. ScheduleMessage Process - Decision: No Schedule Date
ScheduleMessage Process - Action: Queue_Message
ScheduleMessage Process
Figure 74. ScheduleMessage Process
ScheduleMessage Process - Action: Queue_Message
Figure 75. ScheduleMessage Process - Action: Queue_Message
Table 35. ScheduleMessage Process - Action: Queue_Message
Field Type Value

Schedule Item Id

Reference

[LiveText__SMS_Schedule__c].Id

The following method is called by the ScheduleMessage Process.

LiveText__QueueMessageAction Global Method

Queues a previously scheduled item for immediate delivery by inserting a scheduled item into the SMS Message object. This subsequently triggers the SendMessage Process.

The identifier of the scheduled item is the sole variable required.

Parameters

ScheduledItemId

Type: ID
The ID for the item to be queued.

3.5. Send messages

3.5.1. SendMessage Process

The following process builder process is included with the LiveMessage package and is enabled by default. It is triggered after a record has been created in the SMS Message Object. This process is used to check the opt-in / opt-out status of the ToPhoneNumber / LiveTextNumber combination just prior to a message being sent.

SendMessage Process
Figure 76. SendMessage Process

The following images and tables depict the details of the each process builder decision and action. The full process is repeated for each decision and action to improve readability.

SendMessage Process - Decision: Is not opted out
SendMessage Process
Figure 77. SendMessage Process
SendMessage Process - Decision: Is not opted out
Figure 78. SendMessage Process - Decision: Is not opted out
Table 36. SendMessage Process - Decision: Is not opted out
Field Operator Type Value

[LiveText__SMS_Message__c].LiveText__Opt_in_Status__c

Does not equal

Number

0

SendMessage Process - Action: Send Message
SendMessage Process
Figure 79. SendMessage Process
SendMessage Process - Action: Send Message
Figure 80. SendMessage Process - Action: Send Message
Table 37. SendMessage Process - Action: Send Message
Field Type Value

Message Id

Reference

[LiveText__SMS_Message__c].ID

SendMessage Process - Decision: Is opted out
SendMessage Process
Figure 81. SendMessage Process
SendMessage Process - Decision: Is opted out
Figure 82. SendMessage Process - Decision: Is opted out
SendMessage Process - Action: Set Error Status
SendMessage Process
Figure 83. SendMessage Process
SendMessage Process - Action: Set Error Status
Figure 84. SendMessage Process - Action: Set Error Status
Table 38. SendMessage Process - Action: Set Error Status
Field Type Value

Message Id

Reference

[LiveText__SMS_Message__c].ID

Message Status

String

Error

Error Message

String

Recipient Opt-ed Out

The following methods are called by the Send Message Process.

LiveText__SendMessageAction Global Method

Sends a message by contacting LiveMessage’s servers. The content of the message and the message meta-data is data stored in the SMS Message table.

The identifier of the message is the sole variable required.

Parameters

MessageId

Type: ID
Identifier of the message.
LiveText__SetMessageStatusAction Global Method

This method is used to set the status of a previously-queued message in the SMS Message Object.

All fields except ErrorMessage are required.

Parameters

MessageId

Type: ID
Identifier for previously-queued message.

MessageStatus

Type: String
Status of message - should be one of Queued, Sent, or Error.

ErrorMessage (Optional)

Type: String
Optional error message. Only populated if MessageStatus = "Error".

3.6. Update status

LiveText__SetMessageStatusAction Global Method is called by LiveText__SendMessageAction Global Method after an attempt has been made to send a message.

3.6.1. ScheduledMessageStatusChange Process

The following process builder process is included with the LiveMessage package and is enabled by default. It is triggered after a status update has been made by the LiveText__SetMessageStatusAction Global Method to the SMS Message object. This process is used to create event activities in Salesforce for applicable leads, contacts or accounts.

ScheduledMessageStatusChange Process
Figure 85. ScheduledMessageStatusChange Process

The following images and tables depict the details of the each process builder decision and action. The full process is repeated for each decision and action to improve readability.

ScheduledMessageStatusChange Process - Decision: SMS Sent and has Account
ScheduledMessageStatusChange Process
Figure 86. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Decision: SMS Sent and has Account
Figure 87. ScheduledMessageStatusChange Process - Decision: SMS Sent and has Account
Table 39. ScheduleMessage Process - Decision: Has Schedule Date
Field Operator Type Value

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Equals

String

Sent

[LiveText__SMS_Message__c].LiveText__Account__c

Is null

Boolean

False

ScheduledMessageStatusChange Process - Action: Create completed task for Account
ScheduledMessageStatusChange Process
Figure 88. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Action: Create completed task for Account
Figure 89. ScheduledMessageStatusChange Process - Action: Create completed task for Account
Table 40. ScheduledMessageStatusChange Process - Action: Create completed task for Account
Field Type Value

Due Date Only

Reference

[LiveText__SMS_Message__c].CreatedDate

Description

Reference

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Assigned To ID

Reference

[LiveText__SMS_Message__c].OwnerId

Priority

Picklist

Normal

Status

Picklist

Completed

Subject

String

Text Message Sent

Related To ID

Reference

[LiveText__SMS_Message__c].LiveText__Account__c

ScheduledMessageStatusChange Process - Decision: SMS Sent and has Contact
ScheduledMessageStatusChange Process
Figure 90. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Decision: SMS Sent and has Contact
Figure 91. ScheduledMessageStatusChange Process - Decision: SMS Sent and has Contact
Table 41. ScheduledMessageStatusChange Process - Decision: SMS Sent and has Contact
Field Operator Type Value

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Equals

String

Sent

[LiveText__SMS_Message__c].LiveText__Contact__c

Is null

Boolean

False

ScheduledMessageStatusChange Process - Action: Create completed task for Contact
ScheduledMessageStatusChange Process
Figure 92. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Action: Create completed task for Contact
Figure 93. ScheduledMessageStatusChange Process - Action: Create completed task for Contact
Table 42. ScheduledMessageStatusChange Process - Action: Create completed task for Contact
Field Type Value

Due Date Only

Reference

[LiveText__SMS_Message__c].CreatedDate

Description

Reference

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Assigned To ID

Reference

[LiveText__SMS_Message__c].OwnerId

Priority

Picklist

Normal

Status

Picklist

Completed

Subject

String

Text Message Sent

Related To ID

Reference

[LiveText__SMS_Message__c].LiveText__Contact__c

ScheduledMessageStatusChange Process - Decision: SMS Sent and has Lead
ScheduledMessageStatusChange Process
Figure 94. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Decision: SMS Sent and has Lead
Figure 95. ScheduledMessageStatusChange Process - Decision: SMS Sent and has Lead
Table 43. ScheduledMessageStatusChange Process - Decision: SMS Sent and has Lead
Field Operator Type Value

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Equals

String

Sent

[LiveText__SMS_Message__c].LiveText__Lead__c

Is null

Boolean

False

ScheduledMessageStatusChange Process - Action: Create completed task for Lead
ScheduledMessageStatusChange Process
Figure 96. ScheduledMessageStatusChange Process
ScheduledMessageStatusChange Process - Action: Create completed task for Lead
Figure 97. ScheduledMessageStatusChange Process - Action: Create completed task for Lead
Table 44. ScheduledMessageStatusChange Process - Action: Create completed task for Lead
Field Type Value

Due Date Only

Reference

[LiveText__SMS_Message__c].CreatedDate

Description

Reference

[LiveText__SMS_Message__c].LiveText__Message_Status__c

Assigned To ID

Reference

[LiveText__SMS_Message__c].OwnerId

Priority

Picklist

Normal

Status

Picklist

Completed

Subject

String

Text Message Sent

Related To ID

Reference

[LiveText__SMS_Message__c].LiveText__Lead__c

3.7. Cancel scheduled messages from being sent

The following method is available to be called from new Process Builder processes to cancel the delivery of messages that have been scheduled.

LiveText__DeleteMessageAction Global Method

Deletes a record from the SMS Schedule Object table that matches the specified parameters.

global class DeleteSmsScheduleItem
{
    global ID ObjectId;
    global String ReferenceId;
}

Parameters

ObjectId

Type: ID
The ID for the item used to trigger the scheduled message. This is used in conjunction with the ReferenceId to identify the record in the SMS Schedule object to delete that corresponds to the scheduled message to cancel.

ReferenceId

Type: String
The unique referrer for the scheduled message to cancel. This is used in conjunction with the ObjectID to identify the record in the SMS Schedule object to delete that corresponds to the scheduled message to cancel.

4. Revision History

The following changes have been made for each release of this guide
  • V4.5

    • Added support for Facebook Messenger

    • Rebanded "LiveText" to "LiveMessage"