Handle a WebChat Contact

When a new Flex account is created, one default Flex Flow will be added to enable WebChat out of the box. You can test this out by clicking Launch in the Administrator view of the Flex UI.


At some point, you may need to handle traffic from multiple WebChats. You might be running multiple websites, or are rendering your website in multiple languages, and want to route conversations from different sources differently.

In this case, we recommend creating a separate Flex Flow for each WebChat widget/location you have.

Create a Flex Flow

Creating additional Flex Flows for the web channel is currently not possible via the UI. Use the Flex Flow API documentation for detailed documentation and examples. The simplest way is to create a new Flex Flow that points to a Studio Flow: Set IntegrationType to "studio" and specify your Studio Flow SID as the value of Integration.FlowSid.


        To implement separate handling, point this new Flex Flow to a different Studio Flow that implements the routing and handling nuances you are looking for.

        To find your account's ChatServiceSid, navigate to Proxy > Services in the Twilio Console and select the Flex Proxy Service. You should see the Chat Instance SID field in the Optional section.

        To locate your Account SID and Auth Token, navigate to your Account Dashboard (house icon in the left nav).


        The quickest way to test your new Flex Flow and the routing behind it is to open the WebChat demo widget again from the Administrator dashboard. The URL format is as follows:

        Replace the original Flex Flow SID in the URL with the SID of the new Flex Flow you want to test. Any messages you write to that new WebChat widget will be handled based on the new Flex Flow configuration.

        Maria Bermudez
        Rate this page:

        Need some help?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more