If your process requires automated outbound text messages, the TextUs package provides Visual Workflow and Process Builder apex component which can be used to create and send outbound texts.

If you have not set up your Salesforce + TextUs integration yet, please follow the steps in this guide!

Since criteria used for triggering automated messages is business specific, here we will present an example process with an emphasis on parameters of the apex component and their proper usage.

Prerequisites:

In order to enable automated sending of text messages from Salesforce, the API Key field found in Setup->Custom Settings->TextUs Next Key->Manage needs to be set with an API Token value retrieved from the TextUs Next user interface, under “Profile.” In most cases, the user used to generate this API Token should be an admin user on the Master account, which has access to sending messages from all other messaging accounts.

Navigate to Setup->Create->Workflows & Approvals->Process Builder.

Click on “New”. Then on the next screen enter the following information.

Process Name: “Automated Message Send”

Description: “Sample process for automated texting.”

Then click on “Save”.

In the process edit screen click on the “Add Object” element, select “Lead” and “when a record is created or edited”.

Then click on “Save”.

After the process is saved, click on the “Add Criteria” Element and enter the following values:

  • “Criteria Name” – Rating Hot?
  • “Criteria for Executing Actions” - Conditions are met
  • “Conditions” - Rating Equals Hot

Once you’ve entered all the data please click on “Save”.

After the process is saved, click on the “IMMEDIATE ACTIONS->Add Action” Element and enter the following values:

  • “Action Type” – Apex
  • “Action Name” - Send Text (or any name at your discretion)
  • “Apex Class” – Next Send Texts To Mapped Records

Once the action is selected the following values need to be set:

  • User Email
    Email of the user which will be sending the text message
  • Phone Number
    The phone number of the message recipient
  • Message Text
    The content of the message sent to the user
  • User Phone
    The phone number from which the message will be sent

Data Mappings (Advanced Setup)

Data mappings between TextUs App and Salesforce.com are defined with Custom Metadata Types included with the packaged application.

These Custom Metadata Types define Salesforce.com objects through which TextUs messages can be sent. Each of the three listed Custom Metadata Types defines a specific mapping context.

TextUs Contact Object Mapping Settings

TextUs Contact Object Mapping Settings define to which Salesforce.com Objects TextUs Contacts will be attached.

TextUs package provides two default TextUs Contact Object Mapping Settings mappings for Leads and for Contacts, which enable you to attach TextUs Contact records to both Lead and Contact records. Any

of the existing mappings can be deactivated by unchecking the Active checkbox on the respective TextUs Contact Object Mapping record.

TextUs package provides two custom formula fields one on Contact and one on Lead object. Both fields are called TextUs Phone (tubl__TextUs_Phone__c). These formula fields pick up all standard phone fields on both objects and fill the value for the phone number used for TextUs integration.

  • Contact formula:
    IF(!ISBLANK(MobilePhone),MobilePhone,IF(!ISBLANK(Phone),Phone,IF(!ISBLANK(HomePhone),HomePhone,IF(!ISBLANK(OtherPhone),OtherPhone,IF(!ISBLANK(AssistantPhone),AssistantPhone,'')))))
  • Lead formula:
    IF(!ISBLANK(MobilePhone),MobilePhone,IF(!ISBLANK(Phone),Phone,''))

If your organization stores cell phone numbers in a custom field and the order of priority for the fields used is different than in provided formula fields, please consult your Administrator to create different set of fields based on the template provided by package fields and set the value of the Phone Field Name to the API name of the field you are using.

If there is a need to connect any other standard or custom object to TextUs Contact records, create new mapping records, where Label must contain the mapped object API name.

If you are uncertain how to handle these mappings please contact nextsupport@textus.com!

TextUs Contact Lookup Mapping Settings

TextUs Contact Lookup Mapping Settings define available messaging contexts for Salesforce.com records having a lookup relationship to any of the Objects defined within TextUs Contact Object Mapping Settings.

The TextUs package does not provide any default TextUs Contact Lookup Mapping Settings, but if your process requires them, they can be created by your local org administrator. The Label field must contain

the mapped object API name and the Lookup Field Name must contain the API name of the field which will be used as a lookup to a object with defined TextUs Contact Object Mapping Settings.

If you are uncertain how to handle these mappings please contact nextsupport@textus.com!

TextUs Contact Junction Mapping Settings

TextUs Contact Junction Mapping Settings define available messaging contexts for Salesforce.com records having a many-to-many relationship to any of the Objects defined within TextUs Contact Object Mapping Settings. Mappings are defined by providing Junction Objects API names together with the names of the fields which are used to define the many-to-many relationship.

TextUs package provides two default TextUs Contact Junction Mapping Settings mappings for Cases and for Opportunities, which enable you to send outbound texts from Case and Opportunity records. Any of the existing mappings can be deactivated by unchecking the Active checkbox on the respective TextUs Contact Junction Mapping Settings record.

If there is a need to text from any other standard or custom object just create new mapping records, where Label must contain the mapped object API name.

If you are uncertain how to handle these mappings please contact nextsupport@textus.com!

Did this answer your question?