Using with Twilio Studio's Widgets
Overview
By default, the functionalities of the Send Message
and Send And Wait For Reply
widgets in Twilio Studio are not supported with custom channels. This limitation arises from the absence of invocation for conversation-scoped webhooks when a message is sent from Twilio Studio, a measure taken to prevent excessive invocation of webhooks.
To continue utilizing the Send Message
and Send And Wait For Reply
widgets while working with custom channels, we need to leverage the underlying concept that each message sent via these widgets will invoke a Programmable Chat webhook. This remains true even when we are implementing Twilio Conversations / Flex Conversations.
Solution Instructions
- Ensure you have Conversations Adapters deployed successfully in your Twilio Flex instance
- Login to Twilio Console and select
Explore Products
- Select
Chat
- Under
Chat Services
, click onFlex Chat Service
- Select
Webhooks
from the left-hand side menu bar and scroll down till you see thePost-Event Webhooks
section - Under
Post-Event Webhooks
section- CALLBACK URL:
https://twilio-flex-conversations-adapters-<<RANDOM NUMBER>>-dev.twil.io/api/common/studio-workaround
- CALLBACK EVENTS:
onMessageSent: Sent a Message
(You will only need this particular event)
- CALLBACK URL:
- Click on
Save
- You are now ready to leverage
Send Message
andSend And Wait For Reply
widgets in Twilio Studio without any additional modifications!
Known Limitations
- There will be a notable latency (~10s) between messages sent by Twilio Studio and receiving at the custom channel's end