You are here:
Connect Customers to Support from an Outbound Text Campaign
If a customer sends you a text message that doesn't contain any recognized keywords, you can use MobileConnect to connect the customer to a live support agent. In this scenario, the customer first receives an automated response. When a support agent becomes available, the agent responds to the customer's question via text message.
This integration requires a Marketing Cloud Engagement org with MobileConnect and a private short or long code. The Engagement org must connect to a Service Cloud org through external client apps. The Service Cloud org must include Omni-Channel in the Service Console and have the Messaging managed package installed and configured.
Recipients see two message threads: one from the MobileConnect short or long code and one from the Service Cloud support agent code.
- In Service Cloud, create an external client app. When you choose an OAuth scope to apply to the external client app, select Perform requests on your behalf at any time (refresh_token, offline_access). When you configure the ID token, set the token to remain valid for one hour.
- In Marketing Cloud Engagement Contact Builder, create a data extension named sfToken to store tokens for reuse.
-
In the data extension, create three fields with the properties shown in this
table.
Name Data Type Length Other Properties token Text 150 — retrieve Boolean N/A Set the default value to True. issued_at Text 13 Configure the field to be nullable. - In Engagement MobileConnect, select the MID that contains the code to listen on.
- On the Administration screen, select the code and click Edit Error Messages.
-
For the unrecognized keyword response error message, add AMPscript that:
- Requests an auth token of your external client app in Service Cloud using REST API.
-
Builds the case object payload with these required fields:
status,type, andsubject. You can optionally include thepriority,origin,description, andsuppliedphonefields. - Uses the HTTPPost2() function to pass your payload and auth data to create the case.
- Outputs a message to tell the recipient that someone from support will contact them soon.
- In Service Cloud, configure Omni-Channel to accept cases and Messaging sessions.
- Route cases and Messaging sessions to the correct queue.
-
Add a button to the case object with these parameters.
- Display Type: Detail Page Button
- Behavior: Execute Javascript
- Content Source: On-Click Javascript
- Add the button to the case page layout.

