Table of content
SOPRA API
Messages for the SOPRA / AM Orchestrator interface
The bot is either triggered by a direct call or an HTML request, asking to place an outgoing call.
HTML request:
POST
https://url//api/startcall
originate=xxx
destination=yyy
email=zzzz
See https://docs.allo-media.net/bot-orchestrator/web-callback/#web-callback for full specs.
The bot orchestrator starts, and sends a first request:
{'Content-Type': 'application/json'}
{
'lang': 'fr-FR',
'userId': '',
'integrationContext': {
'WebCallbackPhoneNumber': '+33000000000',
'WebCallbackEmail': ['toto@gmail.com']
}
}
It expects an anwser, with the following fields:
{
"conversationMessages": [
{
"conversation": "63c165c0f37444001538ca92",
"type": "DEFAULT",
"content": "Bonjour, je suis Sophie de Sopra Steria, que puis-je pour vous ?",
"suggestions": [],
}, ...
]
}
- There can be multiple conversionMessages entries in the array, the content fields are concatenated (with punctuation dots). The suggestion field is added at the end.
- HTML tags are removed to ease the reading.
- If other fields are present, they are ignored. If any of these fields are missing, an error is triggered and the call is terminated.
- the field type can be set to DIALOG.KNOWLEDGE.ADVICE - in this case, the content field contains the option triggered: either a mode (digit, address, etc...) or a keyword (hangup for instance, to terminate the call)
Upon reception of the message, the content fields are processed as explained and sent to the TTS. STT is then activated, and the following message is sent back:
{
"message": {
"conversation": "the id of the conversation",
"type": "DEFAULT",
"content": "text"
}
}
At this point, we loop back and wait for the answer from NLP, and it is processed as before. The call ends when the remote party hangs up or a hangup request is sent by the NLP.