RoutingAdapter webservice interface
General Architecture
The Routing Adapter is a component of the b+s Connects for Siebel integration product that provides an interface to Siebel, where Siebel can find a target for an unassigned activity. This can be any kind of activity such as an email, SMS, service request etc.
The Routing Adapter listens for NewTask requests from Siebel and routes them via the Cisco CCE/CCH to an available agent. During the startup process, the Routing Adapter requests all not routed tasks from Siebel to update its internal task list. When a new task is added to the Routing Adapter’s internal task list, a routing job is started which then periodically updates the task status back to Siebel.
Interface Specification
Requests
The interface between Siebel and the Routing Adapter consists of the following requests:
| Request | Response | Direction (from -> to) | Description |
|---|---|---|---|
| NewTask(Task) | Empty (Ack/Err) | Siebel -> RoutingAdapter | This request is sent by Siebel when a new task should be routed by the Routing Adapter. |
| RemoveTask(Task) | Empty (Ack/Err) | Siebel -> RoutingAdapter | This request is sent by Siebel to cancel the routing of a task that was previously sent to the Routing Adapter. |
| QueryTaskByStatus(RoutingStatus) | Task[] | RoutingAdapter -> Siebel | This request is used by the Routing Adapter at startup or fail over to get a list of all tasks in a specified state (e.g., “new”,“routing”). |
| QueryTaskById(MediaURL) | Task | RoutingAdapter -> Siebel | This request is used by the Routing Adapter at startup or fail over to get a certain task identified by its MediaURL |
| UpdateTaskById(TaskToUpdate[]) | Empty (Ack/Err) | RoutingAdapter -> Siebel | This request is used by the Routing Adapter to update a list of tasks in Siebel. |
Task Record Parameters
A task record (as used in NewTask, QueryTaskByStatus and RemoveTask) looks as follows (note that for use with RemoveTask, only the field MediaURL is mandatory):
| FieldName | Mandatory | Set by | Description |
|---|---|---|---|
| MediaURL | Yes | Siebel | Unique reference to a media item (Activity) used by the Siebel Agent Desktop to identify/display the media. (=activity ID). |
| ChannelType | Yes | Siebel | The type of the routed activity. For emails, it is “Email – Inbound”. |
| Sender | Yes | Siebel | The sender of a task. Email of the sender. |
| Destination | Yes | Siebel | The destination of a task. Email of the recipient. |
| Subject | Yes | Siebel | The subject of a task. |
| TypeSpecific1 | No | Siebel | A field with specific information that exists for the current ChannelType. For emails: Alias (= “friendly name”) of the sender. |
| TypeSpecific2 | No | Siebel | A field with specific information that exists for the current ChannelType. For emails: Alias (= “friendly name”) of the recipient. |
| TypeSpecific3 | No | Siebel | A field with specific information that exists for the current ChannelType. For emails: Not used. |
| TypeSpecific4 | No | Siebel | A field with specific information that exists for the current ChannelType. For emails: Not used. |
| TypeSpecific5 | No | Siebel | A field with specific information that exists for the current ChannelType. For emails: Not used. |
| Key1* | No | Siebel | Key for customer-specific additional field. |
| Value1 | No | Siebel | Value for customer-specific additional field. |
| Key2* | No | Siebel | Key for customer-specific additional field. |
| Value2 | No | Siebel | Value for customer-specific additional field. |
| Key3* | No | Siebel | Key for customer-specific additional field. |
| Value3 | No | Siebel | Value for customer-specific additional field. |
| Key4* | No | Siebel | Key for customer-specific additional field. |
| Value4 | No | Siebel | Value for customer-specific additional field. |
| Key5* | No | Siebel | Key for customer-specific additional field. |
| Value5 | No | Siebel | Value for customer-specific additional field. |
| MCA_PreferredAgentID** | No | Siebel/Routing Adapter | Set to empty value, reserved for later use. (If the task to route already has an owner, the agentID can be provided in this field to route the media to the same agent as last time.) |
| MCA_RouteTimeStamp** | No | Siebel/Routing Adapter | This value can be set to define at what date/time the route request should be executed. (Use default SOAP date/time format “MM/DD/YYYY HH:MM:SS”.) |
| MCA_RouteStatus** | No | Siebel/Routing Adapter | The value should be set to “00” as long as no update by the Routing Adapter has been performed. This value is used to remember the actual state of the task. |
| MCA_PreviousTaskID** | No | Routing Adapter | This value is used to match two route requests in the event of a reroute scenario. |
| MCA_RerouteReason** | No | Routing Adapter | This value will be set in case of rerouting with the reason of rerouting. |
| MCA_RerouteScript** | No | Siebel/Routing Adapter | This value can be set by Siebel, otherwise, the default ScriptSelector from ini-File should be used. In the event of rerouting, if a new script selector is used for the new route request, this value will be changed by the Routing Adapter. |
A TaskToUpdate record contains only a subset of the task record:
| FieldName | Mandatory | Description | |
|---|---|---|---|
| MediaURL | Yes | Used as a key to identify the record to update. | |
| MCA_PreferredAgentID** | No | New value for the PreferredAgentID field in the activity record. Empty string allowed. | |
| MCA_RouteTimeStamp** | No | New value for the RouteTimeStamp field in the activity record. Empty date allowed. | |
| MCA_RoutingStatus** | Yes | New value for the RoutingStatus field in the activity record. | |
| MCA_PreviousTaskID** | No | New value for the PreviousTaskID field in the activity record. Empty string allowed. | |
| MCA_RerouteReason** | No | New value for the RerouteReason field in the activity reason. Empty string allowed. | |
| MCA_RerouteScript** | No | New value for the RerouteScript field in the activity reason. Empty string allowed. |
(*) Using these fields, additional customer-specific information can be transmitted to Connects for Siebel and can be available in the Cisco UCCE script for routing decisions.
(**) These fields need to be added as customer-specific fields in the activity record in Siebel, and are stored in the activity record. Routing Adapter writes data to these fields and reads it in case of a restart or fail over of Routing Adapter to restore the internal task list.
The following keys are known by the Connects for Siebel and mapped as followed:
| Key | Value mapped in Routing Adapter to: |
|---|---|
| pv1 - pv10 | CCE/CCH peripheral variable 1 – peripheral variable 10 |
| Keys beginning with “ECC.” | CCE/CCH ECC variables |
Connects-specific Fields in “Action” Business Component
Connects for Siebel needs some additional fields in the “Action” Business Component to save and read information:
| Name | Join | Column | Pre default Value | Text Length | Type |
|---|---|---|---|---|---|
| MCA_PreferredAgentID | S_EVT_ACT_X | ATTRIB_xx | 30 | DTYPE_TEXT | |
| MCA_RouteTimeStamp | S_EVT_ACT_X | ATTRIB_xx | DTYPE_DATETIME | ||
| MCA_RoutingStatus | S_EVT_ACT_X | ATTRIB_xx | 30 | DTYPE_TEXT | |
| MCA_PreviousTaskID | S_EVT_ACT_X | ATTRIB_xx | 30 | DTYPE_TEXT | |
| MCA_RerouteReason | S_EVT_ACT_X | ATTRIB_xx | 30 | DTYPE_TEXT | |
| MCA_RerouteScript | S_EVT_ACT_X | ATTRIB_xx | 30 | DTYPE_TEXT |
Make sure to select ATTRIB fields that are not already in use!
MCA_RoutingStatus
| Code | Name | Set by | Description | Implemented in RoutingAdapter or Siebel Workflows? |
|---|---|---|---|---|
| 00 | New | Siebel Workflow | Set by Siebel Workflows for tasks that should be routed. The “NewTask” request has not been sent to the RoutingAdapter yet. | Yes |
| 01 | Routing | RoutingAdapter | RoutingAdapter received and accepted the “NewTask” request from Siebel. RoutingAdapter is now responsible for the task. | Yes |
| 02 | Routed | RoutingAdapter | The task was successfully routed to an agent. | Yes |
| 03 | Canceled | RoutingAdapter | The task was canceled with a RemoveTask request. | Yes |
| 99 | RoutingFailed | RoutingAdapter | Set by RoutingAdapter if the RoutingRequest could not be sent to UCCE and retrying makes no sense. | Yes |
Process
When Siebel decides to send a task for routing to CCE/CCH the MCA_RoutingStatus in is set to 00 (New) by Siebel Workflows.
Siebel tries to send a NewTask for all activities with MCA_RoutingStatus 00 (New).
As soon as Siebel was able to send a NewTask to the RoutingAdapter, the latter updates Siebel by using UpdateTaskById request with state MCA_RoutingStatus 01 (Routing).
When the RoutingAdapter accepts the task he fires a route request towards CCE/CCH.
When CCE/CCH finds an agent and the agent accepts the task, the RoutingAdapter updates Siebel with an UpdateTaskById with MCA_RoutingStatus 02 (Routed). There may be a write conflict if the RoutingAdapter wants to change the state of the activity and the EventHandler for the TaskStarted event wants to change the activity at the same time.
Should the selected agent reject the task, reroutes it or does not accept it (reroute on no answer, RONA) the RoutingAdapter sends another route request to CCE/CCH.
After a fail-over or restart of the RoutingAdapter, the RoutingAdapter queries Siebel for all activities in MCA_RoutingStatus 01 (Routing) by using QueryTaskByStatus and sends new route requests for these activities to CCE/CCH.
Sample Requests
NewTask
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sieb="http://bucher-suter.ch/SiebelRoutingAdapter">
<soapenv:Header/>
<soapenv:Body>
<sieb:NewTask>
<sieb:tasks>
<sieb:RoutingAdapterTask>
<sieb:ChannelType>Email - Inbound</sieb:ChannelType>
<sieb:Destination>siebel.dev@lab.lan</sieb:Destination>
<sieb:Key1></sieb:Key1>
<sieb:Key2></sieb:Key2>
<sieb:Key3></sieb:Key3>
<sieb:Key4></sieb:Key4>
<sieb:Key5></sieb:Key5>
<sieb:MCA_PreferredAgentID></sieb:MCA_PreferredAgentID>
<sieb:MCA_PreviousTaskID></sieb:MCA_PreviousTaskID>
<sieb:MCA_RerouteReason></sieb:MCA_RerouteReason>
<sieb:MCA_RerouteScript></sieb:MCA_RerouteScript>
<sieb:MCA_RouteStatus></sieb:MCA_RouteStatus>
<sieb:MCA_RouteTimeStamp></sieb:MCA_RouteTimeStamp>
<sieb:MediaURL>1-58DME</sieb:MediaURL>
<sieb:Sender>mediarouting@lab.lan</sieb:Sender>
<sieb:Subject>Test email from SOAP-UI</sieb:Subject>
<sieb:TypeSpecific1>Mediarouting</sieb:TypeSpecific1>
<sieb:TypeSpecific2>Siebel Development</sieb:TypeSpecific2>
<sieb:TypeSpecific3></sieb:TypeSpecific3>
<sieb:TypeSpecific4></sieb:TypeSpecific4>
<sieb:TypeSpecific5></sieb:TypeSpecific5>
<sieb:Value1></sieb:Value1>
<sieb:Value2></sieb:Value2>
<sieb:Value3></sieb:Value3>
<sieb:Value4></sieb:Value4>
<sieb:Value5></sieb:Value5>
</sieb:RoutingAdapterTask>
</sieb:tasks>
</sieb:NewTask>
</soapenv:Body>
</soapenv:Envelope>
RemoveTask
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:sieb="http://bucher-suter.ch/SiebelRoutingAdapter">
<soapenv:Header/>
<soapenv:Body>
<sieb:RemoveTask>
<sieb:tasks>
<sieb:RoutingAdapterTask>
<sieb:ChannelType></sieb:ChannelType>
<sieb:Destination></sieb:Destination>
<sieb:Key1></sieb:Key1>
<sieb:Key2></sieb:Key2>
<sieb:Key3></sieb:Key3>
<sieb:Key4></sieb:Key4>
<sieb:Key5></sieb:Key5>
<sieb:MCA_PreferredAgentID></sieb:MCA_PreferredAgentID>
<sieb:MCA_PreviousTaskID></sieb:MCA_PreviousTaskID>
<sieb:MCA_RerouteReason></sieb:MCA_RerouteReason>
<sieb:MCA_RerouteScript></sieb:MCA_RerouteScript>
<sieb:MCA_RouteStatus></sieb:MCA_RouteStatus>
<sieb:MCA_RouteTimeStamp></sieb:MCA_RouteTimeStamp>
<sieb:MediaURL>1-58DME</sieb:MediaURL>
<sieb:Sender></sieb:Sender>
<sieb:Subject></sieb:Subject>
<sieb:TypeSpecific1></sieb:TypeSpecific1>
<sieb:TypeSpecific2></sieb:TypeSpecific2>
<sieb:TypeSpecific3></sieb:TypeSpecific3>
<sieb:TypeSpecific4></sieb:TypeSpecific4>
<sieb:TypeSpecific5></sieb:TypeSpecific5>
<sieb:Value1></sieb:Value1>
<sieb:Value2></sieb:Value2>
<sieb:Value3></sieb:Value3>
<sieb:Value4></sieb:Value4>
<sieb:Value5></sieb:Value5>
</sieb:RoutingAdapterTask>
</sieb:tasks>
</sieb:RemoveTask>
</soapenv:Body>
</soapenv:Envelope>
QueryTaskById
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cus="http://siebel.com/CustomUI">
<soapenv:Header/>
<soapenv:Body>
<cus:QueryTaskById_Input>
<cus:MediaURL>1-1O3TY</cus:MediaURL>
</cus:QueryTaskById_Input>
</soapenv:Body>
</soapenv:Envelope>
Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns:QueryTaskById_Output xmlns:ns="http://siebel.com/CustomUI">
<NewTask xmlns="http://bucher-suter.ch/SiebelRoutingAdapter">
<tasks>
<RoutingAdapterTask>
<ChannelType>Email - Inbound</ChannelType>
<Destination>siebel.dev@lab.lan</Destination>
<MCA_PreferredAgentID/>
<MCA_PreviousTaskID/>
<MCA_RerouteReason/>
<MCA_RerouteScript/>
<MCA_RouteStatus>00</MCA_RouteStatus>
<MCA_RouteTimeStamp/>
<MediaURL>1-1O3TY</MediaURL>
<Sender>mediarouting@lab.lan</Sender>
<Subject>testmail mediarouting --> siebel.dev</Subject>
<TypeSpecific1>Mediarouting</TypeSpecific1>
<TypeSpecific2>siebel.dev</TypeSpecific2>
</RoutingAdapterTask>
</tasks>
</NewTask>
</ns:QueryTaskById_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
QueryTaskByStatus
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cus="http://siebel.com/CustomUI">
<soapenv:Header/>
<soapenv:Body>
<cus:QueryTaskByStatus_Input>
<cus:MCA_RoutingStatus>00</cus:MCA_RoutingStatus>
</cus:QueryTaskByStatus_Input>
</soapenv:Body>
</soapenv:Envelope>
Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns:QueryTaskByStatus_Output xmlns:ns="http://siebel.com/CustomUI">
<NewTask xmlns="http://bucher-suter.ch/SiebelRoutingAdapter">
<tasks>
<RoutingAdapterTask>
<ChannelType>Email - Inbound</ChannelType>
<Destination>siebel.dev@lab.lan</Destination>
<MCA_PreferredAgentID/>
<MCA_PreviousTaskID/>
<MCA_RerouteReason/>
<MCA_RerouteScript/>
<MCA_RouteStatus>00</MCA_RouteStatus>
<MCA_RouteTimeStamp/>
<MediaURL>1-1O3TO</MediaURL>
<Sender>mediarouting@lab.lan</Sender>
<Subject>testmail</Subject>
<TypeSpecific1>Mediarouting</TypeSpecific1>
<TypeSpecific2>siebel.dev</TypeSpecific2>
</RoutingAdapterTask>
</tasks>
</NewTask>
<NewTask xmlns="http://bucher-suter.ch/SiebelRoutingAdapter">
<tasks>
<RoutingAdapterTask>
<ChannelType>Email - Inbound</ChannelType>
<Destination>siebel.dev@lab.lan</Destination>
<MCA_PreferredAgentID/>
<MCA_PreviousTaskID/>
<MCA_RerouteReason/>
<MCA_RerouteScript/>
<MCA_RouteStatus>00</MCA_RouteStatus>
<MCA_RouteTimeStamp/>
<MediaURL>1-1O3TY</MediaURL>
<Sender>mediarouting@lab.lan</Sender>
<Subject>testmail mediarouting --> siebel.dev</Subject>
<TypeSpecific1>Mediarouting</TypeSpecific1>
<TypeSpecific2>siebel.dev</TypeSpecific2>
</RoutingAdapterTask>
</tasks>
</NewTask>
</ns:QueryTaskByStatus_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
UpdateTaskById
Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cus="http://siebel.com/CustomUI" xmlns:data="http://www.siebel.com/xml/UpdateTask/Data">
<soapenv:Header/>
<soapenv:Body>
<cus:UpdateTaskById_Input>
<data:ListOfUpdatetask lastpage="?" recordcount="?">
<data:Action>
<data:MediaURL>1-1O3TY</data:MediaURL>
<data:MCA_RoutingStatus>99</data:MCA_RoutingStatus>
</data:Action>
</data:ListOfUpdatetask>
</cus:UpdateTaskById_Input>
</soapenv:Body>
</soapenv:Envelope>
Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns:UpdateTaskById_Output xmlns:ns="http://siebel.com/CustomUI">
<ns:MediaURL>1-1O3TY</ns:MediaURL>
</ns:UpdateTaskById_Output>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>