type: meya.twilio.flex.integration
class: TwilioFlexIntegration
path: /meya/twilio/flex/integration/integration.py
signature: -
Meya app setup
- Add Twilio Flex integration to your Meya app
- Get integration webhook and save for later
meya webhooks | grep twilio_flex
Twilio Flex setup
Create API Key
- Access API Key management
https://www.twilio.com/console/project/api-keys
- Create a new API Key
- Add the new SID and secret to
(@ vault.twilio.api_key_sid )
and(@ vault.twilio.api_key_secret )
respectively
Enable Flex
- Access your Twilio account
https://www.twilio.com/console
- Add account SID to
(@ vault.twilio_flex.account_sid )
- Enable Twilio Flex
https://www.twilio.com/console/flex/overview
Enable Programmable Chat webhooks
- Access Flex Channel Service created by Flex setup
- Add service SID to
(@ vault.twilio_flex.flex_chat_service )
- Go to webhooks on side menu and add Meya webhook saved earlier to "Post-Event Webhooks"
- Enable
onMessageSent
andonMediaMessageSent
Enable Task Router webhooks
- Access your Task Router Workspace
- Go to settings on side menu and add Meya webhook to
Event Callbacks
- Enable
Reservation Accepted
,Reservation Completed
,Task Canceled
andTaskQueueEntered
events
Setup Web channel
- Access Flex Messaging Settings
- Edit
web
channel - Set
INTEGRATION TYPE
toTask
- Set
TASK CHANNEL
toProgrammable Chat
Launch Twilio Flex
- Access your Flex Instance
- Inside Flex instance go to Admin > Developer setup
- Add
flexFlowSid
to(@ vault.twilio_flex.flex_flow_sid )
Fields
field | signature | required | type | default | description |
---|---|---|---|---|---|
spec | ○ | ○ | Spec | null | Override the original spec for this element |
enabled | ○ | ○ | bool | true | Enables the integration, allowing it to process events and HTTP entries |
filter | ○ | ○ | IntegrationFilter | rx_sub: true | |
verify_token | ○ | ○ | str | null | |
max_attachment_size | ○ | ○ | int | null | Controls maximum attachment size supported by the integration in bytes |
account_sid | ○ | ◉ | str | Twilio project Account SID | |
auth_token | ○ | ○ | str | null | Twilio project auth token. This field is being deprecated, switch to api_key_sid and api_key_secret as soon as possible. For more information, see https://www.twilio.com/console/project/api-keys |
api_key_sid | ○ | ○ | str | null | Twilio API Key SID. Access https://www.twilio.com/console/project/api-keys to manage API Keys. |
api_key_secret | ○ | ○ | str | null | Twilio API Key secret. Access https://www.twilio.com/console/project/api-keys to manage API Keys. |
phone_number | ○ | ○ | str | null | Twilio active number for use with Meya |
markdown | ○ | ○ | list | false | |
typing | ○ | ○ | bool | true | When set to 'False', all typing indicators received by the integration will be ignored. |
avatar | ○ | ○ | CspIntegrationAvatar | crop: circle | |
agent_command_prefix | ○ | ○ | str | "/" | |
transcript | ○ | ○ | CspIntegrationTranscript | count: 25 | |
agent | ○ | ○ | AgentSpec | name: | |
flex_flow_sid | ○ | ◉ | str | ||
flex_chat_service_sid | ○ | ◉ | str |
Examples
Basic
type: meya.twilio.flex.integration
account_sid: STRING
flex_flow_sid: STRING
flex_chat_service_sid: STRING
Full
type: meya.twilio.flex.integration
spec:
type: STRING
data:
STRING: ANY
timeout: 123
trigger_when: ANY
enabled: false
filter:
rx_sub: STRING
rx: STRING
tx: STRING
tx_pub: STRING
verify_token: STRING
max_attachment_size: 123
account_sid: STRING
auth_token: STRING
api_key_sid: STRING
api_key_secret: STRING
phone_number: STRING
markdown:
- format|linkify|breaks|typographer
typing: false
avatar:
crop: circle|square
agent_command_prefix: STRING
transcript:
count: 123
user_prefix: STRING
bot_prefix: STRING
agent_prefix: STRING
note_prefix: STRING
agent:
name: full|first|first_initial|first_last_initial|first_initial_last_initial
avatar:
image: STRING
crop: circle|square
monogram: full|first|first_initial|first_last_initial|first_initial_last_initial
flex_flow_sid: STRING
flex_chat_service_sid: STRING