Jump to: navigation, search

CometD notifications

You can subscribe to the /v2/me/workbins topic to receive CometD notifications for the Workbins API. This topic provides messages related to workbins, including changes to workbin state and updates to workbin contents. It supports the following message types:

WorkbinSubscriptionStateChangeMessage

Property Description
data The data element is present in all CometD notifications and is the root JSON element. You can use data.messageType to identify the message and determine what other properties should be present.
data.messageType This property identifies the message type, in this case WorkbinSubscriptionStateChangeMessage.
data.workbinUserId The ID of the agent who is the owner of the workbin (this is sent to accommodate supervisor workbin management).
data.id The identifier of the workbin.
data.stateResource This property identifies the type of state resource and can have one of the following values:
  • Subscribed — The agent has subscribed to the workbin's notifications.
  • Unsubscribed — The agent has unsubscribed from the workbin's notifications.
  • RequestFailed — This is sent when a subscribe/unsubscribe operation on the workbin fails.
data.referenceId The reference identifier is used to link the notification to the original request that created it.

Example

{  
   "data":{  
      "stateResource":"Subscribed",
      "id":"aee812a5-7396-4dd9-b180-230f1c1fb085",
      "messageType":"WorkbinSubscriptionStateChangeMessage"
   }
}

WorkbinStateChangeMessage

Property Description
data The data element is present in all CometD notifications and is the root JSON element. You can use data.messageType to identify the message and determine what other properties should be present.
data.messageType This property identifies the message type, in this case WorkbinStateChangeMessage.
data.action This property identifies the action type and can have one of the following values:
  • ItemAdded — The interaction has been added to the workbin.
  • ItemRemoved — The interaction has been removed from the workbin.
data.id The identifier of the workbin.
data.chatStateResourceV2 A state resource with information about the chat interaction.
data.emailStateResourceV2 A state resource with information about the email interaction.
data.facebookStateResourceV2 A state resource with information about the facebook interaction.
data.tweetStateResourceV2 A state resource with information about the twitter interaction.
data.facebooksessionStateResourceV2 A state resource with information about the facebooksession interaction.
data.workitemStateResourceV2 A state resource with information about the workitem interaction.
data.openmediaStateResourceV2 A state resource with information about the openmedia interaction.
data.workbinAgentId Employee ID of workbin's owner.
data.workbinUserId The ID of workbin's owner.

Example

{  
   "workbinAgentId":"a1",
   "workbinUserId":"802396ae32494a8b8a617a9103d968bb",
   "messageType":"WorkbinStateChangeMessage",
   "chatStateResourceV2":{  
      "userData":{  
         "RTargetTypeSelected":"2",
         "RTargetObjectSelected":"?: 2>1",
         "RVQID":"",
         "ChatServerAppName":"esv_chat_srv",
         "ChatServerHost":"host.gws.genesys.com",
         "RTargetObjSelDBID":"",
         "ChatServerPort":"7160",
         "CBR-Interaction_cost":"",
         "CBR-contract_DBIDs":"",
         "RTargetAgentSelected":"a1",
         "CBR-IT-path_DBIDs":"",
         "ChatServerDBID":"147",
         "RTargetPlaceSelected":"a1",
         "CBR-actual_volume":"",
         "RTenant":"Environment",
         "RRequestedSkills":None,
         "RRequestedSkillCombination":"",
         "RVQDBID":"",
         "RStrategyDBID":"472",
         "CustomerSegment":"default",
         "PegAG?: 2>1":1,
         "ServiceType":"default",
         "RTargetRuleSelected":"",
         "OccuredAt":"2016-03-24T10: 52: 41Z",
         "ServiceObjective":0,
         "RTargetRequested":"?: 2>1",
         "RTargetAgentGroup":"?: 2>1",
         "RStrategyName":"CloudPoDSimpleChatInStrategy",
         "Subject":"TestChatCustomer"
      },
      "receivedDate":"2016-03-2412: 52: 39.000+0200",
      "chatType":"Inbound",
      "capabilities":[  

      ],
      "participants":[  

      ],
      "id":"0001AaBF30060015"
   },
   "action":"ItemAdded",
   "id":"cde220f0-9bd6-4fcb-8564-d539459513ed"
}
This page was last edited on October 31, 2023, at 13:32.
Comments or questions about this documentation? Contact us for support!