Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
{
  "command": "session.request.incontact.addressbook",
  "target": "<session-id>",
  "data":
  {
    "realtime": true | false
  }
}

Success Response

{

Code Block
languagejson
{
  "command": " session.request.incontact.addressbook",

...


  "target": "<session-id>",

...


  "result": "success",

...


  "data":

...

Code Block
languagejson
{
  {
    "addressbooks":
    [
      {
        "name": "<address_book_name>",
        "groups":
        [
          {
            "name": "<group_name>",
            "groups": [],
            "entries": []
          }
        ],
        "entries":
        [
          {
            "name": "<entry_name>",
            "type": "external" | "agent" | "skill",
            "destinations":
            [
              {
                "label": "<destination_label>",
                "value": "<destination_value>"
              }
            ],
            "properties":
            {
              #agent_properties#
              "state": "<agent_state_name>"
              #skill_properties#
              "mediaType": "<skill_media_type>",
              #optional skill properties
              "numAvailable": <num_avail_agents>,
              "numUnavailable": <num_unavail_agents>,
              "ewt": "<estimated_wait_time>"
            }
          ]
        }
      ]
    }
  }
}

Failure Response

Code Block
languagejson
{
  "command": "session.request.incontact.addressbook",
  "target": "<session-id>",
  "result": "failure",
  "failure":
  {
    "code": "<error-code-for-failure>",
    "message": "<error-message>",
    "context": "<stack-trace-if-applicable>"
  },
  "original":
  {
    <Contains the original request JSON structure>
  }
}

...

Code Block
languagejson
{
  "command": "channel.activate",
  "target": "<session-id>.<channel-id>" |
  "<session-id>.<channel-group-id>.<channel-id>",
  "data":
  {
    "channeloptions":
    {
      "queue": "<channel-queue>"
    }
  }
}

Success Response

{

Code Block
languagejson
{
  "command": "channel.activate",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "success",

...


  "data":

...

{

<Same data contents as original request>

}


  {
    <Same data contents as original request>
  }
}

Failure Response

Code Block

{

languagejson
{
  "command": "channel.activate",

...


  "target": "<session-id>.<channel-id>" |

...

 "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "failure",

...


  "failure":

...

{


  {
    "code": "<error-code-for-failure>",

...


    "message": "<error-message>",

...


    "context": "<stack-trace-if-applicable>"

...

}


  },
  "original":

...

<Contains the original request JSON structure>


  {
    <Contains the original request JSON structure>
  }
}

Secondary Events

Activating a channel will generate the following secondary events:·      

  • channel.infochanged

...

  • state.updated

channel.deactivate

Attempts to place the channel into inactive status.  A failure is generated if the channel cannot be deactivated for some reason or is already in the inactive state.

Request

Code Block
languagejson
{

...


  "command": "channel.deactivate",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "data":

...

{


  {
    "channelOptions":

...

{


    {
      "queue": "<optional list of queues that are being deactivated>",

...


      "reason": "<optional numerical code for logout reason>"

...

}

}


    }
  }
}

Success Response

Code Block
{

...


  "command": "channel.deactivate",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "success",

...


  "data":

...

{

<Same data contents as original request>

}


  {
    <Same data contents as original request>
  }
}

Failure Response

Code Block
languagejson
{

...


  "command": "channel.deactivate",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "failure",

...


  "failure":

...

{


  {
    "code": "<error-code-for-failure>",

...


    "message": "<error-message>",

...


    "context": "<stack-trace-if-applicable>"

...

}


  },
  "original":

...

<Contains the original request JSON structure>


  {
    <Contains the original request JSON structure>
  }
}

Secondary Events

Deactivating a channel will generate the following secondary events:·      

  • channel.infochanged

...

  • state.updated

channel.ready

Attempts to place the agent into ready status on the given channel.  A failure is generated if the channel is not already in the active state or if the agent cannot be made ready on that channel.

Request

{

Code Block
languagejson
{
  "command": "channel.ready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "data": {}

...


}

Success Response

Code Block

{

languagejson
{
  "command": "channel.ready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "success",

...


  "data":

...

{

<Same data contents as original request>

}


  {
    <Same data contents as original request>
  }
}

Failure Response

Code Block
languagejson
{

...


  "command": "channel.ready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "failure",

...


  "failure":

...

{


  {
    "code": "<error-code-for-failure>",

...


    "message": "<error-message>",

...


    "context": "<stack-trace-if-applicable>"

...

}


  },
  "original":

...

<Contains the original request JSON structure>


  {
    <Contains the original request JSON structure>
  }
}

Secondary Events

Placing an agent into ready status on a channel will generate the following secondary events:·      

  • channel.infochanged

...

  • state.updated

channel.notready

Attempts to place the agent into not ready status on the given channel.  The "reasoncode" and "reasondesc" properties of the "data" request structure control the type of not ready status the agent enters.  The "reasoncode" property is required and should map to the CTI specific configuration for that agent.  The "reasondesc" property is informational is not required.  A special reason code of "acw" can be used to enter the After Call Work mode offered by many CTI platforms.  A failure is generated if the channel is not already in the active state or if the agent cannot be made not ready on that channel.

Request

{

Code Block
languagejson
{
  "command": "channel.notready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "data":

...

{


  {
    "reasoncode": "acw | <CTI-reason-code>",

...


    "reasondesc": "<Descriptive text>"

...


  }

...


}

Success Response

{

Code Block
languagejson
{
  "command": "channel.notready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "success",

...


  "data":

...

{

<Same data contents as original request>

}


  {
    <Same data contents as original request>
  }
}

Failure Response

{

Code Block
languagejson
{
  "command": "channel.notready",

...


  "target": "<session-id>.<channel-id>" |

...


  "<session-id>.<channel-group-id>.<channel-id>",

...


  "result": "failure",

...


  "failure":

...

{


  {
    "code": "<error-code-for-failure>",

...


    "message": "<error-message>",

...


    "context": "<stack-trace-if-applicable>"

...

}


  },
  "original":

...

<Contains the original request JSON structure>


  {
    <Contains the original request JSON structure>
  }
}

Secondary Events

Placing an agent into not ready status on a channel will generate the following secondary events:·      

  • channel.infochanged

...

  • state.updated

Session Management Events

...

Indicates the session has been fully initialized.  During the initialization process, the interaction processor will determine the current state of the agent based on information retrieved from the underlying switch platform.  If the agent is already logged into channels or channel groups, those items will be created and initialized prior to this message being delivered.

{

Code Block
languagejson
{
  "messageType": "objectEvent",

...


  "target": "<session_id>",

...


  "name": "session.initialized",

...


  "data": {}

...


  }

session.externalnotreadyreasons.updated

Indicates that the list of not ready reason codes available has been updated.  This event is generated as a result of session.request.externalnotreadyreasons.

{

Code Block
languagejson
{
  "messageType": "objectEvent",

...


  "target": "<session_id>",

...


  "name": "session.externalnotreadyreasons.updated",

...


  "data":

...

{


  {
    "reasonCodes":

...

[

      {


    [
      {
        "reasonCodeId": "<unique-id-of-reason>",

...


        "reasonCodeCode": "<code- of-reason>",

...


        "selectable": true|false

...


        "extensions": [],

...


        "labels":

...


        [

...

            {


          {
            "language": "en",

...


            "country": "US",

...


            "name": "<name-in-language>",

...


            "description": "<description>"

...

                              }

                        ]

},

]

}


          }
          …
        ]
      },
      …
    ]
  }
}

session.externallogoutreasons.updated

Indicates that the list of logout reason codes available has been updated.  This event is generated as a result of session.request.externallogoutreasons.

Code Block

{

languagejson
{
  "messageType": "objectEvent",

...


  "target": "<session_id>",

...


  "name": "session.externallogoutreasons.updated",

...


  "data":

...

{


  {
    "logoutReasons":

...

[

      {


    [
      {
        "logoutReasonId": "<unique-id-of-reason>",

...


        "logoutReasonCode": "<code- of-reason>",

...


        "extensions": [],

...


        "labels":

...


        [

...

            {


          {
            "language": "en",

...


            "country": "US",

...


            "name": "<name-in-language>",

...


            "description": "<description>"

...

                              }

                        ]

},

]

}


          }
          …
        ]
      },
      …
    ]
  }
}

session.incontact.agentleg.failed

Indicates that the Incontact agent leg failed to connect.

{

Code Block
languagejson
{
  "messageType": "objectEvent",

...


  "target": "<session_id>",

...


  "name": "session.incontact.agentleg.failed",

...


  "data":

...

{

...


  {
    "error": "<error_message>"

...


  }

...


}

session.incontact.addressbook.updated

Indicates that the Incontact agent leg failed to connect.

Code Block
languagejson
{

...


  "messageType": "objectEvent",

...


  "target": "<session_id>",

...


  "name": "session.incontact.addressbook.updated",

...


  "data":

...

{

...


  {
    "addressbooks":

...

                  [

                        {

...


    [
      {
        "name": "<address_book_name>",

...


        "groups":

...

                              [

...


        [
          {
            "name": "<group_name>",

...


            "groups": []

...

,
            "entries": []

...

                              ],

...


          }
        ],
        "entries":

...

                              [

...


        [
          {
            "type": "external" | "agent" | "skill",

...


            "destinations":

...

[

...


            [
              {
                "label": "<destination_label>",

...


                "value": "<destination_value>"

...

                                    ]

...


              }
            ],
            "name": "<entry_name>",

...


            "properties":

...

                                    {

...


            {
              #agent_properties#

...


              "state": "<agent_state_name>"

...


              #skill_properties#

...


              "mediaType": "<skill_media_type>",

...


              #optional skill properties

...


              "numAvailable": <num_avail_agents>,

...


              "numUnavailable": <num_unavail_agents>,

...


              "ewt": "<estimated_wait_time>"

...

                                    }

                              ]

                        }

                  ]

}


            }
          }
        ]
      }
    ]
  }
}

channel.created

Indicates a new channel has been created.  The target property will determine if this channel was created on the session, and thus a standalone channel, or if it is a member of a channel group.  This event will appear during session initialization if the agent is already logged into the channel (recovering an active session or through some other mechanism).  It will also be raised in response to a successful session.addchannel or session.addchannelgroup request.

Code Block

{

languagejson
{
  "messageType": "objectEvent",

...


  "target": "<session_id>" | "<session_id>.<channelgroup_id>",

...


  "name": "channel.created",

...


  "data":

...

{


  {
    "channel":

...

{


    {
      "id": "<channel_id>",

...


      "name": "<endpoint_name>",

...


      "type": "TELEPHONY" | "EMAIL" | "CHAT" | "<custom_type>",

...


      "modelType": "TELEPHONY" | "EMAIL" | "CHAT" | "<custom_type>"

...

}

}


    }
  }
}

channel.infochanged

Indicates a state change has occurred for the target channel.  This change can either be to the overall channel state or to the agent's availability.  A channel can be in one of three states:·      

  • INACTIVE – No agent is logged onto this channel

...

  • UNAVAILABLE – An agent other than the one associated with this session is logged into this channel

...

  • ACTIVE – The agent associated with this channel is logged into this channel

Agent availability has three components: status, reason code, and reason name.  The status indicates the general availability of the agent.  There are three main status types and a sub status for each main type:·      

  • ready – The agent is ready to received an interaction on this channel

...

  • not_ready – The agent is not ready to receive interactions on this channel

...

  • after_call_work – The agent is finalizing work related to the last interaction and is not ready to receive a new one

The "busy_" status sub type indicates that the agent is actively handling an interaction but their overall status has not changed according to the underlying switching platform.  Not all platforms will use or support the busy status sub types.

Code Block
languagejson
{

...


  "messageType": "objectEvent",

...


  "target": "<session-id>.<channel-id>" |

...

 "<session-id>.<channel-group-id>.<channel-id>",

...


  "name": "channel.infochanged",

...


  "data":

...

{


  {
    "state": "INACTIVE" | "UNAVAILABLE" | "ACTIVE",

...


    "agentStatus":

...

{


    {
      "status": "ready" | "not_ready" | "after_call_work" | "busy" | "busy_ready" | "busy_not_ready" | "busy_after_call_work",

...


      "lastReasonCode": "acw" | "<cti_reason_id>",

...


      "lastReasonName": "" | "<readable_reason_name>"

...

}

}


    }
  }
}

channel.initialized

Indicates that the channel has been fully initialized after being added to a session or channel group.  Channels are always added in the INACTIVE state.  One or more channel.infochanged events may be raised prior to channel.initialized to reflect the actual state of the channel and the agent's current availability.

...