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:
-
Ensure Task Attributes Are Set:
Make sure your incoming messages include thefromattribute (customer’s phone number) in the task attributes. -
Build or Install a Flex Plugin:
- The plugin should listen for new tasks.
- It should check the
fromnumber 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).
-
(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
- This feature is not available out-of-the-box and requires custom development.
- For Salesforce, refer to Twilio Flex Salesforce Integration Customization Guide.
- For details on Salesforce contact objects, see Salesforce Contact Object Reference.
- For setting up relationships between Twilio Message objects and custom Salesforce objects, see Twilio Salesforce Custom Object Setup.
- If you use a different CRM, similar logic applies your plugin or integration should match the incoming phone number to your contact list and trigger the appropriate UI action.
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.