Using AIML, services can chat with users automatically. When a user wants a real human, messages can be routed to a customer representative.
Use the bip_callcenter command inside the bot to handle this routing.
With this command you can:
When routing to customer services, all info collected so far by the bot can be sent to a specific endpoint via web service.
bip_callcenter: Connects to customer services. The default message is sent to the user if an error occurs.
bip_exitpattern: Used to end communication with customer services. Messages from the user go directly to customer services (external WS), not to the bot. Define the command the user must send to exit and return to the bot.
bip_callcenter_result: Informs about the status of the external WS call (true/false). If the WS connection fails or http-status-code != 200, it returns false. Use host to provide the external WS URL in AIML.
Example AIML to start a Customer Service conversation:
<aiml version='2.0' encoding='UTF-8'>
<category>
<pattern>support</pattern>
<template>
<bip_callcenter default='Your message could not be forwarded to Customer Services. Please try again later.' host="EXTERNAL_WS_URL">
<bip_exitpattern>exit</bip_exitpattern>
<bip_callcenter_result var='wscallresult' />
</bip_callcenter>
<condition var='wscallresult'>
<li value='false'><srai>EXTWS_ERROR</srai></li>
</condition>
</template>
</category>
<category>
<pattern>EXTWS_ERROR</pattern>
<template>Could not connect to Customer Services or an error occurred (http-status-code !=200).</template>
</category>
</aiml>