URAS/Fluxos
Atualizado
Isto foi útil?
Atualizado
Isto foi útil?
Isto foi útil?
GET /pbx/flow?id=text HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"_id": "63724b92c0ef93903y24dc45",
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "menu",
"component_id": "65973cd696dd0d00010bf06f",
"name": "Menu suporte",
"message": "Olá, seja bem vindo!",
"direct_access": true,
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"options": [
{
"num": 1,
"description": "Suporte SZ",
"redirect": "62794c92c0ef93903e14dc44",
"option_fail": true
}
],
"next_component": [
"65a1320de1d80724300e616d"
],
"continue": true,
"audio_after_call": "65a1320de1d80724300e616d",
"conditions": [
{
"redirect": "65973cd696dd0d00010bf06f",
"time_group_id": "65973cd696dd0d00010bf06f"
}
],
"timeout": 30,
"questions": [
{
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"valid_notes": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
]
}
]
}POST /pbx/flow HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 2672
{
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "start",
"component_id": "64dd0707e90b9ded57f91449",
"next_component": [
"64dd070ee90b9ded57f9144a"
]
},
{
"component": "menu",
"component_id": "64dd070ee90b9ded57f9144a",
"name": "Menu inicial",
"direct_access": true,
"audio_messages": [
"64dd0714e90b9ded57f9144b",
"64dd0714e90b9ded57f9144c"
],
"max_attempts": {
"value": 2,
"redirect": "64dd48361e4c6e705ac0bdab",
"timeout_between_attempts": 5,
"audios_on_retry": [
"64dd071de90b9ded57f9144d"
],
"audios_on_invalid": []
},
"options": [
{
"num": 0,
"description": "Suporte técnico especializado",
"redirect": "64dd0729e90b9ded57f9144e"
},
{
"num": 1,
"description": null,
"redirect": null
},
{
"num": 7,
"description": "Comercial",
"redirect": "64dd0747e90b9ded57f91453"
},
{
"num": 8,
"description": null,
"redirect": null
},
{
"num": 9,
"description": "Financeiro",
"redirect": "64dd075ee90b9ded57f91458"
},
{
"option_fail": true,
"description": "Falha"
}
]
},
{
"component": "audio_message",
"component_id": "64dd48361e4c6e705ac0bdab",
"audio_messages": [
"64dd48361e4c6e705ac0bdac"
],
"next_component": [
"64dd407d1e4c6e705ac0bda7"
]
},
{
"component": "campaign",
"component_id": "64dd0729e90b9ded57f9144e",
"campaign_id": "64dd0729e90b9ded57f9144f",
"next_component": [
{
"post_closure": "64dd07dbe90b9ded57f9145b",
"timeout": false
}
],
"timeout": 30
},
{
"component": "survey",
"component_id": "64dd07dbe90b9ded57f9145b",
"name": "Pesquisa Suporte",
"next_component": null,
"questions": [
{
"audio_messages": [
"64dd0a24e90b9ded57f9145c"
],
"max_attempts": {
"value": 2,
"timeout_between_attempts": 5
},
"valid_notes": [
1,
2,
3,
4,
5,
10
]
},
{
"audio_messages": [
"64dd0a24e90b9ded57f9145c"
],
"max_attempts": {
"value": 2,
"timeout_between_attempts": 5
},
"valid_notes": [
1,
2,
3,
4,
5,
10
]
}
],
"audios_thankyou": [
"64dd0aaae90b9ded57f9145d"
],
"audios_on_invalid": [
"64dd0aaae90b9ded57f9145e"
]
},
{
"component_id": "64601aebc6466181524bb648",
"component": "time_group",
"conditions": [
{
"time_group_id": "65a91505ef0e37bcc40f5831",
"redirect": "64601aebc6466181524bbab1"
},
{
"time_group_id": "65a915097505ef6384da33e2",
"redirect": "64601aebc6466181524bb444"
}
],
"next_component": "64dd072ae90b9ded57f91450"
},
{
"component": "goto",
"component_id": "64dd407d1e4c6e705ac0bda7",
"next_component": [
{
"destination": "64dd407d1e4c6e705ac0bda8",
"destination_handle": null
}
]
},
{
"component": "gogenier",
"component_id": "675af3c364175500018bb3f0",
"name": "teste",
"gogenier_account": "675af3c364175500018bb3w2",
"gogenier_agent": "f3842498-94ce-435e-9a52-c70d10b75806",
"intermediate_messages": [
"ok, um instante",
"estou verificando"
],
"playlist_id": "675af3c364175500018bb3w2",
"outputs": [
{
"condition": "equal",
"value": "#HUMAN",
"redirect": "64dd0729e90b9ded57f9144e"
},
{
"condition": "contain",
"value": "#END",
"redirect": null
}
],
"record": true,
"random_intermediate_messages": false
}
]
}{
"_id": "63724b92c0ef93903y24dc45",
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "menu",
"component_id": "65973cd696dd0d00010bf06f",
"name": "Menu suporte",
"message": "Olá, seja bem vindo!",
"direct_access": true,
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"options": [
{
"num": 1,
"description": "Suporte SZ",
"redirect": "62794c92c0ef93903e14dc44",
"option_fail": true
}
],
"next_component": [
"65a1320de1d80724300e616d"
],
"continue": true,
"audio_after_call": "65a1320de1d80724300e616d",
"conditions": [
{
"redirect": "65973cd696dd0d00010bf06f",
"time_group_id": "65973cd696dd0d00010bf06f"
}
],
"timeout": 30,
"questions": [
{
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"valid_notes": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
]
}
]
}PUT /pbx/flow HTTP/1.1
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 2705
{
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "start",
"component_id": "64dd0707e90b9ded57f91449",
"next_component": [
"64dd070ee90b9ded57f9144a"
]
},
{
"component": "menu",
"component_id": "64dd070ee90b9ded57f9144a",
"name": "Menu inicial",
"direct_access": true,
"audio_messages": [
"64dd0714e90b9ded57f9144b",
"64dd0714e90b9ded57f9144c"
],
"max_attempts": {
"value": 2,
"redirect": "64dd48361e4c6e705ac0bdab",
"timeout_between_attempts": 5,
"audios_on_retry": [
"64dd071de90b9ded57f9144d"
],
"audios_on_invalid": []
},
"options": [
{
"num": 0,
"description": "Suporte técnico especializado",
"redirect": "64dd0729e90b9ded57f9144e"
},
{
"num": 1,
"description": null,
"redirect": null
},
{
"num": 7,
"description": "Comercial",
"redirect": "64dd0747e90b9ded57f91453"
},
{
"num": 8,
"description": null,
"redirect": null
},
{
"num": 9,
"description": "Financeiro",
"redirect": "64dd075ee90b9ded57f91458"
},
{
"option_fail": true,
"description": "Falha"
}
]
},
{
"component": "audio_message",
"component_id": "64dd48361e4c6e705ac0bdab",
"audio_messages": [
"64dd48361e4c6e705ac0bdac"
],
"next_component": [
"64dd407d1e4c6e705ac0bda7"
]
},
{
"component": "campaign",
"component_id": "64dd0729e90b9ded57f9144e",
"campaign_id": "64dd0729e90b9ded57f9144f",
"next_component": [
{
"post_closure": "64dd07dbe90b9ded57f9145b",
"timeout": false
}
],
"timeout": 30
},
{
"component": "survey",
"component_id": "64dd07dbe90b9ded57f9145b",
"name": "Pesquisa Suporte",
"next_component": null,
"questions": [
{
"audio_messages": [
"64dd0a24e90b9ded57f9145c"
],
"max_attempts": {
"value": 2,
"timeout_between_attempts": 5
},
"valid_notes": [
1,
2,
3,
4,
5,
10
]
},
{
"audio_messages": [
"64dd0a24e90b9ded57f9145c"
],
"max_attempts": {
"value": 2,
"timeout_between_attempts": 5
},
"valid_notes": [
1,
2,
3,
4,
5,
10
]
}
],
"audios_thankyou": [
"64dd0aaae90b9ded57f9145d"
],
"audios_on_invalid": [
"64dd0aaae90b9ded57f9145e"
]
},
{
"component_id": "64601aebc6466181524bb648",
"component": "time_group",
"conditions": [
{
"time_group_id": "65a91505ef0e37bcc40f5831",
"redirect": "64601aebc6466181524bbab1"
},
{
"time_group_id": "65a915097505ef6384da33e2",
"redirect": "64601aebc6466181524bb444"
}
],
"next_component": "64dd072ae90b9ded57f91450"
},
{
"component": "goto",
"component_id": "64dd407d1e4c6e705ac0bda7",
"next_component": [
{
"destination": "64dd407d1e4c6e705ac0bda8",
"destination_handle": null
}
]
},
{
"component": "gogenier",
"component_id": "675af3c364175500018bb3f0",
"name": "teste",
"gogenier_account": "675af3c364175500018bb3w2",
"gogenier_agent": "f3842498-94ce-435e-9a52-c70d10b75806",
"intermediate_messages": [
"ok, um instante",
"estou verificando"
],
"playlist_id": "675af3c364175500018bb3w2",
"outputs": [
{
"condition": "equal",
"value": "#HUMAN",
"redirect": "64dd0729e90b9ded57f9144e"
},
{
"condition": "contain",
"value": "#END",
"redirect": null
}
],
"record": true,
"random_intermediate_messages": false
}
],
"_id": "63724b92c0ef93903y24dc45"
}{
"_id": "63724b92c0ef93903y24dc45",
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "menu",
"component_id": "65973cd696dd0d00010bf06f",
"name": "Menu suporte",
"message": "Olá, seja bem vindo!",
"direct_access": true,
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"options": [
{
"num": 1,
"description": "Suporte SZ",
"redirect": "62794c92c0ef93903e14dc44",
"option_fail": true
}
],
"next_component": [
"65a1320de1d80724300e616d"
],
"continue": true,
"audio_after_call": "65a1320de1d80724300e616d",
"conditions": [
{
"redirect": "65973cd696dd0d00010bf06f",
"time_group_id": "65973cd696dd0d00010bf06f"
}
],
"timeout": 30,
"questions": [
{
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"valid_notes": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
]
}
]
}DELETE /pbx/flow?id=text HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"count": 1
}GET /pbx/flow/all HTTP/1.1
Authorization: Basic username:password
Accept: */*
[
{
"_id": "63724b92c0ef93903y24dc45",
"name": "Fluxo de exemplo com 2 menus",
"flow": [
{
"component": "menu",
"component_id": "65973cd696dd0d00010bf06f",
"name": "Menu suporte",
"message": "Olá, seja bem vindo!",
"direct_access": true,
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"options": [
{
"num": 1,
"description": "Suporte SZ",
"redirect": "62794c92c0ef93903e14dc44",
"option_fail": true
}
],
"next_component": [
"65a1320de1d80724300e616d"
],
"continue": true,
"audio_after_call": "65a1320de1d80724300e616d",
"conditions": [
{
"redirect": "65973cd696dd0d00010bf06f",
"time_group_id": "65973cd696dd0d00010bf06f"
}
],
"timeout": 30,
"questions": [
{
"audio_messages": [
"62794c92c0ef93903e14dc44"
],
"max_attempts": [
{
"value": 2,
"redirect": "62794c92c0ef93903e14dc44",
"timeout_between_attempts": 1,
"audios_on_retry": [
"62794c92c0ef93903e14dc44"
],
"audios_on_invalid": [
"62794c92c0ef93903e14dc44"
]
}
],
"valid_notes": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
}
]
}
]
}
]DELETE /pbx/flow/all HTTP/1.1
Authorization: Basic username:password
Accept: */*
{
"count": 1
}