AnsweredAssumed Answered

Using CTI server protocol set agent state not-ready with reason code

Question asked by huy.phan1 on Dec 29, 2016
Latest reply on Jan 4, 2017 by dekwan

I have an application that uses the cti server protocol to log the agent into the ACD and set the agent state using SET_AGENT_STATE_REQ message.  The question here is how do I send the reason code using this protocol so Finesse see the reason code the same way as Finesse instead of seeing it as -1 even when I can see from the cti server protocol the same agent state event message with the reason code to the reason code I have defined in UCCX.

 

We've defined the reason codes for not-ready and using the REST API I can see the reason codes defined as follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ReasonCodes category="NOT_READY">

    <ReasonCode>

        <uri>/finesse/api/ReasonCode/1</uri>

        <category>NOT_READY</category>

        <code>71</code>

        <label>LUNCH</label>

        <forAll>false</forAll>

    </ReasonCode>

    <ReasonCode>

        <uri>/finesse/api/ReasonCode/2</uri>

        <category>NOT_READY</category>

        <code>72</code>

        <label>IN MEETING</label>

        <forAll>false</forAll>

    </ReasonCode>

    <ReasonCode>

        <uri>/finesse/api/ReasonCode/3</uri>

        <category>NOT_READY</category>

        <code>73</code>

        <label>TRAINING</label>

        <forAll>false</forAll>

    </ReasonCode>

</ReasonCodes>

If I use the REST API and send the following PUT command

<User>

<state>NOT_READY</state>

<reasonCodeId>1</reasonCodeId>

</User>

I can see the server protocol send me an agent state event where the agentState = not-ready and the EventReasonCode=71 and when I query the user using REST api I can the following

<User>

    <dialogs>/finesse/api/User/cons8510/Dialogs</dialogs>

    <extension>8510</extension>

    <firstName>Console</firstName>

    <lastName>8510</lastName>

    <loginId>cons8510</loginId>

    <loginName>cons8510</loginName>

    <mediaType>1</mediaType>

    <pendingState></pendingState>

    <reasonCode>

        <category>NOT_READY</category>

        <code>71</code>

        <forAll>false</forAll>

        <id>1</id>

        <label>LUNCH</label>

        <uri>/finesse/api/ReasonCode/1</uri>

    </reasonCode>

    <reasonCodeId>1</reasonCodeId>

    <roles>

        <role>Agent</role>

    </roles>

    <settings>

        <wrapUpOnIncoming></wrapUpOnIncoming>

    </settings>

    <state>NOT_READY</state>

    <stateChangeTime>2016-12-29T19:29:59.896Z</stateChangeTime>

    <teamId>3</teamId>

    <teamName>MN Team 1</teamName>

    <uri>/finesse/api/User/cons8510</uri>

</User>

 

Note that I see the code = 71 and the category is NOT_READY but if I use the CTI server protocol to send the reason code 71 I get the same agent state event agent state = not-ready and the eventReasonCode=71 but when I query the user using REST API I get the following

<User>

    <dialogs>/finesse/api/User/cons8510/Dialogs</dialogs>

    <extension>8510</extension>

    <firstName>Console</firstName>

    <lastName>8510</lastName>

    <loginId>cons8510</loginId>

    <loginName>cons8510</loginName>

    <mediaType>1</mediaType>

    <pendingState></pendingState>

    <reasonCodeId>-1</reasonCodeId>

    <roles>

        <role>Agent</role>

    </roles>

    <settings>

        <wrapUpOnIncoming></wrapUpOnIncoming>

    </settings>

    <state>NOT_READY</state>

    <stateChangeTime>2016-12-29T19:34:10.245Z</stateChangeTime>

    <teamId>3</teamId>

    <teamName>MN Team 1</teamName>

    <uri>/finesse/api/User/cons8510</uri>

</User>

 

Note the reason code id is -1 instead of 71.

Outcomes