{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":200,"path":"api-reference/c_openFrameAPI.md","title":"openFrameAPI - Client","bundle":null,"doc_type":null,"release":"australia","body":"\n# openFrameAPI- Client\n\nThe openFrameAPI provides methods that interact with OpenFrame. OpenFrame is an omni-present frame that communication partners can use to integrate their systems into the ServiceNow platform.\n\nOne of the core requirements is the ability to connect and serve code from different domains that can connect seamlessly with partner subsystems. This cross domain connection is required to keep connections and callbacks registered into communication systems without any cross domain issues.\n\nOpenFrame has two significant parts. One lives in the ServiceNow application \\(referred to as TopFrame\\) and this API that is sourced from the partner application. This API has the necessary methods to communicate with TopFrame and control the visual features of the [OpenFrame](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/c_OpenFrameOverview.md).\n\n**Note:** To stay current with reference to the OpenFrame library, use the following resource URI: `https://[servicenow instance]/scripts/openframe/latest/openFrameAPI.min.js`.\n\n**Parent Topic:**[Client API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/api-client.md)\n\n## openFrameAPI - getAWAAgentPresence\\(String success, String failure\\)\n\nReturns the logged in agent’s current presence state.\n\n|Name|Type|Description|\n|----|----|-----------|\n|success|String|If the method is successful, name of the callback function to invoke.|\n|failure|String|If the method fails, name of the callback function to invoke.|\n\n<table id=\"table_abt_mgn_sbc\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\npresence\n\n</td><td>\n\nResults passed to the success callback function by the openFrame infrastructure.Data type: Object\n\n```\n\"presence\": {  \n  \"available\": Boolean, \n  \"channels\": [Array],\n  \"name\": \"String\", \n  \"sys_id\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\npresence.available\n\n</td><td>\n\nFlag that indicates whether the associated agent is available.Valid values:\n\n-   true: Agent is available.\n-   false: Agent isn't available.\n\nData type: Boolean\n\n</td></tr><tr><td>\n\npresence.channels\n\n</td><td>\n\nList of available channels of communication with the agent.Data type: Array of Objects\n\n```\n\"channels\": [\n  { \n    \"available\": Boolean,\n    \"name\": \"String\",\n    \"restrict_update\": Boolean,\n    \"service_channel_type\": \"String\",\n    \"sys_id\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\npresence.channels.available\n\n</td><td>\n\nFlag that indicates whether the channel is available.Valid values:\n\n-   true: Channel is available.\n-   false: Channel isn't available.\n\nData type Boolean\n\n</td></tr><tr><td>\n\npresence.channels.name\n\n</td><td>\n\nName of the channel, such as Chat or Phone.Data type: String\n\n</td></tr><tr><td>\n\npresence.channels.restrict\\_update\n\n</td><td>\n\nFlag that indicates whether the user can restrict updates to the channel. Valid values:\n\n-   true: User can restrict updates to the channel.\n-   false: User can't restrict updates to the channel.\n\nData type Boolean\n\n</td></tr><tr><td>\n\npresence.channels.service\\_channel\\_type\n\n</td><td>\n\nType of the service channel.Data type: String\n\n</td></tr><tr><td>\n\npresence.channels.sys\\_id\n\n</td><td>\n\nSys\\_id of the channel record.Data type: String\n\nTable: Service Channels \\[awa\\_service\\_channel\\]\n\n</td></tr><tr><td>\n\npresence.name\n\n</td><td>\n\nName of the agent's presence state.Data type: String\n\n</td></tr><tr><td>\n\npresence.sys\\_id\n\n</td><td>\n\nSys\\_id of the presence state record.Data type: String\n\nTable: Presence States \\[awa\\_presence\\_state\\]\n\n</td></tr></tbody>\n</table>The following code example shows how to call this method.\n\n```\nfunction failure(data)\n{\n  console.log(\"failure: \" + JSON.stringify(data));\n}\n \nfunction success(data)\n{\n  console.log(\"success: \" + JSON.stringify(data));\n}\n \nopenFrameAPI.getAWAAgentPresence(success, failure)\n```\n\nResponse to success callback function:\n\n```\nsuccess: { \n  \"presence\": { \n    \"name\": \"Available\", \n    \"sys_id\": \"0b10223c57a313005baaaa65ef94f970\", \n    \"available\": true, \n    \"channels\": [ \n      { \n        \"name\": \"Chat\", \n        \"available\": true, \n        \"sys_id\": \"27f675e3739713004a905ee515f6a7c3\", \n        \"restrict_update\": false, \n        \"service_channel_type\": \"chat\" \n      } \n    ] \n  } \n}\n```\n\n## openFrameAPI - hide\\(\\)\n\nHides the OpenFrame in the TopFrame.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.hide()\n```\n\n## openFrameAPI - init\\(Object config, function successCallback, function failureCallback\\)\n\nInitializes OpenFrame. This must be the first method that you call.\n\nThis method initializes communication to TopFrame and initializes any visual elements passed in the **config** parameter.\n\n<table id=\"table_vz3_jyw_kt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nconfig\n\n</td><td>\n\nObject\n\n</td><td>\n\nName-value pairs to use during the initialization process.Possible keys:\n\n-   height\n-   subTitle\n-   title\n-   titleIcon\n-   width\n\nAll keys are optional. Pass an empty object if you don't want to set these key-value pairs.\n\n</td></tr><tr><td>\n\nsuccessCallback\n\n</td><td>\n\nfunction\n\n</td><td>\n\nName of the callback function to use if the init method succeeds. The [OpenFrame configuration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/t_CreateAnOpenFrameConfiguration.md) stored in the system is passed as a parameter to the callback function.\n\n</td></tr><tr><td>\n\nfailureCallback\n\n</td><td>\n\nfunction\n\n</td><td>\n\nName of the callback function to use if the init method fails.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nvar config = {\nheight: 300,\nwidth: 200\n}\nfunction handleCommunicationEvent(context) {\nconsole.log(\"Communication from Topframe\", context);\n}\nfunction initSuccess(snConfig) {\nconsole.log(\"openframe configuration\", snConfig);\n//register for communication event from TopFrame\nopenFrameAPI.subscribe(openFrameAPI.EVENTS.COMMUNICATION_EVENT,\nhandleCommunicationEvent);\n}\nfunction initFailure(error) {\nconsole.log(\"OpenFrame init failed...\", error);\n}\nopenFrameAPI.init(config, initSuccess, initFailure);\n```\n\n## openFrameAPI - isVisible\\(function callback\\)\n\nChecks to see if the OpenFrame is visible in the TopFrame.\n\n|Name|Type|Description|\n|----|----|-----------|\n|callback|function|The callback function receives a parameter with a value of true or false. True if OpenFrame is visible and false if not visible.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nfunction callback(isVisible) {\nconsole.log(isVisible)\n}\nopenFrameAPI.isVisible(callback)\n```\n\n## openFrameAPI - openCustomURL\\(String details\\)\n\nOpens a custom URL in the UI16 interface.\n\n<table id=\"table_ob3_ryd_lt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nUrl\n\n</td><td>\n\nString\n\n</td><td>\n\nText of the custom URL.Maximum size: 2083 characters\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.openCustomURL('10_cool_things.do');\n\n```\n\n## openFrameAPI - openServiceNowForm\\(Object details\\)\n\nOpens a form URL.\n\nWhen an agent receives an incoming call, the OpenFrame window displays information such as the account, contact, or consumer. Clicking a link in the OpenFrame window displays the corresponding record.\n\n-   In the platform interface, this API opens a form URL in TopFrame.\n-   For Agent Workspace, this API supports interaction tab management. In Agent Workspace, an interaction record opens in a parent tab and the specified entity record opens in a child tab under the interaction tab.\n\n<table id=\"table_ulq_vwd_lt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndetails\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs that identify the form URL to open. ```\n\"details\": {\n  \"entity\": \"String\";\n  \"interaction_sys_id\": \"String\";\n  \"query\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\ndetails.entity\n\n</td><td>\n\nString\n\n</td><td>\n\nTable or entity name.\n\n</td></tr><tr><td>\n\ndetails.interaction\\_sys\\_id\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Sys\\_id of the interaction record to open as parent tab in Agent Workspace.**Note:** In the platform interface the **interaction\\_sys\\_id** is ignored.\n\n</td></tr><tr><td>\n\ndetails.query\n\n</td><td>\n\nString\n\n</td><td>\n\nQuery to identify the record to open, such as: `query:'sys_id=<record_sys_id>'`.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\nThe following example shows basic usage in platform:\n\n```\nopenFrameAPI.openServiceNowForm({entity:'customer_account', \nquery:'sys_id=447832786f0331003b3c498f5d3ee452', 'interaction_sys_id':'3be092313b711300758ce9b534efc4dd'});\n```\n\nThe following example shows how to use the **query** parameter to create a new record with data provided in the form by using sysparm\\_query and an encoded query to populate the first and last name fields in Workspace:\n\n```\nopenFrameAPI.openServiceNowForm({ entity: 'sys_user',\nquery: 'sys_id=-1&sysparm_query=first_name=Ivan^last_name=Greggor' });\n```\n\n## openFrameAPI - openServiceNowFormwithChildTab\\(\\)\n\nOpens a ServiceNow form with a child tab if invoked in a workspace or opens an entity if invoked in the UI16 interface.\n\n<table id=\"table_j13_hwv_hyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nopenServiceNowFormwithChildTab\n\n</td><td>\n\nObject\n\n</td><td>\n\nDefines if the API opens a ServiceNow form with a child tab if invoked in a workspace or opens an entity if invoked in the UI16 interface.```\nopenFrameAPI.openServiceNowFormwithChildTab({\n  entity: \"String\",\n  sys_id: String\", \t\n  parent_entity: \"String\",\t\n  parent_entity_sys_id: \"String\"\n})\n```\n\n</td></tr><tr><td>\n\nopenServiceNowFormwithChildTab.entity\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the table that contains the record to open.\n\n</td></tr><tr><td>\n\nopenServiceNowFormwithChildTab.sys\\_id\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the record to open.\n\n</td></tr><tr><td>\n\nopenServiceNowFormwithChildTab.parent\\_entity\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the table to open as a parent tab.\n\n</td></tr><tr><td>\n\nopenServiceNowFormwithChildTab.parent\\_entity\\_sys\\_id\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the parent record to open.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThe following example opens the parent entity as a parent tab on a configured workspace, or opens just the entity if invoked in UI16.\n\n```\nopenFrameAPI.openServiceNowFormwithChildTab({\n  entity: \"customer_account\", \n  sys_id: \"447832786f0331003b3c498f5d3ee452\", \t\n  parent_entity: \"interaction\", \n  parent_entity_sys_id: \"3be092313b711300758ce9b534efc4dd\"\n});\n```\n\n## openFrameAPI - openServiceNowList\\(Object details\\)\n\nOpens a list URL in the UI16 interface.\n\n<table id=\"table_fpq_5xd_lt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndetails\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey value pairs that describe the content to use when opening the list URL.Valid values:\n\n-   entity: Table name\n-   query: [Encoded query string](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/c_EncodedQueryStrings.md)\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.openServiceNowList({entity:'case', query:'active=true'});\n```\n\n## openFrameAPI - setFrameMode\\(mode\\)\n\nSets the OpenFrame mode.\n\nThe mode passed in this API:\n\n-   Sets the appropriate icon in the header: collapse or expand\n-   Raises the relevant event for CTI:\n    -   openFrameAPI.EVENTS.COLLAPSE\n    -   openFrameAPI.EVENTS.EXPAND\n\n<table id=\"table_yzb_mxx_kt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nMode\n\n</td><td>\n\nString\n\n</td><td>\n\nSet OpenFrame Mode. Enumerated options:1.  openFrameAPI.FRAME\\_MODE.COLLAPSE\n2.  openFrameAPI.FRAME\\_MODE.EXPAND\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setFrameMode(openFrameAPI.FRAME_MODE.COLLAPSE);\n\n```\n\n## openFrameAPI - setHeight\\(height\\)\n\nSets the OpenFrame height.\n\n|Name|Type|Description|\n|----|----|-----------|\n|Height|Number|Height in pixels|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setHeight(100);\n```\n\n## openFrameAPI - setICContext\\(String Type, Object &lt;Context&gt;\\)\n\nSets the context data related to the interaction controls on the client. Use this context data to determine the client UI to display in OpenFrame.\n\nFor additional information on interactive controls, see [Interaction Controls Component \\(ICC\\) for voice calls](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/contact-center-integration-with-icc.md).\n\nFor additional information on interaction records, see [CSM voice interaction record page](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/csm-native-voice-record-page.md).\n\n<table id=\"table_xlq_rhg_zdc\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n&lt;Context&gt;\n\n</td><td>\n\nObject\n\n</td><td>\n\nContext data to set. Each context data type is a unique set of input data.Valid **Context** data objects:\n\n-   `activeCall`\n-   `activeConversation`\n-   `idleState`\n-   `offerContext`\n-   `searchTargetList`\n\n</td></tr><tr><td>\n\nactiveCall\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nContext details about an active call. Each object represents an ongoing active call.```\n\"activeCall\": [\n  { \n    \"callbackContext\": {Object},\n    \"currentParticipant\": {Object},\n    \"customPayload: {Object},\n    \"direction\": \"String\",\n    \"externalId\": \"String\",\n    \"nowRecordId\": \"String\",\n    \"nowRecordTable\": \"String\",\n    \"participants\": [Array],\n    \"type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext\n\n</td><td>\n\nObject\n\n</td><td>\n\nOnly used if the **activeCall.type** property is `callback`. Callback context information for the ongoing callback component.```\n\"callbackContext\": {\n  \"callAttemptedByAgent\": Boolean,\n  \"callbackNumbers\": [Array],\n  \"closeInEndTime\": \"String\",\n  \"customerName\": \"String\",\n  \"dialInEndTime\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext.callAttemptedByAgent\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether callback was attempted by a customer service agent.Valid values:\n\n-   true: The callback was attempted by a customer service agent. If true, set **closeInEndTime**.\n-   false: The callback wasn’t attempted by a customer service agent. If false, set **dialInEndTime**.\n\nDefault: False\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext.callbackNumbers\n\n</td><td>\n\nArray\n\n</td><td>\n\nList of phone numbers provided as strings.\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext.closeInEndTime\n\n</td><td>\n\nString\n\n</td><td>\n\nSet only if **callAttemptedByAgent** is true. End time for callback in UTC format.\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext.customerName\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the customer.\n\n</td></tr><tr><td>\n\nactiveCall.callbackContext.dialInEndTime\n\n</td><td>\n\nString\n\n</td><td>\n\nSet only if **callAttemptedByAgent** is false and the type of callback is auto-dial. Dial-in end time for callback in UTC format.\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant\n\n</td><td>\n\nObject\n\n</td><td>\n\nRequired. Details about the current participant's call capabilities and call status.```\n\"currentParticipant\": {\n  \"actor\": \"String\",\n  \"callStartTime\": \"String\",\n  \"capabilities\": {Object},\n  \"connectedTime\": \"String\",\n  \"custom-capability-state-1\": Boolean,\n  \"flagged\": Boolean,\n  \"held\": Boolean,\n  \"id\": \"String\",\n  \"muted\": Boolean,\n  \"name\": \"String\",\n  \"paused\": Boolean,\n  \"recording\": \"String\",\n  \"state\": \"String\",\n  \"wrapUP\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​actor\n\n</td><td>\n\nString\n\n</td><td>\n\nType of participant on the call.Valid values:\n\n-   agent\n\n**Note:** Other participant types to be added in the future.\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​callStartTime\n\n</td><td>\n\nString\n\n</td><td>\n\nDate and time that the call started.Time standard: UTC\n\nFormat: RSS - \"&lt;day of week&gt;, dd mmm yyyy hh:MM:ss GMT\". For example: \"Wed, 17 Dec 2024 05:23:41 GMT\"\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the capabilities that the current \\(agent\\) participant can perform during a call. The associated icons appear in the Active call component for the capabilities that are enabled.\\[Omitted image \"OF-active\\_call-capabilities.png\"\\] Alt text: Screen shot of Active call component with capabilities icons\n\n```\n\"capabilities\": {\n  \"callbackTransferStatus\": \"String\",\n  \"cancelCallbackTransferEligible\": Boolean,\n  \"closeCallback\": Boolean,\n  \"dtmf\": Boolean,\n  \"endCall\": Boolean,\n  \"flag\": Boolean,\n  \"hold\": Boolean,\n  \"initiateCall\": Boolean,\n  \"leaveAndTransfer\": Boolean,\n  \"mergeCall\": Boolean,\n  \"mute\": Boolean,\n  \"resumeRecording\": Boolean,\n  \"pauseRecording\": Boolean,\n  \"startRecording\": Boolean,\n  \"stopRecording\": Boolean,\n  \"transfer\": Boolean\n}\n```\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.callbackTransferStatus\n\n</td><td>\n\nString\n\n</td><td>\n\nCCaaS \\(Contact Center as a Service\\) callback transfer status.Possible values:\n\n-   Failed\n-   Empty string \\(default\\)\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.cancelCallbackTransferEligible\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates if the cancel callback transfer option is enabled.Valid values:\n\n-   true: Cancel callback transfer option is enabled.\n-   false: Cancel callback transfer option is disabled.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.closeCallback\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the close callback button is enabled.Valid values:\n\n-   true: Close callback button is enabled.\n-   false: Close callback button is disabled.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​dtmf\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the agent has dual tone multi-frequency \\(DTMF\\) capability for the current call.Valid values:\n\n-   true: Participant has DTMF capability.\n-   false: Participant doesn't have DTMF capability.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​endCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the associated participant can end the call.Valid values:\n\n-   true: Participant can end the call. The end call button is enabled in the UI.\n-   false: Participant can't end the call. The end call button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​flag\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can flag the call for quality issues, such as voice quality problems.Valid values:\n\n-   true: Participant can flag problem calls.\n-   false: Participant can't flag problem calls.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​hold\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can put the call on hold.Valid values:\n\n-   true: Participant can put the call on hold. The hold button is enabled in the UI.\n-   false: Participant can't put the call on hold. The hold button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​initiateCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the associated participant can start the call.Valid values:\n\n-   true: Participant can start the call. The initiate call button is enabled in the UI.\n-   false: Participant can't start the call. The initiate call button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​leaveAndTransfer\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can transfer the call to another agent and then drop off the call. Enable this capability for actions such as consult transfers, where the user who is consulted is not the owner of the call.Valid values:\n\n-   true: Participant can transfer and drop off the call.\n-   false: Participant can't transfer and drop off the call.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​mergeCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can merge the call. Use this capability when the participant's call legs are capable of merging.Valid values:\n\n-   true: Participant can merge the call. The merge button is enabled in the UI.\n-   false: Participant can't merge the call. The merge button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​mute\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can mute the call.Valid values:\n\n-   true: Participant can mute the call. The mute button is enabled in the UI.\n-   false: Participant can't mute the call. The mute button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​pauseRecording\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can pause recording the call.Valid values:\n\n-   true: Participant can pause recording the call. The pause recording button is enabled in the UI.\n-   false: Participant can't pause recording the call. The pause recording button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​resumeRecording\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can resume recording the call.Valid values:\n\n-   true: Participant can resume recording the call. The pause recording button is enabled in the UI.\n-   false: Participant can't resume recording the call. The pause recording button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​startRecording\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can start recording the call.Valid values:\n\n-   true: Participant can start recording the call. The recording button is enabled in the UI.\n-   false: Participant can't start recording the call. The recording button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​stopRecording\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can stop recording the call.Valid values:\n\n-   true: Participant can stop recording the call. The stop recording button is enabled in the UI.\n-   false: Participant can't stop recording the call. The stop recording button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​capabilities.​transfer\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can transfer the call.Valid values:\n\n-   true: Participant can transfer the call. The transfer button is enabled in the UI.\n-   false: Participant can't transfer the call. The transfer button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​connectedTime\n\n</td><td>\n\nString\n\n</td><td>\n\nDate and time that the call initially connected.Time base: UTC\n\nFormat: RSS - \"&lt;day of week&gt;, dd mmm yyyy hh:MM:ss GMT\". For example: \"Wed, 17 Dec 2024 05:23:41 GMT\"\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​custom-capability-state-1\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether there are any current participants on the call.Valid values:\n\n-   true: Current participants on the call.\n-   false: No current participants on the call.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​flagged\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the call is flagged for an issue, such as a voice quality issue.Valid values:\n\n-   true: Call has been flagged for an issue.\n-   false: Call hasn't been flagged for an issue.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​held\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the participant’s held state.Valid values:\n\n-   true: Participant is on-hold.\n-   false: Participant isn't on-hold.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​id\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Sys\\_id of the associated participant record, such as the sys\\_id of the agent.Table: User \\[sys\\_user\\]\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​muted\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the participant’s muted state.Valid values:\n\n-   true: Participant is muted.\n-   false: Participant isn't muted.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​name\n\n</td><td>\n\nString\n\n</td><td>\n\nParticipant's name.\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​paused\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the participant’s paused state.Valid values:\n\n-   true: Participant is paused.\n-   false: Participant isn't paused.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​recording\n\n</td><td>\n\nString\n\n</td><td>\n\nCurrent recording state of the call.Valid values:\n\n-   in\\_progress\n-   none\n\n</td></tr><tr><td>\n\nactiveCall.currentParticipant.​wrapUP\n\n</td><td>\n\nObject\n\n</td><td>\n\nFuture use.\n\n</td></tr><tr><td>\n\nactiveCall.customPayload\n\n</td><td>\n\nObject\n\n</td><td>\n\nCustom payload to pass to OpenFrame as part of OpenFrame events. This is a free-form object and can contain any data needed to customize the active call component, such as adding buttons or text.\n\n</td></tr><tr><td>\n\nactiveCall.direction\n\n</td><td>\n\nString\n\n</td><td>\n\nDirection of the call for the associated participant.Valid values:\n\n-   inbound\n-   outbound\n\n</td></tr><tr><td>\n\nactiveCall.externalId\n\n</td><td>\n\n \n\n</td><td>\n\nRequired. Unique value that identifies the current active call on the associated external system.\n\n</td></tr><tr><td>\n\nactiveCall.​nowRecordId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Sys\\_id of the active call record.Table: Interaction \\[interaction\\] Only supported option for base system.\n\n</td></tr><tr><td>\n\nactiveCall.​nowRecordTable\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Table to which the active call belongs. Table: Interaction \\[interaction\\] Only supported option for base system.\n\n</td></tr><tr><td>\n\nactiveCall.​participants\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nRequired. List of the additional participants on the call. A participant can be an agent, a customer, an external person who is not an agent or a customer, or a queue.```\n\"participants\": [\n  {\n    \"actor\": \"String\",\n    \"ani\": \"String\",\n    \"address\": \"String\",\n    \"capabilities\": {Object},\n    \"callStartTime\" \"String\",\n    \"connectedTime\": \"String\",\n    \"customPayload\": {Object},\n    \"dnis\": \"String\",\n    \"held\": Boolean,\n    \"heldAtTime\": \"String\",\n    \"id\": \"String\",\n    \"muted\": Boolean,\n    \"name\": \"String\",\n    \"requestACW\": Boolean,\n    \"requireWrapup\": Boolean,\n    \"state\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​actor\n\n</td><td>\n\nString\n\n</td><td>\n\nType of actor for the associated participant. For example:\n\n-   agent\n-   customer\n-   external\n-   queue\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​address\n\n</td><td>\n\nString\n\n</td><td>\n\nParticipant's telephone number.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​ani\n\n</td><td>\n\n \n\n</td><td>\n\nAutomatic number identification. Telephone number to display to the receiver of the phone call.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​capabilities\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the type of capabilities that the participant has for the associated call.```\n\"capabilities\": {\n  \"endCall\": Boolean,\n  \"hold\": Boolean,\n  \"mute\": Boolean\n}\n```\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​capabilities.​endCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the associated participant can end the call.Valid values:\n\n-   true: Participant can end the call. The end call button is enabled in the UI.\n-   false: Participant can't end the call. The end call button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​capabilities.​hold\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can put the call on hold.Valid values:\n\n-   true: Participant can put the call on hold. The hold button is enabled in the UI.\n-   false: Participant can't put the call on hold. The hold button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​capabilities.​mute\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the participant can mute the call.Valid values:\n\n-   true: Participant can mute the call. The mute button is enabled in the UI.\n-   false: Participant can't mute the call. The mute button is disabled in the UI.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​connectedTime\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Date and time that the participant initially connected to the call.Time standard: UTC\n\nFormat: RSS - \"&lt;day of week&gt;, dd mmm yyyy hh:MM:ss GMT\". For example: \"Wed, 17 Dec 2024 05:23:41 GMT\"\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​customPayload\n\n</td><td>\n\nObject\n\n</td><td>\n\nCustom payload to pass to OpenFrame as part of Open Frame custom events. This is a free-form object and can contain any data needed to customize the Active call component, such as adding buttons or text.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​dnis\n\n</td><td>\n\nString\n\n</td><td>\n\nDialed Number Identification Service. Telephone number the participant dialed.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​held\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the participant’s held state.Valid values:\n\n-   true: Participant is on-hold.\n-   false: Participant isn't on-hold.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​heldAtTime\n\n</td><td>\n\nString\n\n</td><td>\n\nDate and time that the participant's connection to the call was put on hold.Time base: UTC\n\nFormat: RSS - \"&lt;day of week&gt;, dd mmm yyyy hh:MM:ss GMT\". For example: \"Wed, 17 Dec 2024 05:23:41 GMT\"\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​id\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Participant's unique ID from the Contact Center as a Service \\(CCaaS\\) system.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​muted\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the participant’s mute state.Valid values:\n\n-   true: Participant is muted.\n-   false: Participant isn't muted.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the participant.\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​requestACW\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFor agent use case only - only valid when the **activeCall.currentParticipant.actor** is \"agent\".Flag that indicates whether the participant is to follow up with the customer.\n\nValid values:\n\n-   true: Follow-up required.\n-   false: No follow-up required.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​requireWrapup\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFor agent use case only - only valid when the **activeCall.currentParticipant.actor** is \"agent\".Flag that indicates whether to display the **Wrap up** component once the call is complete.\n\n\\[Omitted image \"OF-active\\_call-wrapup.png\"\\] Alt text: Screen shot of Wrap up component\n\nValid values:\n\n-   true: Display the **Wrap up** component at call completion.\n-   false: Don't display the **Wrap up** component at call completion.\n\nDefault: false\n\n</td></tr><tr><td>\n\nactiveCall.​participants.​state\n\n</td><td>\n\nString\n\n</td><td>\n\nState of the participant's call leg. Appears beneath the phone number in the **Active call** component.\\[Omitted image \"OF-active\\_call-state.png\"\\] Alt text: Active call window showing state\n\nThis can be any meaningful text, such as:\n\n-   Alerting\n-   Connected\n-   Ringing\n\n</td></tr><tr><td>\n\nactiveCall.type\n\n</td><td>\n\nString\n\n</td><td>\n\nType of call.Valid values:\n\n-   call\n-   callback\n\n**Note:** If set, you must include the **activeCall.callbackContext** object details.\n\n-   voicemail\n\n</td></tr><tr><td>\n\nactiveConversation\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nContext details about an active conversation. Each object represents an ongoing messaging interaction.\n\n```\n\"activeConversation\": [\n { \n  \"externalId\": \"String\",\n  \"nowRecordId\": \"String\", \n  \"nowRecordTable\": \"String\",  \n  \"wrapUpRequired\": Boolean \n }\n]\n```\n\n</td></tr><tr><td>\n\nactiveConversation.nowRecordId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Sys\\_id of the active call record.Table: Interaction \\[interaction\\] Only supported option for base system.\n\n</td></tr><tr><td>\n\nactiveConversation.nowRecordTable\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Table to which the active call belongs.Table: Interaction \\[interaction\\] Only supported option for base system.\n\n</td></tr><tr><td>\n\nactiveConversation.wrapupRequired\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether to display the **Wrap up** component once the agent leaves the chat.Valid values:\n\n-   true: Display the Wrap up component once agent leaves the chat.\n-   false: Don't display the Wrap up component while agent leaving the chat.\n\nDefault: false\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue\n\n</td><td>\n\nObject\n\n</td><td>\n\nContainer for all outbound queue selection data and available queue options.```\n\"outboundQueue\": {\n \"currentSelectedQueue\": {Object},\n \"targets\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.currentSelectedQueue\n\n</td><td>\n\nObject\n\n</td><td>\n\nRepresents the queue currently selected by the agent. Stores the agent's active queue choice.```\n\"currentSelectedQueue\": {\n      \"label\": \"String\",\n      \"id\": \"String\"\n    }\n```\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.currentSelectedQueue.id\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique identifier for the currently selected queue. For example: `\"queueId1\"`.\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.currentSelectedQueue.label\n\n</td><td>\n\nString\n\n</td><td>\n\nDisplay name of the currently selected queue. For example: `\"Account Support\"`.\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.targets\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nArray of queue objects representing all available queue options the agent can select from.```\n\"targets\": [\n {\n  \"label\": \"String\",\n  \"id\": \"String\"\n }\n]\n```\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.targets.id\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique identifier for the queue option. For example: `\"queueId2\"`.\n\n</td></tr><tr><td>\n\nagentSettings.outboundQueue.targets.label\n\n</td><td>\n\nString\n\n</td><td>\n\nDisplay name of the queue option. For example: `\"Billing Support\"`.\n\n</td></tr><tr><td>\n\nidleState\n\n</td><td>\n\nObject\n\n</td><td>\n\nDescribes the idle state context of the agent. This context data determines the information that appears on the dial pad when an agent is waiting for a call and the capabilities they have through this dial pad.```\nidleState {\n \"capability\": {Object},\n \"currentInboundId\": \"String\",\n \"dialpadInfoMessage\": {Object},\n \"enableState\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nidleState.capability\n\n</td><td>\n\nObject\n\n</td><td>\n\nDescription of the current user's idle state capabilities.```\n\"capability\": {\n  \"globalContactSearch\": Boolean,\n  \"logOut\": Boolean,\n  \"outBoundCall\": Boolean,\n  \"phoneDirectory\": Boolean,\n  \"outboundQueueSelection\": Boolean,\n}\n```\n\n</td></tr><tr><td>\n\nidleState.capability.​globalContactSerarch\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether to display the global contact list while in the idle state.Valid values:\n\n-   true: Display the global contact list.\n-   false: Don't display the global contact list.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.capability.​logOut\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the user can logout while in the idle state.Valid values:\n\n-   true: User can log out when the call is idle. The log out button appears on the dial pad.\n-   false: User can't log out when the call is idle.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.capability.​outBoundCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the user can make an outbound call while in the idle state.Valid values:\n\n-   true: User can make an outbound call when the call is idle.\n-   false: User can't make an outbound call when the call is idle.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.capability.outboundQueueSelection\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the outbound queue selection field should be enabled.Valid values:\n\n-   true: Display the outbound queue selection field while in the idle state.\n-   false: Don't display the outbound queue selection field while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.capability.phoneDirectory\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the phone directory button should be enabled.Valid values:\n\n-   true: Display the phone directory button while in the idle state.\n-   false: Don't display the phone directory button while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.​currentInboundId\n\n</td><td>\n\nString\n\n</td><td>\n\nInbound identifier of the provider application used to create the outbound call interaction.Table: Located in the id field of the Provider Channel Identities \\[sys\\_cs\\_provider\\_application\\] table.\n\nDefault: Base system provider application\n\n</td></tr><tr><td>\n\nidleState.​dialpadInfoMessage\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the information message to display on the user's dial pad, such as the currently selected queue.```\n\"dialpadInfoMessage\": {\n   \"label\": \"String\",\n   \"value\": \"String\"\n }\n```\n\nIn the following example, the **label** is **Selected queue:** and the **value** is **Customer Inquiries**. You can also just use either the **label** or the **value** parameter with **Selected queue: Customer Inquiries**.\n\n\\[Omitted image \"OF-dialpadInfoMessage.png\"\\] Alt text: Screen shot of dial pad with information message\n\n</td></tr><tr><td>\n\nidleState.​dialpadInfoMessage.​label\n\n</td><td>\n\nString\n\n</td><td>\n\nFree-form label to display on the dial pad.\n\n</td></tr><tr><td>\n\nidleState.​dialpadInfoMessage.​value\n\n</td><td>\n\nString\n\n</td><td>\n\nFree-form message text to display after the label on the dial pad.\n\n</td></tr><tr><td>\n\nidleState.​enableState\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the enable state of the buttons on the dial pad.```\n\"enableState\": {\n  \"logOut\": Boolean,\n  \"outBoundCall\": Boolean,\n  \"outboundQueueSelection\": Boolean\n }\n```\n\n</td></tr><tr><td>\n\nidleState.​enableState.​logOut\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether to enable the logout button in the UI while in the idle state.Valid values:\n\n-   true: Display the logout button while in the idle state.\n-   false: Don't display the logout button while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.​enableState.​outBoundCall\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether to enable the outbound call button in the UI while in the idle state.Valid values:\n\n-   true: Display the outbound call button while in the idle state.\n-   false: Don't display the outbound call button while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.enableState.outboundQueueSelection\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the outbound queue selection field should be enabled.Valid values:\n\n-   true: Display the outbound queue selection field while in the idle state.\n-   false: Don't display the outbound queue selection field while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nidleState.​enableState.phoneDirectory​\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates the phone directory button should be enabled.Valid values:\n\n-   true: Display the phone directory button while in the idle state.\n-   false: Don't display the phone directory button while in the idle state.\n\nDefault: false\n\n</td></tr><tr><td>\n\nofferContext\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the current participant's offer context for resiliency.```\n{\n  \"assignment\": {Object},\n  \"creationTime\": \"String\",\n  \"description\": \"String\",\n  \"displayContent\": {Object},\n  \"externalId\": \"String\",\n  \"externalSegmentId\": \"String\",\n  \"isResilient\": Boolean,\n  \"metadata\": {Object},\n  \"nowRecordId\": \"String\",\n  \"nowRecordTable\": \"String\",\n  \"providerAppInboundId\": \"String\",\n  \"queueId\": \"String\",\n  \"requesterId\": \"String\",\n  \"transferContent\": {Object},\n  \"type\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nofferContext.assignment\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the agent assignment.```\n\"assignment\": {\n  \"allowedToDecline\": Boolean,\n  \"enableAutoAssign\": Boolean,\n  \"offeredOn\": \"String\",\n  \"timeout\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nofferContext.assignment. allowedToDecline\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nRequired. Flag that indicates whether the agent is allowed to decline the assignment.Valid values:\n\n-   true: The agent is allowed to decline the assignment.\n-   false: The agent is not allowed to decline the assignment.\n\nDefault: false\n\n</td></tr><tr><td>\n\nofferContext.assignment. enableAutoAssign\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nRequired. Flag that indicates whether an agent receive the assignment automatically.Valid values:\n\n-   true: An agent can receive the assignment automatically.\n-   false: An agent can not receive the assignment automatically.\n\nDefault: false\n\n</td></tr><tr><td>\n\nofferContext.assignment. offeredOn\n\n</td><td>\n\nString\n\n</td><td>\n\nDate at which the offer was made in UTC format \\(Www, dd Mmm yyyy HH:mm:ss GMT\\).\n\n</td></tr><tr><td>\n\nofferContext.assignment. timeout\n\n</td><td>\n\nString\n\n</td><td>\n\nTime in milliseconds to assign to an agent before timeout.\n\n</td></tr><tr><td>\n\nofferContext.creationTime\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Call creation date and time in UTC format \\(YYYY-MM-DDTHH:MM:SS\\).\n\n</td></tr><tr><td>\n\nofferContext.description\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Description of the offer.\n\n</td></tr><tr><td>\n\nofferContext.displayContent\n\n</td><td>\n\nObject\n\n</td><td>\n\nOptional. Unique JSON payload values representing values displayed on screen.\n\n</td></tr><tr><td>\n\nofferContext.externalId\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique value that identifies the current active call on the associated external system.\n\n</td></tr><tr><td>\n\nofferContext.isResilient\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether the offer context is resilient.Valid values:\n\n-   true: The offer context is resilient.\n-   false: The offer context is not resilient.\n\nDefault: true\n\n</td></tr><tr><td>\n\nofferContext.metadata\n\n</td><td>\n\nObject\n\n</td><td>\n\nOptional. Free-form custom JSON payload values.\n\n</td></tr><tr><td>\n\nofferContext.​nowRecordId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Sys\\_id of the active call record.Table: Interaction \\[interaction\\] Only supported option for base system.\n\n</td></tr><tr><td>\n\nofferContext.​nowRecordTable\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Use this property to set the work item and segment for transfers.\n\n</td></tr><tr><td>\n\nofferContext. providerAppInboundId\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Unique ID from the inbound third-party provider.\n\n</td></tr><tr><td>\n\nofferContext.​queueId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired for regular \\(non-transfer\\) assignments. Unique ID representing the assignment queue. Use the **transferContent.targetId** property for transfer assignments.\n\n</td></tr><tr><td>\n\nofferContext.​requesterId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Unique ID of the offer requester. For voice, this value can be the phone number of the user.\n\n</td></tr><tr><td>\n\nofferContext.transferContent\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails required for transfer assignments.```\n\"transferContent\": {\n  \"sourceQueueId\": \"String\",\n  \"targetId\": \"String\",\n  \"targetType\": \"String\",\n  \"transferType\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nofferContext.transferContent. sourceQueueId\n\n</td><td>\n\nString\n\n</td><td>\n\nThe sys\\_id or external ID of the assignment queue.\n\n</td></tr><tr><td>\n\nofferContext.transferContent. targetId\n\n</td><td>\n\nString\n\n</td><td>\n\nThe sys\\_id or external ID of the queue transfer.\n\n</td></tr><tr><td>\n\nofferContext.transferContent. targetType\n\n</td><td>\n\nString\n\n</td><td>\n\nType of transfer target.Valid values:\n\n-   agent\n-   queue\n\n</td></tr><tr><td>\n\nofferContext.transferContent. transferType\n\n</td><td>\n\nString\n\n</td><td>\n\nType of transfer.Valid values:\n\n-   blind\n-   consult\n\n</td></tr><tr><td>\n\nofferContext.type\n\n</td><td>\n\nString\n\n</td><td>\n\nType of call.Valid values:\n\n-   call\n-   callback request\n-   voicemail\n\n</td></tr><tr><td>\n\nsearchTargetList\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nContext details of the transfer related data for a ServiceNow table.```\n\"searchTargetList\": [\n  {\n    \"externalId\": \"String\",\n    \"nowRecordId\": \"String\",\n    \"nowRecordTable\": \"String\",\n    \"participantID\": \"String\",\n    \"quickStats\": [Array],\n    \"targets\": [Array],\n    \"targetTypes\": [Array]\n  }\n]\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​externalId\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique identifier of the associated call on the CCaaS system.\n\n</td></tr><tr><td>\n\nsearchTargetList.​nowRecordId\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. Sys\\_id of the record to which the searchTargetList belongs. **Note:** Only records in the Interaction \\[interaction\\] table are currently supported.\n\n</td></tr><tr><td>\n\nsearchTargetList.​nowRecordTable\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. ServiceNow table to which the searchTargetList belongs.Table: Only valid value - `\"interaction\"`\n\n</td></tr><tr><td>\n\nsearchTargetList.​participantID\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique identifier for the participant from the CCaaS system.\n\n</td></tr><tr><td>\n\nsearchTargetList.quickStats\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nOptional. Applies only to agent entries. A list of status descriptors displayed inline in the agent row for providing agent status information.```\n\"quickStats\": [\n  {\n    \"label\": \"String\",\n    \"value\": \"String\"\n  }\n]\n```\n\nExample rendering: `Available | On Call 1`\n\n</td></tr><tr><td>\n\nsearchTargetList.quickStats.label\n\n</td><td>\n\nString\n\n</td><td>\n\nStatus label displayed in the agent row.\n\n</td></tr><tr><td>\n\nsearchTargetList.quickStats.value\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional value appended to the label.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nDetails about the agents, external users, and/or queues to whom the call can be transferred.```\n\"targets\": [\n  {\n    \"payload\": {Object},\n    \"transferSubtypes\": [Array],\n    \"type\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload\n\n</td><td>\n\nObject\n\n</td><td>\n\nDetails about the information to display in the transfer call control.The following is an example of a **Transfer call** control that contains a list of agents that the call can be transferred to. The screen shot shows what elements of the UI that each parameter in the **list.payload** controls.\n\n\\[Omitted image \"OF-search\\_payload\\_parms.png\"\\] Alt text: Screen shot of Transfer call window showing parameter association\n\n```\n\"payload\": {\n  \"list\": [Array]\n}\n```\n\nThis example shows an agent payload \\(`\"searchTargetList.targets.type\": \"agent\"`\\).\n\n```\n\"payload\": {\n  \"list\": [\n    {\n      \"name\": \"Alice Anderson\",\n      \"id\": \"agent1Id\",\n      \"hasStats\": true,\n      \"presence\": \"available\",\n      \"moreInfo\": [\n        {\n          \"label\": \"Skill\",\n          \"value\": \"CRM certified\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nThe following shows an example of a queue payload \\(`\"searchTargetList.targets.type\": \"queue\"`\\).\n\n```\n\"payload\": {\n  \"list\": [\n    {\n      \"name\": \"Product Support Queue\",\n      \"id\": \"queue1Id\",\n      \"hasStats\": true,\n      \"moreInfo\": [\n        {\n          \"label\": \"Skill\",\n          \"value\": \"10sec\"\n        },\n        {\n          \"label\": \"Queue Skill\",\n          \"value\": \"German\"\n        }\n      ]\n    },\n    {\n      \"name\": \"Billing Queue\",\n      \"id\": \"queue2Id\",\n      \"hasStats\": true,\n      \"moreInfo\": [\n        {\n           \"label\": \"Skill\",\n           \"value\": \"10sec\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nDetails about the payload for each type of target.```\n\"list\": [\n  {\n    \"hasStats\": Boolean,\n    \"id\": \"String\",\n    \"moreInfo\": [Array],\n    \"name\": \"String\",\n    \"presence\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​hasStats\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the associated target has additional statistics such as a wait-time for a queue.Valid values:\n\n-   true: Target has additional statistics. An information icon appears next to the agent name or queue.\n-   false: Target doesn't have additional statistics.\n\nDefault: false\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​id\n\n</td><td>\n\nString\n\n</td><td>\n\nUnique identifier of the agent or queue in the CCaaS system.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​moreInfo\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nRequired if **searchTargetList.targets.payload.list.hasStats** is set to `\"true\"`. List of skills that the agent or queue has. This information appears in a pop-up window when the user selects the information icon at the end of the entities name.```\n\"moreInfo\": [\n  {\n    \"label\": \"String\",\n    \"value\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​moreInfo.​label\n\n</td><td>\n\nString\n\n</td><td>\n\nFree-form label for the information to display in the pop-up window, such as a **Skill** or **Language**.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​moreInfo.​value\n\n</td><td>\n\nString\n\n</td><td>\n\nText to display in the pop-up window after the label, such as **CRM certified** or **German**.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the agent, external user, or queue. Located in the CCaaS system.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​payload.​list.​presence\n\n</td><td>\n\nString\n\n</td><td>\n\nPresence state of the associated agent. This parameter is only valid for a**searchTargetList.targets.type** of `\"agent\"`.Valid values:\n\n-   available\n-   away\n-   busy\n-   offline\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​transferSubtypes\n\n</td><td>\n\nArray of Objects\n\n</td><td>\n\nDetails about the type of transfer supported for the specified **searchTargetList.targets.type**. This information appears when the user clicks the ellipse next to the target's name in the UI.\n\n\\[Omitted image \"OF-transferSuptypes.png\"\\] Alt text: Transfer call component showing transfer types\n\nFor example, if only a consult type is supported for the current target type, say queue, this array will contain one object to denote the consult type of transfer.\n\n```\n\"transferSubtypes\": [\n  {\n    \"id\": \"String\",\n    \"label\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​transferSubtypes.​id\n\n</td><td>\n\nString\n\n</td><td>\n\nIdentifier of the transfer subtype.Valid values:\n\n-   blind: Agent directly transfers the customer call to another agent or queue without first speaking to the agent.\n-   consult: Agent contacts the agent to whom they want to consult, then merges the customer into the call with the consulting agent.\n\nThis must correspond to the value in **searchTargetList.targets.transferSubtypes.label**.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​transferSubtypes.​label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the transfer subtype. If you don't pass a label, nothing appears in the UI for transfer subtype.Valid values:\n\n-   Blind\n-   Consult\n\nThis must correspond to the value in **searchTargetList.targets.transferSubtypes.id**.\n\n</td></tr><tr><td>\n\nsearchTargetList.​targets.​type\n\n</td><td>\n\nString\n\n</td><td>\n\nType of target.Valid values:\n\n-   agent\n-   external\n-   queue\n\n</td></tr><tr><td>\n\nsearchTargetList.targetTypes\n\n</td><td>\n\nArray of Strings\n\n</td><td>\n\nOptional. Specifies which tabs to display in the Phone Directory component based on the given interaction.```\ntargetTypes: [\"String\", \"String\", \"String\"]\n```\n\nAccepted values:\n\n-   agent\n-   queue\n-   external\n\nDefault: All three tabs are displayed.\n\n</td></tr><tr><td>\n\nType\n\n</td><td>\n\nString\n\n</td><td>\n\nType of context data to set. Valid values:\n\n-   activeCall: Sets the context for the ongoing Active call component. When you pass this context type, you must also pass the `activeCall[]` **Context** parameter.\n-   idleState: Sets the idle state capabilities for the current user. When this type is set, the idle state UI \\(dial pad\\) appears in OpenFrame. When you pass this context type, you must also pass the `<idleState>{}` JSON as the **Context** parameter.\n-   offerContext: Sets the current participant's offer context for resiliency. When you pass this context type, you must also pass the `offerContext{}` JSON as the **Context** parameter.\n-   searchTargetList: Sets the telephone directory context. When this type is set, it enables **Transfer call** on the Active call component. When you pass this context type, you must also pass the `searchTargetList[]` JSON as the **Context** parameter.\n\n</td></tr></tbody>\n</table><table id=\"table_ylq_rhg_zdc\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nNone\n\n</td><td>\n\n \n\n</td></tr><tr><td>\n\nError \\(offerContext\\)\n\n</td><td>\n\nError messages associated with the **offerContext** object used for resiliency. To view these messages, use the [subscribe\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/c_openFrameAPI.md) method to subscribe to **openframe\\_awa\\_client\\_offer** event.Context values are represented as follows:\n\n1.  success\n2.  error\n3.  partialSuccess\n\n-   **AWA\\_EXTUSER\\_ROLE\\_CHECK\\_FAILED**\n\nMessage: User does not have the awa\\_external\\_user role.\n\nThis event indicates that the required role 'awa\\_external\\_user' or 'admin' is not present for the agent.\n\n-   **AWA\\_AGENT\\_NOT\\_AVAILABLE**\n\nMessage: Agent is not available to receive work.\n\nThis event indicates that the agent selected is unavailable.\n\n-   **AWA\\_OFFER\\_ASSIGNMENT\\_PAYLOAD\\_MISSING**\n\nMessage: Assignment payload is empty or undefined in the offerContext.\n\nThis event indicates that the payload is empty or undefined in the **offerContext** object.\n\n-   **AWA\\_OFFER\\_QUEUEID\\_MISSING**\n\nMessage: Transfer Source queue ID is missing in the offerContext.\n\nThis event indicates that the required transfer queue ID \\(**transferContent.targetId**\\) is missing from the **offerContext** object.\n\n-   **AWA\\_ASSIGNMENT\\_OFFEREDON\\_FUTURE**\n\nMessage: OfferedOn time is in future.\n\nThis event indicates that the value of the **assignment.offeredOn** property is a future date and invalid. The date must be present or earlier.\n\n-   **AWA\\_ASSIGNMENT\\_OFFEREDON\\_INVALID\\_FORMAT**\n\nMessage: OfferedOn date format is invalid, Please send it in \"Www, dd Mmm yyyy HH:mm:ss GMT\" UTC format.\n\nThis event indicates that the value provided for the **offerContext.assignment.offeredOn** property is not in the proper time date format.\n\n-   **AWA\\_OFFER\\_EXTERNALID\\_MISSING**\n\nMessage: ExternalId is missing in the offerContext.\n\nThis event indicates that the required externalId property has not been provided for the offer. This value identifies the current active call on the associated external system.\n\n\n</td></tr></tbody>\n</table>The following code example shows how to set the active state context.\n\n```\nopenFrameAPI.setICContext(\"activeCall\", {\n  \"activeCall\": [\n    { \n      \"nowRecordTable\": \"interaction\",\n      \"nowRecordId\": \"12345675678903456\",\n      \"externalId\": \"1234567890\",\n      \"type\": \"call\",\n      \"direction\": \"inbound\",\n      \"currentParticipant\": {\n        \"id\": \"participant1\",\n        \"name\": \"John 1\",\n        \"actor\": \"agent\",\n        \"state\": \"connected\",\n        \"connectedTime\": \"Fri, 12 Jul 2024 05:23:41 GMT\",\n        \"callStartTime\": \"Fri, 12 Jul 2024 04:20:22 GMT\",\n        \"muted\": false,\n        \"held\": true,\n        \"paused\": true,\n        \"flagged\": true,\n        \"recording\": \"in_progress\",\n        \"capabilities\": {\n          \"hold\": false,\n          \"mute\": true,\n          \"endCall\": true,\n          \"startRecording\": true,\n          \"pauseRecording\": true,\n          \"stopRecording\": true,\n          \"resumeRecording\": true,\n          \"transfer\": true,\n          \"mergeCall\": true,\n          \"leaveAndTransfer\": true,\n          \"dtmf\": true,\n          \"flag\": true\n        }\n      },\n      \"participants\": [\n        {\n          \"id\": \"customer1\",\n          \"name\": \"Gilly 1\",\n          \"actor\": \"customer\",\n          \"address\": \"+18582359874\",\n          \"ani\": \"+16193287356\", \n          \"dnis\": \"+18004346258\",\n          \"state\": \"connected\",\n          \"connectedTime\": \"Fri, 12 Jul 2024 00:23:41 GMT\",\n          \"callStartTime\": \"Fri, 12 Jul 2024 20:55:04 GMT\",\n          \"muted\": false,\n          \"held\": false,\n          \"heldAtTime\": \"Fri, 12 Jul 2024 20:55:04 GMT\", \n          \"capabilities\": {\n            \"mute\": true,\n            \"hold\": true,\n            \"endCall\": true\n          }\n        },\n        {\n          \"id\": \"agent2\",\n          \"name\": \"Ned\",\n          \"actor\": \"agent\",\n          \"address\": \"+3134787324\",\n          \"ani\": \"+13134787324\", \n          \"dnis\": \"+14773286943\",\n          \"state\": \"Ringing...\",\n          \"requireWrapup\": true,\n          \"requestACW\": true,\n          \"connectedTime\": \"Fri, 12 Jul 2024 20:24:41 GMT\",\n          \"callStartTime\": \"Fri, 12 Jul 2024 20:56:34 GMT\",\n          \"muted\": true,\n          \"held\": true,\n          \"heldAtTime\": \"Fri, 12 Jul 2024 20:55:41 GMT\",\n          \"capabilities\": {\n            \"mute\": true,\n            \"endCall\": true,\n            \"hold\": true \n          }\n        }\n      ]\n    },\n    {\n      \"nowRecordTable\": \"interaction\",\n      \"nowRecordId\": \"12345yhedfh534576u5\",\n      \"externalId\": \"1234567890\",\n      \"type\": \"call\",\n      \"direction\": \"inbound\",\n      \"currentParticipant\": {\n        \"id\": \"participant1\",\n        \"name\": \"John 1\",\n        \"actor\": \"agent\",\n        \"state\": \"connected\",\n        \"muted\": true,\n        \"held\": false,\n        \"recording\": \"in_progress\",\n        \"paused\": true,\n        \"flagged\": true,\n        \"capabilities\": {\n          \"hold\": false,\n          \"mute\": true,\n          \"endCall\": true,\n          \"record\": true,\n          \"startRecording\": true,\n          \"stopRecording\": true,\n          \"transfer\": true,\n          },\n          \"mergeCall\": false,\n          \"dtmf\": true,\n          \"flag\": true\n        }\n      },\n      \"participants\": [\n        {\n          \"id\": \"customer1\",\n          \"name\": \"Gilly 2\",\n          \"actor\": \"customer\",\n          \"address\": \"+123456789\",\n          \"state\": \"connected\",\n          \"connectedTime\": \"Wed, 04 Dec 2024 00:23:41 GMT\",\n          \"muted\": true,\n          \"held\": false,\n          \"heldAtTime\": \"Fri, 12 Jul 2024 20:24:41 GMT”,\n          \"capabilities\": {\n            \"mute\": true,\n            \"hold\": true,\n            \"endCall\": true\n          }\n        },\n        {\n          \"id\": \"agent2\",\n          \"name\": \"Ned 2\",\n          \"actor\": \"agent\",\n          \"address\": \"+123456789\",\n          \"state\": \"Ringing...\",\n          \"connectedTime\": \"Fri, 12 Jul 2024 20:24:41 GMT\",\n          \"muted\": true,\n          \"held\": true,\n          \"heldAtTime\": \"Fri, 12 Jul 2024 20:24:41 GMT”,\n          \"capabilities\": {\n            \"mute\": true,\n            \"endCall\": true,\n            \"hold\": true\n          }\n        }\n      ]\n     }\n    ]\n  }\n);\n\n```\n\nThe following example shows how to set the idle state context.\n\n```\nopenFrameAPI.setICContext(\"idleState\", {\n  \"capability\": {\n    \"outBoundCall\": true,\n    \"logOut\": true,\n    \"phoneDirectory\": true,\n    \"outboundQueueSelection\": true\n  },\n  \"enableState\": {\n    \"outBoundCall\": true,\n    \"logOut\": true,\n    \"phoneDirectory\": true,\n    \"outboundQueueSelection\": true\n  },\n  \"dialpadInfoMessage\": {\n    \"label\": \"DialPadInfo_Label\",\n    \"value\": \"DialpadInfo_Value\"\n  },\n  \"currentInboundId\": \"1234\"\n});\n```\n\nThe following example shows how to set the search target list context.\n\n```\nopenFrameAPI.setICContext(\"searchTargetList\",\n  {\n    \"searchTargetList\": [\n      {\n        \"nowRecordTable\": \"interaction\",\n        \"nowRecordId\": \"1234\",\n        \"externalId\": \"5678\",\n        \"participantID\": \"participant1”,\n        “targetTypes”: [“agent”, “queue”],\n        \"targets\": [\n          {\n            \"type\": \"agent\",\n            \"transferSubtypes\": [\n              {\n                \"id\": \"consult\",\n                \"label\": \"Consult\"\n              },\n              {\n                \"id\": \"blind\",\n                \"label\": \"Blind\"\n              }\n            ],\n            \"payload\": {\n              \"list\": [\n                {\n                  \"name\": \"John Jason\",\n                  \"id\": \"agent1Id\",\n                  \"hasStats\": \"true\",\n                  \"presence\": \"away\",\n                  \"moreInfo\": [\n                    {\n                      \"label\": \"Skill\",\n                      \"value\": \"10sec\"\n                    }\n                  ]\n                }\n              ]\n            }\n          },\n          {\n            \"type\": \"queue\",\n            \"transferSubtypes\": [\n              {\n                \"id\": \"consult\",\n                \"label\": \"Consult\"\n              },\n              {\n                \"id\": \"blind\",\n                \"label\": \"Blind\"\n              }\n            ],\n            \"payload\": {\n              \"list\": [\n                {\n                  \"name\": \"Product Support Queue\",\n                  \"id\": \"queue1Id\",\n                  \"hasStats\": true,\n                  \"moreInfo\": [\n                    {\n                      \"label\": \"Skill\",\n                      \"value\": \"10sec\"\n                    },\n                    {\n                      \"label\": \"Queue Skill\",\n                      \"value\": \"German\"\n                    }\n                  ]\n                },\n                {\n                  \"name\": \"Billing Queue\",\n                  \"id\": \"queue2Id\",\n                  \"hasStats\": true,\n                  \"moreInfo\": [\n                    {\n                      \"label\": \"Skill\",\n                      \"value\": \"10sec\"\n                    }\n                  ]\n                }\n              ]\n            }\n          }\n        ],\n        \"customPayload\": {}\n      }\n    ],\n    \"customPayload\": {}\n  });\n```\n\nThe following example suggests how to set callback context and related capabilities settings.\n\n```\nopenFrameAPI.setICContext('activeCall', callbackContext);\n\nvar callbackContext = {\n  \"activeCall\": [\n    {\n      \"nowRecordTable\": \"Customer interaction\",\n      \"nowRecordId\": \"12345yhedfh534576u5\",\n      \"externalId\": \"1234567890\",\n      \"type\": \"callback\",\n      \"currentParticipant\": {\n        \"id\": \"agent1\",\n        \"capabilities\": {\n          \"initiateCall\": \"true\",\n          \"closeCallback\": \"true\",\n          \"transfer\": \"true\",\n          \"cancelCallbackTransferEligible\": \"false\",\n          \"callbackTransferStatus\": \"\"\n        }\n      },\n      \"callbackContext\": {\n        \"customerName\": \"Fred Luddy\",\n        \"callbackNumbers\": [\n          \"8665551234\"\n        ],\n        \"callAttemptedByAgent\": true,\n        \"closeInEndTime\": \"Mon, 05 Dec 2024 09:25:08 GMT\",\n        \"dialInEndTime\": \"\"\n      }\n    }\n  ]\n}\n```\n\nThe following example shows how to set resiliency call response details using the offerContext property.\n\n```\n// Set offerContext\nopenFrameAPI.setICContext('offerContext', offerContext);\n\nvar offerContext = {\n  \"offerContext\": [\n    {\n      \"nowRecordTable\": \"interaction\",\n      \"type\": \"phone\",\n      \"externalId\": \"1234567890\",\n      \"externalSegmentId\": \"12345yhedfh534576u5\",\n      \"queueId\": \"10111ad087063250df52fe66cebb3520\",\n      \"creationTime\": \"19-12-2025 11:23:45\",\n      \"requesterId\": \"4085018550\",\n      \"assignment\": {\n        \"offeredOn\": \"Fri, 19-12-2025  13:07:59\",\n        \"timeout\": \"4000\",\n        \"allowedToDecline\": true,\n        \"enableAutoAssign\": true\n      },\n      \"displayContent\": {\n        \"title\": \"Phone\",\n        \"displayContent1\": \"Abel Tuter\",\n        \"displayContent2\": \"Priority - 4-Low\",\n        \"displayContent3\": \"category - Product Issue\"\n      }\n    }\n  ]\n};\n```\n\n### Agent Selects a Support Queue using the agentSettings property\n\nThe `setICContext(\"agentSettings\")` method configures queue selection options for contact center agents in OpenFrame. The first example initializes the agent's environment by setting a default queue \\(\"Account Support\"\\) and populating a dropdown menu with all available queue options.\n\nAs the agent's assignment changes or they manually switch queues, the second example demonstrates how to update `currentSelectedQueue` to reflect the new selection, keeping the system synchronized with the agent's active queue. This allows the OpenFrame interface to display the correct queue context and route interactions to the appropriate team.\n\n```\n// Initialize agentSettings context with available queues\nopenFrameAPI.setICContext(\"agentSettings\", {\n  \"outboundQueue\": {\n    \"currentSelectedQueue\": {\n      \"label\": \"Account Support\",\n      \"id\": \"queueId1\"\n    },\n    \"targets\": [\n      {\n        \"label\": \"Account Support\",\n        \"id\": \"queueId1\"\n      },\n      {\n        \"label\": \"Billing Support\",\n        \"id\": \"queueId2\"\n      },\n      {\n        \"label\": \"Hardware Support\",\n        \"id\": \"queueId3\"\n      },\n      {\n        \"label\": \"Product Support\",\n        \"id\": \"queueId4\"\n      },\n      {\n        \"label\": \"Sales Support\",\n        \"id\": \"queueId5\"\n      }\n    ]\n  }\n});\n```\n\nIn this example, the agent switches to Billing Support as the newly selected queue:\n\n```\n// Agent switches to Billing Support\nopenFrameAPI.setICContext(\"agentSettings\", {\n  \"outboundQueue\": {\n    \"currentSelectedQueue\": {\n      \"label\": \"Billing Support\",\n      \"id\": \"queueId2\"\n    },\n    \"targets\": [\n      // ... same targets array\n    ]\n  }\n});\n```\n\n### Setting Active Conversation Context\n\nUse case - When an agent receives an inbound interaction:\n\n-   The system identifies the ServiceNow interaction record and passes its record ID.\n-   The externalId stores any external system reference \\(e.g., from a third-party contact center\\).\n-   If the interaction requires post-call work, wrapUpRequired is set to true.\n-   The OpenFrame interface is synchronized with the active conversation context, allowing agents to access conversation history and interaction details.\n\n```\n// Initialize activeConversation context with the current interaction\nopenFrameAPI.setICContext('activeConversation', {\n  'activeConversation': [\n    {\n      'nowRecordId': '74103990fbd98b10ff19fe5f3eefdc41',\n      'nowRecordTable': 'Interaction',\n      'externalId': 'externalId123',\n      'wrapUpRequired': true\n    }\n  ]\n});\n```\n\nOutput:\n\n```\n{\n  'activeConversation': [\n    {\n      'nowRecordId': '74103990fbd98b10ff19fe5f3eefdc41',\n      'nowRecordTable': 'Interaction',\n      'externalId': 'externalId123',\n      'wrapUpRequired': true,\n      'status': 'active',\n      'timestamp': '2024-06-24T14:32:15Z'\n    }\n  ],\n  'success': true\n}\n```\n\nUpdate the interaction to a new conversation:\n\n```\n// Update to a new active conversation\nopenFrameAPI.setICContext('activeConversation', {\n  'activeConversation': [\n    {\n      'nowRecordId': '85214001gce99c21gg30gf6g4ffgeeid52',\n      'nowRecordTable': 'Interaction',\n      'externalId': 'externalId456',\n      'wrapUpRequired': true\n    }\n  ]\n});\n```\n\n## openFrameAPI - setIcons\\(Array icons\\)\n\nDefines icons in the OpenFrame header that are placed next to the close icon.\n\n<table id=\"table_dg3_lny_kt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nicons\n\n</td><td>\n\nArray of objects\n\n</td><td>\n\nA list of icon configurations, where each icon configuration is an object with key values **imageURL**, **imageTitle**, and any other needed context.Maximum size: Icons can be a maximum of 16x16 pixels. Larger images are automatically adjusted to this maximum.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setIcons([{imageURL:'https://mydomian.com/image/mute.png',\nimageTitle:'mute', id:101}, {imageURL:'https://mydomian.com/image/hold.png',\nimageTitle:'hold', id:102}]);\n```\n\n## openFrameAPI - setPresenceIndicator\\(presence\\)\n\nSets the presence indicator to display agent availability in a workspace.\n\nFor more information on configuring OpenFrame, refer to [Create an OpenFrame configuration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/t_CreateAnOpenFrameConfiguration.md)\n\n<table id=\"table_o4l_p1c_jhb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nstate\n\n</td><td>\n\nString\n\n</td><td>\n\nPresence state of the agent.Default states:\n\n -   Available\n-   Away\n-   Offline\n\n You can also specify custom states.\n\n</td></tr><tr><td>\n\ncolor\n\n</td><td>\n\nString\n\n</td><td>\n\nPresence indicator color on workspace. Supported colors:\n\n -   red\n-   orange\n-   grey\n-   green\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenframeAPI.setPresenceIndicator('Available', 'green');\n```\n\n## openFrameAPI - setSize\\(Number width, Number height\\)\n\nSets the OpenFrame size.\n\n|Name|Type|Description|\n|----|----|-----------|\n|width|Number|Should be greater than zero.|\n|height|Number|Should be greater than zero.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setSize(300, 370);\n```\n\n## openFrameAPI - setSubtitle\\(String subTitle\\)\n\nSets the OpenFrame subtitle.\n\n|Name|Type|Description|\n|----|----|-----------|\n|subTitle|String|A string of 256 or fewer characters.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setSubtitle('+18888888888');\n```\n\n## openFrameAPI - setTitle\\(String title\\)\n\nSets the OpenFrame title.\n\n|Name|Type|Description|\n|----|----|-----------|\n|title|String|A string of 256 or fewer characters.|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setTitle('Incoming Call');\n```\n\n## openFrameAPI - setTitleIcon\\(Object icon\\)\n\nSets the OpenFrame's title icon.\n\n<table id=\"table_w42_kky_kt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nicon\n\n</td><td>\n\nObject\n\n</td><td>\n\nObject of key value pairs. Keys include **imageURL**, **imageTitle**, and any other context needed.Maximum size: Icons can be a maximum of 16x16 pixels. Larger images are automatically adjusted to this maximum.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setTitleIcon({imageURL:'/my/image/path.png', imageTitle:'mute', id:101});\n```\n\n```\nopenFrameAPI.setTitleIcon({imageURL:'https://mydomian.com/image/path.png',\nimageTitle:'mute', id:101});\n```\n\n## openFrameAPI - toastMessage\\(String message, String type, Number duration\\)\n\nDisplays an alert message.\n\n<table id=\"table_mqv_lqt_tgc\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmessage\n\n</td><td>\n\nString\n\n</td><td>\n\nMessage to display in the alert.\n\n</td></tr><tr><td>\n\ntype\n\n</td><td>\n\nString\n\n</td><td>\n\nType of message. Possible values:\n\n-   info\n-   warning\n-   error\n\n</td></tr><tr><td>\n\nduration\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Duration to display the message before it is auto-dismissed.Units: Milliseconds\n\nDefault: The message is displayed until it is manually closed.\n\n</td></tr></tbody>\n</table>|Type|Description|\n|----|-----------|\n|None| |\n\nThis example displays info, warning, and error messages.\n\n```\nopenFrameAPI.toastMessage(\"Testing info message\", \"info\", 10000); //display for 10 seconds\nopenFrameAPI.toastMessage(\"Testing warning message\", \"warning\"); //display until manually closed\nopenFrameAPI.toastMessage(\"Testing error message\", \"error\");\n```\n\n## openFrameAPI - setWidth\\(width\\)\n\nSets the OpenFrame width.\n\n|Name|Type|Description|\n|----|----|-----------|\n|Width|Number|Width in pixels|\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.setWidth(100);\n```\n\n## openFrameAPI - show\\(\\)\n\nMakes the OpenFrame visible in the TopFrame.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|void| |\n\n```\nopenFrameAPI.show()\n```\n\n## openFrameAPI - subscribe\\(openFrameAPIEVENT event, function eventCallback\\)\n\nSubscribes to a specified event.\n\n<table id=\"table_znv_gvd_lt\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nevent\n\n</td><td>\n\nopenFrameAPIEVENT\n\n</td><td>\n\nThe event to subscribe to:-   interaction\\_control\\_action: Receives the interaction lifecycle event or calls control updates from OpenFrame and updates the UI accordingly. Call control update examples include call initiated, muted, held, ended, and transfer requests.\n-   openframe\\_agent\\_off\\_interaction: Indicates the presence of an agent on chat as off or available.\n-   openframe\\_awa\\_agent\\_presence: In Advanced Work Assignment \\(AWA\\), this event occurs when there's any change in the agent presence state. Computer Telephony Integration \\(CTI\\) developers can subscribe to this event to receive presence state changes.\n-   openframe\\_awa\\_client\\_offer: Occurs when an offer or transfer is made on a resiliency-related offer.\n-   openframe\\_awa\\_workitem\\_accepted: Occurs when a work item is accepted by an agent.\n-   openframe\\_awa\\_workitem\\_offered: Occurs when a work item is offered to an agent.\n-   openframe\\_awa\\_workitem\\_rejected: Occurs when a work item is rejected by an agent.\n-   openframe\\_awa\\_workitem\\_cancelled:\n    -   Occurs when a work item is cancelled by AWA.\n    -   Occurs when a Agent 1 transfers the phone call \\(Blind or Consult\\) to Agent 2 but Agent 2 rejects the transfer.\n    -   Occurs when an Agent 1 cancels the transfer before the Agent 2 picks up the transfer. Currently, cancellation is supported only for chats.\n-   openframe\\_before\\_destroy: Occurs before the TopFrame is unloaded.\n-   openframe\\_collapse: Occurs when the collapse icon is selected on the OpenFrame header.\n-   openframe\\_communication: Application-specific and can be customized.\n-   openframe\\_communication\\_failure: Occurs when communication to TopFrame fails.\n-   openframe\\_expand: Occurs when the expand icon is selected on the OpenFrame header.\n-   openframe\\_heart\\_beat: Occurs when the user session is extended or logged out.\n-   openframe\\_header\\_icon\\_clicked: Deprecated. Use openframe\\_icon\\_clicked or openframe\\_title\\_icon\\_clicked instead.\n-   openframe\\_hidden: Occurs when the OpenFrame is hidden.\n-   openframe\\_icon\\_clicked: Occurs when any icon other than the close icon is selected on the OpenFrame footer. The callback receives the icon object as a parameter.\n-   openframe\\_shown: Occurs when the OpenFrame is shown.\n-   openframe\\_title\\_icon\\_clicked: Occurs when the title icon is selected on the OpenFrame. The callback receives the titleIcon object as a parameter.\n-   openframe\\_wrap\\_up\\_submitted: Occurs when the wrap up periods ends on the [wrap-up modeless dialog](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/interaction-wrapup-modeless-dialog.md). The event is triggered only when the wrap up is external.\n\n</td></tr><tr><td>\n\neventCallback\n\n</td><td>\n\nfunction\n\n</td><td>\n\nFunction to call when the specified event occurs.\n\n</td></tr></tbody>\n</table><table id=\"table_a4v_gvd_lt\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresults\n\n</td><td>\n\nMost event subscriptions have no return values. The event subscriptions that do return values are described in the following table entries.\n\n</td></tr><tr><td>\n\nopenframe\\_awa\\_agent\\_presence\n\n</td><td>\n\nIn AWA, the **openframe\\_awa\\_agent\\_presence** event returns the `presence` object:```\n\"presence\":{\n  \"available\": Boolean,\n  \"channels\":[\n    {\n      \"available\": Boolean,\n      \"name\": \"String\",\n      \"restrict_update\": Boolean,\n      \"sys_id\": \"String\"\n    }\n  ],\n  \"name\": \"String\",\n  \"sys_id\": \"String\"\n}\n```\n\n**presence**: Information about an agent's current presence state and channel.\n\n-   **presence.available**: Flag that indicates whether the agent is available.\n-   **presence.channels**: List of objects that describe the available channels of communication with the agent.\n    -   **presence.channels.available**: Flag that indicates whether the channel is available.\n    -   **presence.channels.name**: Channel name, such as Chat or Phone.\n    -   **presence.channels.restrict\\_update**: Flag that indicates whether the user can restrict updates.\n    -   **presence.channels.sys\\_id**: Channel sys\\_id.\n-   **presence.name**: Name of the agent's presence state.\n-   **presence.sys\\_id**: Presence state sys\\_id.\n\n</td></tr><tr><td>\n\nopenframe\\_awa\\_workitem\\_accepted and openframe\\_awa\\_workitem\\_offered\n\n</td><td>\n\nIn AWA, the **openframe\\_awa\\_workitem\\_accepted** and **openframe\\_awa\\_workitem\\_offered** events return the `workItem` object:```\n\"workItem\": {\n  \"document\": {\n    \"sys_id\": \"String\",\n    \"table\": \"String\"\n  },\n  \"isAutoAccepted\": Boolean,\n  \"isQueueTransferred\": Boolean,\n  \"previousWorkItem\": \"String\",\n  \"serviceChannel\": {\n    \"name\": \"String\",\n    \"sys_id\": \"String\"\n  },\n  \"size\": Number,\n  \"sys_id\": \"String\"\n}\n```\n\n**workItem**: Information about the work item that is associated with the event.\n\n-   **workItem.document**: List of documents associated with the work item task.\n    -   **workItem.document.sys\\_id**: Sys\\_id of the document assigned to the work item task.\n    -   **workItem.document.table**: Name of the document table assigned to the task.\n-   **workItem.isAutoAccepted**: Flag that indicates whether the work item was automatically accepted by the system. Set to true if the work item was auto-accepted.\n-   **workItem.isQueueTransferred**: Flag that indicates whether the work item is queue transferred. Set to true if the work item is queue transferred, false if it isn't.\n-   **workItem.previousWorkItem**: Sys\\_id of the previous work item for the same document ID. For the non-transfer work items this value is empty.\n-   **workItem.serviceChannel**: List of service channels associated with the work item task.\n    -   **workItem.serviceChannel.name**: Name of the service channel, such as Chat or Phone.\n    -   **workItem.serviceChannel.sys\\_id**: Sys\\_id of the service channel.\n-   **workItem.size**: Agent's capacity used when this work item is assigned to the agent.\n-   **workItem.sys\\_id**: Sys\\_id of the work item that was accepted or offered.\n\n</td></tr><tr><td>\n\nopenframe\\_awa\\_workitem\\_rejected\n\n</td><td>\n\nIn AWA, the **openframe\\_awa\\_workitem\\_rejected** event returns the `workItem` object:```\n\"workItem\": {\n  \"document\": {\n    \"sys_id\": \"String\",\n    \"table\": \"String\"\n  },\n  \"isQueueTransferred\": Boolean,\n  \"previousWorkItem\": \"String\",\n  \"rejection\": {\n    \"reason\": \"String\",\n    \"sys_id\": \"String\"\n  },\n  \"serviceChannel\": {\n    \"name\": \"String\",\n    \"sys_id\": \"String\"\n  },\n  \"size\": Number,\n  \"sys_id\": \"String\"\n}\n```\n\n**workItem**: Information about the work item that is associated with the event.\n\n-   **workItem.document**: List of documents associated with the work item task.\n    -   **workItem.document.sys\\_id**: Sys\\_id of the document assigned to the work item task.\n    -   **workItem.document.table**: Name of the document table assigned to the task.\n-   **workItem.isQueueTransferred**: Flag that indicates whether the work item is queue transferred. Set to true if the work item is queue transferred, false if it isn't.\n-   **workItem.previousWorkItem**: Sys\\_id of the previous work item for the same document ID. For the non-transfer work items this value is empty.\n-   **workItem.rejection**: List of reasons for the rejection of the work item.\n    -   **workItem.rejection.reason**: Name of the reason for rejecting the work items.\n    -   **workItem.rejection.sys\\_id**: Sys\\_id of the rejection reason.\n\nTable: Reject Reasons \\[awa\\_reject\\_reason\\]\n\n-   **workItem.serviceChannel**: List of service channels associated with the work item task.\n    -   **workItem.serviceChannel.name**: Name of the service channel, such as Chat or Phone.\n    -   **workItem.serviceChannel.sys\\_id**: Sys\\_id of the service channel.\n-   **workItem.size**: Agent's capacity used when this work item is assigned to the agent.\n-   **workItem.sys\\_id**: Sys\\_id of the work item that was accepted or offered.\n\n</td></tr><tr><td>\n\nopenframe\\_heart\\_beat\n\n</td><td>\n\nThe **openframe\\_heart\\_beat** event returns the following object:```\n{\n  \"lastUiActivity\": \"String\",\n  \"sessionLoggedIn\": Boolean\n}\n```\n\n-   **lastUiActivity**: Optional. Time stamp of last UI activity that extended the user session.\n-   **sessionLoggedIn** Flag that indicates whether the user is logged in.\n    -   true: User is logged in.\n    -   false: User isn't logged in.\n\n</td></tr><tr><td>\n\nopenframe\\_wrap\\_up\\_submitted\n\n</td><td>\n\nThe **openframe\\_wrap\\_up\\_submitted** event returns the following object:```\n{ \n  \"wrapUp\": {\n    \"external\": Boolean,\n    \"externalSegmentId\": \"String\", \n    \"recordId\": \"String\",\n    \"recordTable\": \"String\",\n    \"wrapUpCode\": \"String\",\n    \"wrapUpNotes\": \"String\",\n    \"wrapUpSegmentId\": \"String\"\n  }\n}\n```\n\n-   **external**: Flag that indicates whether the wrap up is handled internally by the ServiceNow instance or managed outside of the ServiceNow instance by some other call system.\n    -   true: Wrap up is handled by an external call system.\n    -   false: Wrap up is handled by the ServiceNow instance.\n-   **externalSegmentId**: Unique identifier of the external data object that triggered the external wrap up.\n-   **recordId**: Sys\\_id of the interaction record that is undergoing wrap up.\n-   **recordTable**: Name of the table containing the record. Always set as “interaction\".\n-   **wrapUpCode**: Code selected by the user during the wrap up that indicates how the interaction was resolved.\n-   **wrapUpNotes**: Free-form text entered by the user during wrap up that describes how the interaction was resolved.\n-   **wrapUpSegmentId**: Sys\\_id of the interaction wrap up segment record associated with the interaction. Located in the Wrap Up Segment \\[interaction\\_wrap\\_up\\_segment\\] table. Contains the wrap up data.\n\n</td></tr></tbody>\n</table>The following code example shows how to call this method for an `openframe_awa_agent_presence` event.\n\n```\nfunction handleIconClick(context) {\nconsole.log(\"Icon was clicked\", context);\n}\nopenFrameAPI.subscribe(openFrameAPI.events.openframe_awa_agent_presence, handleIconClick);\n```\n\nOutput:\n\n```\n// Sample presence object output\n// openframe_awa_agent_presence event only\n\n{\n  \"result\":{\n    \"presence\":{\n      \"name\":\"Available\",\n      \"sys_id\":\"27f675e3739713004a905ee515f6a7c3\",\n      \"available\":true,\n      \"channels\":[\n        {\n          \"name\":\"Chat\",\n          \"available\":true,\n          \"sys_id\":\"36f675e4239713124a905fe515f6a832\",\n          \"restrict_update\":false\n        },\n        {\n          \"name\":\"Phone\",\n          \"available\":true,\n          \"sys_id\":\"9378a530a1820610f809018efd9bc01e\",\n          \"restrict_update\":false\n        }\n      ]\n    }\n  }\n}\n```\n\nThe following code example shows how to call this method for an `openframe_awa_workitem_accepted` event.\n\n```\nfunction handleIconClick(context) {\nconsole.log(\"Icon was clicked\", context);\n}\nopenFrameAPI.subscribe(openFrameAPI.events.openframe_awa_workitem_accepted, handleIconClick);\n```\n\nOutput:\n\n```\n// Sample workItem object output\n// openframe_awa_workitem_accepted event only\n{\n  \"result\": {\n    \"workItem\": {\n      \"sys_id\": \"14c86c40a1650610f87701807d9bc0be\",\n      \"size\": 1,\n      \"serviceChannel\": {\n        \"name\": \"Chat\",\n        \"sys_id\": \"27f675e3739713004a905ee515f6a7c3\"\n      },\n      \"document\": {\n        \"sys_id\": \"aa582040a1650610f87701807d9bc076\",\n        \"table\": \"interaction\"\n      },\n      \"previousWorkItem\": \"7c78a440a1650610f87701807d9bc02b\",\n      \"isQueueTransferred\": true,\n      \"isAutoAccepted\": true\n    }\n  }\n}\n```\n\nThe following code example shows how to call this method for an `openframe_awa_workitem_rejected` event.\n\n```\nfunction handleIconClick(context) {\nconsole.log(\"Icon was clicked\", context);\n}\nopenFrameAPI.subscribe(openFrameAPI.events.openframe_awa_workitem_rejected, handleIconClick);\n```\n\nOutput:\n\n```\n// Sample workItem object output\n// openframe_awa_workitem_rejected event only\n{\n  \"payload\": {\n    \"workItem\": {\n      \"sys_id\": \"2c3bdc4824250610f8775e73b116f8de\",\n      \"size\": \"1\",\n      \"serviceChannel\": {\n        \"name\": \"Chat\",\n        \"sysID\": \"27f675e3739713004a905ee515f6a7c3\"\n      },\n      \"document\": {\n        \"sys_id\": \"cf0a180824250610f8775e73b116f80c\",\n        \"table\": \"interaction\"\n      },\n      \"rejection\": {\n        \"reason\": \"Busy\",\n        \"sys_id\": \"4e93fa29b38023002e7b6e5f26a8dc20\"\n      },\n      \"previousWorkItem\": \"831b9c4824250610f8775e73b116f841\",\n      \"isQueueTransferred\": true\n    }\n  }\n}\n```\n\nThe following example shows how to subscribe to the **interaction\\_control\\_action** event.\n\n```\nopenFrameAPI.subscribe(\"interaction_control_action\", function(action) {\n    // Can perform the action based on the name\n    if (action.name == \"mute\") {\n        mute();\n        openFrameAPI.setICContext(\"activeCall\", context); // Update context representing the change\n    } else if (action.name == \"getSearchTarget\") {\n        action.payload.searchType == \"queue\" ? fetchQueueTransferList(action.payload.searchTerm) : fetchAgentTransferList(action.payload.searchTerm);\n        openFrameAPI.setICContext(\"searchTargetList\", context); // Call context will have the transfer list\n    } else if (action.name == \"logout\") {\n        logout();\n        openFrameAPI.showIframe(); // Show iframe api\n    }\n});\n```\n\n## openFrameAPI - version\\(\\)\n\nReturns the OpenFrame API version.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|The OpenFrame API version|\n\n```\nvar version = openFrameAPI.version();\n\nconsole.log(\"API version \" + version);\n```\n\n"}}