Last active
April 28, 2021 19:36
-
-
Save luisleao/af86793143eebd9ba4ebc5198828b176 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "Dialogflow Connector", | |
"states": [ | |
{ | |
"name": "Trigger", | |
"type": "trigger", | |
"transitions": [ | |
{ | |
"event": "incomingMessage" | |
}, | |
{ | |
"next": "escolha_idioma_pt", | |
"event": "incomingCall" | |
}, | |
{ | |
"event": "incomingRequest" | |
} | |
], | |
"properties": { | |
"offset": { | |
"x": -30, | |
"y": -20 | |
} | |
} | |
}, | |
{ | |
"name": "connect_virtual_agent_1", | |
"type": "connect-virtual-agent", | |
"transitions": [ | |
{ | |
"event": "return" | |
}, | |
{ | |
"event": "hangup" | |
} | |
], | |
"properties": { | |
"sentiment_analysis": "false", | |
"offset": { | |
"x": -20, | |
"y": 1210 | |
}, | |
"connector": "AtendimentoProducao", | |
"language": "pt-BR", | |
"status_callback": "" | |
} | |
}, | |
{ | |
"name": "gather_1", | |
"type": "gather-input-on-call", | |
"transitions": [ | |
{ | |
"next": "seleciona_idioma", | |
"event": "keypress" | |
}, | |
{ | |
"event": "speech" | |
}, | |
{ | |
"event": "timeout" | |
} | |
], | |
"properties": { | |
"voice": "alice", | |
"number_of_digits": 1, | |
"speech_timeout": "auto", | |
"offset": { | |
"x": -140, | |
"y": 390 | |
}, | |
"loop": 1, | |
"finish_on_key": "#", | |
"say": "If you want help in English, press two.", | |
"language": "en-US", | |
"stop_gather": true, | |
"gather_language": "en", | |
"profanity_filter": "true", | |
"timeout": 5 | |
} | |
}, | |
{ | |
"name": "escolha_idioma_pt", | |
"type": "say-play", | |
"transitions": [ | |
{ | |
"next": "gather_1", | |
"event": "audioComplete" | |
} | |
], | |
"properties": { | |
"voice": "alice", | |
"offset": { | |
"x": 110, | |
"y": 180 | |
}, | |
"loop": 1, | |
"say": "Boas vindas ao atendimento do teste do Leão, se você deseja o atendimento em Português, pressione 1, ou", | |
"language": "pt-BR" | |
} | |
}, | |
{ | |
"name": "seleciona_idioma", | |
"type": "split-based-on", | |
"transitions": [ | |
{ | |
"event": "noMatch" | |
}, | |
{ | |
"next": "intro_portugues", | |
"event": "match", | |
"conditions": [ | |
{ | |
"friendly_name": "If value equal_to 1", | |
"arguments": [ | |
"{{widgets.gather_1.Digits}}" | |
], | |
"type": "equal_to", | |
"value": "1" | |
} | |
] | |
}, | |
{ | |
"next": "intro_english", | |
"event": "match", | |
"conditions": [ | |
{ | |
"friendly_name": "If value equal_to 2", | |
"arguments": [ | |
"{{widgets.gather_1.Digits}}" | |
], | |
"type": "equal_to", | |
"value": "2" | |
} | |
] | |
} | |
], | |
"properties": { | |
"input": "{{widgets.gather_1.Digits}}", | |
"offset": { | |
"x": 100, | |
"y": 640 | |
} | |
} | |
}, | |
{ | |
"name": "virtual_agent_2", | |
"type": "connect-virtual-agent", | |
"transitions": [ | |
{ | |
"event": "return" | |
}, | |
{ | |
"event": "hangup" | |
} | |
], | |
"properties": { | |
"offset": { | |
"x": 340, | |
"y": 1210 | |
}, | |
"connector": "AtendimentoProducao", | |
"language": "en" | |
} | |
}, | |
{ | |
"name": "intro_portugues", | |
"type": "say-play", | |
"transitions": [ | |
{ | |
"next": "connect_virtual_agent_1", | |
"event": "audioComplete" | |
} | |
], | |
"properties": { | |
"voice": "alice", | |
"offset": { | |
"x": 40, | |
"y": 960 | |
}, | |
"loop": 1, | |
"say": "Diga como posso ajudar você hoje.", | |
"language": "pt-BR" | |
} | |
}, | |
{ | |
"name": "intro_english", | |
"type": "say-play", | |
"transitions": [ | |
{ | |
"next": "virtual_agent_2", | |
"event": "audioComplete" | |
} | |
], | |
"properties": { | |
"voice": "alice", | |
"offset": { | |
"x": 400, | |
"y": 960 | |
}, | |
"loop": 1, | |
"say": "Please say how can I help you today", | |
"language": "en-US" | |
} | |
} | |
], | |
"initial_state": "Trigger", | |
"flags": { | |
"allow_concurrent_calls": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment