SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Opening Salesforce CRM Contacts for Incoming Twilio Flex Messages

Objective

In this guide you will see if Twilio Flex can automatically open a contact record in Salesforce when an incoming message (such as SMS) is received from a phone number that already exists in my CRM/contact list.

 

Product

Twilio Flex

 

Environment

Twilio Console

 

Procedure 

By default, Twilio Flex does not automatically "pop" or open a contact record in your CRM (such as Salesforce) when an incoming message matches a known contact's phone number. However, Flex is designed to be highly customizable, and this functionality can be implemented with a custom integration.

To achieve this, you will need to develop a Flex Plugin or use a custom integration that listens for new tasks (incoming messages) in Flex. When a new task arrives, the plugin should check if the from attribute (the sender's phone number) matches a contact in your CRM. If a match is found, the plugin can programmatically open or display the contact's details in the agent's UI, such as opening the Salesforce contact page.

Implementation Steps:

  1. Ensure Task Attributes Are Set:
    Make sure your incoming messages include the from attribute (customer’s phone number) in the task attributes.
  2. Build or Install a Flex Plugin:
    • The plugin should listen for new tasks.
    • It should check the from number against your CRM/contact database.
    • If a match is found, it should open or display the contact details in the agent’s UI (e.g., open the Salesforce contact page).
  3. (Optional) Use Studio Flows:
    If you use Twilio Studio to route messages, you can add custom attributes to the task to help with contact matching.

This approach allows you to create a seamless experience for agents, automatically surfacing relevant customer information when a message is received.

 

Additional Information

If you need further guidance on building such a plugin or integration, Twilio provides developer resources and documentation to help you get started. Please reach out Twilio Support for further assistance.

Have more questions? Submit a request
Powered by Zendesk