OpenFrame events for work items, agent presence, and interactions

  • Release version: Xanadu
  • Updated August 1, 2024
  • 1 minute to read
  • Use OpenFrame events to achieve better integration between Advanced Work Assignment (AWA) and Computer telephony integration (CTI) and aide in improved call routing.

    OpenFrame events are enabled by default when your administrator installs the Openframe plugin (com.sn_openframe) and Advanced Work Assignment for CSM plugin (com.sn_csm.awa).
    Note:
    The Advanced Work Assignment for CSM (com.sn_csm.awa) plugin is automatically installed with the Customer Service plugin (com.sn_customerservice).

    As a CTI developer, ensure that you subscribe to the following events by using the subscribe method of the openFrameAPI.​ For more information, see openFrameAPI - Client.

    Table 1. OpenFrame events
    Event Description
    openframe_awa_agent_presence Events are sent to OpenFrame when an agent's presence state changes.
    openframe_awa_workitem_offered Events are sent to OpenFrame when a work item is offered to an agent.
    openframe_awa_workitem_accepted Events are sent to OpenFrame when a work item is accepted by an agent.
    openframe_awa_workitem_rejected Events are sent to OpenFrame when a work item is rejected by an agent.
    openframe_agent_off_interaction Events are sent to OpenFrame indicating the presence of an agent on chat as off or available.

    Add and activate an OpenFrame configuration by navigating to OpenFrame > Configurations. For more information, see Create an OpenFrame configuration.

    Sample payloads

    Refer to the sample payloads for each event as described in the following table.

    Table 2. Events and their sample payloads
    Event Sample payload
    openframe_awa_agent_presence
    {
       "result":{
          "presence":{
             "name":"Available",
             "sys_id":"0b10223c57a313005baaaa65ef94f970",
             "available":true,
             "channels":[
                {
                   "name":"Case",
                   "available":true,
                   "sys_id":"d4a675e3739713004a905ee515f6a7e7",
                   "restrict_update":false
                },
                {
                   "name":"Phone",
                   "available":true,
                   "sys_id":"f6281cc39335330090813a53177ffb32",
                   "restrict_update":false
                },
                {
                   "name":"Chat",
                   "available":true,
                   "sys_id":"27f675e3739713004a905ee515f6a7c3",
                   "restrict_update":false
                }
             ]
          }
       }
    }
     
    openframe_awa_workitem_offered
    {
       "result":{
          "workItem":{
             "sys_id":"ade107591bf66410b8e3ea06624bcbce",
             "size":1,
             "serviceChannel":{
                "name":"Case",
                "sys_id":"d4a675e3739713004a905ee515f6a7e7"
             },
             "document":{
                "sys_id":"37a187591bf66410b8e3ea06624bcbef",
                "table":"sn_customerservice_case"
             }
          }
       }
    }
    
    openframe_awa_workitem_accepted
    {
       "result":{
          "workItem":{
             "sys_id":"ade107591bf66410b8e3ea06624bcbce",
             "size":1,
             "serviceChannel":{
                "name":"Case",
                "sys_id":"d4a675e3739713004a905ee515f6a7e7"
             },
             "document":{
                "sys_id":"37a187591bf66410b8e3ea06624bcbef",
                "table":"sn_customerservice_case"
             }
          }
       }
    }
    
    openframe_awa_workitem_rejected
    {
       "payload":{
          "workItem":{
             "sys_id":"66c4071d1bf66410b8e3ea06624bcb59",
             "size":1,
             "serviceChannel":{
                "name":"Case",
                "sys_id":"d4a675e3739713004a905ee515f6a7e7"
             },
             "document":{
                "sys_id":"b6a4c31d1bf66410b8e3ea06624bcb93",
                "table":"sn_customerservice_case"
             },
             "rejection":{
                "reason":"Not my expertise",
                "sys_id":"31e3fa29b38023002e7b6e5f26a8dc17"
             }
          }
       }
    }
    openframe_agent_off_interaction
    {
       "result":{
          "interaction":{
             "sys_id":"da1dc9651bbe6410b8e3ea06624bcb51",
             "number":"IMS0000050",
             "type":"chat",
             "reason":"INTERACTION_INACTIVE"
          }
       }
    }