Difference between revisions of "PEC-Developer/Current/SCAPI/InteractionNamespace"
From Genesys Documentation
Line 139: | Line 139: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> deleteUserData(''interactionId'', ''key'') | + | {{!}}<static> deleteUserData(''interactionId'', ''key'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 158: | Line 158: | ||
{{!}}string | {{!}}string | ||
{{!}}The key to delete from the attached data. | {{!}}The key to delete from the attached data. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 164: | Line 172: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> getByInteractionId(''interactionId'') → | + | {{!}}<static> getByInteractionId(''interactionId'', succeeded, failed) → {{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=interaction.Interaction}}} |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 179: | Line 187: | ||
{{!}}string | {{!}}string | ||
{{!}}The unique identifier for the interaction. | {{!}}The unique identifier for the interaction. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}- | {{!}}- | ||
Line 188: | Line 204: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> getInteractions() → {Array.<{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=interaction.Interaction}}>} | + | {{!}}<static> getInteractions(succeeded, failed) → {Array.<{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=interaction.Interaction}}>} |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
{{!}}Gets all the interactions. | {{!}}Gets all the interactions. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
+ | {{!}}} | ||
{{!}}- | {{!}}- | ||
!Returns | !Returns | ||
Line 206: | Line 238: | ||
<source lang="java"> | <source lang="java"> | ||
Received interaction event: { | Received interaction event: { | ||
− | "event": "interaction", | + | "event": "interaction", |
− | "data": { | + | "data": { |
− | "eventType": "CASE_COLLAPSED", | + | "eventType": "CASE_COLLAPSED", |
− | "selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905" | + | "selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905" |
− | }, | + | }, |
− | "userAgent": "WWE Server", | + | "userAgent": "WWE Server", |
− | "protocolVersion": 2 | + | "protocolVersion": 2 |
} | } | ||
Received interaction event: { | Received interaction event: { | ||
− | "event": "interaction", | + | "event": "interaction", |
− | "data": { | + | "data": { |
− | "eventType": "CASE_EXPANDED", | + | "eventType": "CASE_EXPANDED", |
− | "selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905" | + | "selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905" |
− | }, | + | }, |
− | "userAgent": "WWE Server", | + | "userAgent": "WWE Server", |
− | "protocolVersion": 2 | + | "protocolVersion": 2 |
} | } | ||
Received interaction event: { | Received interaction event: { | ||
− | "event": "interaction", | + | "event": "interaction", |
− | "data": { | + | "data": { |
− | "eventType": "CASE_SELECTED", | + | "eventType": "CASE_SELECTED", |
− | "selectedCaseId": "d4187b87-9fe1-4db8-0515-6a91e666e22d" | + | "selectedCaseId": "d4187b87-9fe1-4db8-0515-6a91e666e22d" |
− | }, | + | }, |
− | "userAgent": "WWE Server", | + | "userAgent": "WWE Server", |
− | "protocolVersion": 2 | + | "protocolVersion": 2 |
} | } | ||
</source> | </source> | ||
Line 247: | Line 279: | ||
{{!}}succeeded | {{!}}succeeded | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation succeeds. |
{{!}}- | {{!}}- | ||
{{!}}failed | {{!}}failed | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation fails. |
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 258: | Line 290: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> setUserData(''interactionId'', ''keyValues'') | + | {{!}}<static> setUserData(''interactionId'', ''keyValues'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 277: | Line 309: | ||
{{!}}object | {{!}}object | ||
{{!}}The key value pairs to set on the user data. | {{!}}The key value pairs to set on the user data. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 283: | Line 323: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> markdone(''interactionId'') | + | {{!}}<static> markdone(''interactionId'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 298: | Line 338: | ||
{{!}}string | {{!}}string | ||
{{!}}The unique identifier for the interaction. | {{!}}The unique identifier for the interaction. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 311: | Line 359: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> blockMarkdone(''interactionId'', ''warningMessage'') | + | {{!}}<static> blockMarkdone(''interactionId'', ''warningMessage'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 330: | Line 378: | ||
{{!}}string | {{!}}string | ||
{{!}}The warning message. | {{!}}The warning message. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 428: | Line 484: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> unblockMarkdone(''interactionId'') | + | {{!}}<static> unblockMarkdone(''interactionId'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 443: | Line 499: | ||
{{!}}string | {{!}}string | ||
{{!}}The unique interaction identifier of the interaction to prevent the mark done operation. | {{!}}The unique interaction identifier of the interaction to prevent the mark done operation. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 467: | Line 531: | ||
{{!}}succeeded | {{!}}succeeded | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation succeeds. |
{{!}}- | {{!}}- | ||
{{!}}failed | {{!}}failed | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation fails. |
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 496: | Line 560: | ||
{{!}}succeeded | {{!}}succeeded | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation succeeds. |
{{!}}- | {{!}}- | ||
{{!}}failed | {{!}}failed | ||
{{!}}function | {{!}}function | ||
− | {{!}} | + | {{!}}A function called when the operation fails. |
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} |
Latest revision as of 13:44, February 22, 2023
Contents
Learn about the Interaction namespace methods and type definitions in the Service Client API.
Important
Depending on your environment, you might need to contact your Genesys representative to complete the configuration described on this page.Methods
The Interaction namespace includes the following methods:
- completeConference
- completeTransfer
- consult
- deleteUserData
- getByInteractionId
- getInteractions
- selectCaseByCaseId
- setUserData
- markdone
- blockMarkdone
- singleStepConference
- singleStepTransfer
- unblockMarkdone
- accept
- reject
completeConference
Signature | <static> completeConference(consultInteractionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Completes a conference. | ||||||||||||
Parameters |
|
completeTransfer
Signature | <static> completeTransfer(consultInteractionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Completes a transfer. | ||||||||||||
Parameters |
|
consult
Signature | <static> consult(interactionId, targetQuery, userData, extensions, succeeded, failed) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Make a consultation interaction. | |||||||||||||||||||||
Parameters |
|
deleteUserData
Signature | <static> deleteUserData(interactionId, key, succeeded, failed) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Deletes the user data attached to the interaction. The List of User Data Write Allowed setting in Agent Setup or the service-client-api.user-data.write-allowed configuration option might restrict the allowed key/value pairs. | |||||||||||||||
Parameters |
|
getByInteractionId
Signature | <static> getByInteractionId(interactionId, succeeded, failed) → {interaction.Interaction} | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Gets an interaction by its unique identifier. | ||||||||||||
Parameters |
| ||||||||||||
Returns | interaction.Interaction or null if the interaction doesn't exist. |
getInteractions
Signature | <static> getInteractions(succeeded, failed) → {Array.<interaction.Interaction>} | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Description | Gets all the interactions. | |||||||||
Parameters |
| |||||||||
Returns | Array.<interaction.Interaction> |
selectCaseByCaseId
Signature | <static> genesys.wwe.service.interaction.selectCaseByCaseId(caseId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Select the case in the UI by case identifier. If you subscribe to the "interaction" events (genesys.wwe.service.subscribe([ "interaction" ], eventHandler, this);), you will receive the following event:
Received interaction event: {
"event": "interaction",
"data": {
"eventType": "CASE_COLLAPSED",
"selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905"
},
"userAgent": "WWE Server",
"protocolVersion": 2
}
Received interaction event: {
"event": "interaction",
"data": {
"eventType": "CASE_EXPANDED",
"selectedCaseId": "4401820b-c4e6-4994-69c2-6ae7fdbc4905"
},
"userAgent": "WWE Server",
"protocolVersion": 2
}
Received interaction event: {
"event": "interaction",
"data": {
"eventType": "CASE_SELECTED",
"selectedCaseId": "d4187b87-9fe1-4db8-0515-6a91e666e22d"
},
"userAgent": "WWE Server",
"protocolVersion": 2
} | ||||||||||||
Parameters |
|
setUserData
Signature | <static> setUserData(interactionId, keyValues, succeeded, failed) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Sets the user data on the live interaction (for voice, this means the interaction is not in the IDLE state). This request overwrites any existing keys on the user data. The List of User Data Write Allowed setting in Agent Setup or the service-client-api.user-data.write-allowed configuration option might restrict the allowed key/value pairs. | |||||||||||||||
Parameters |
|
markdone
Signature | <static> markdone(interactionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Mark done the selected interaction. | ||||||||||||
Parameters |
|
Outbound interactions
The markdone operation can be used for outbound interactions such as pull preview, push preview, and direct push preview, but there are some details you need to know:
- Pull preview - Mark done is similar to doing a 'Done and Stop' action, where the next preview record is not fetched.
- Push preview - No special behaviour.
- Direct push preview - Mark done is similar to doing a 'Done and Stop' action, where it triggers a notification to Outbound Contact Server to stop sending direct push preview records.
blockMarkdone
Signature | <static> blockMarkdone(interactionId, warningMessage, succeeded, failed) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Block the mark done operation on the selected interaction. The "markdone" event must be subscribed to receive the event which informs that there is a delay in blocking the markdone operation with this method. | |||||||||||||||
Parameters |
|
singleStepConference
Signature | <static> singleStepConference(interactionId, targetQuery, userData, extensions, succeeded, failed) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Make a single step conference. | |||||||||||||||||||||
Parameters |
|
singleStepTransfer
Signature | <static> singleStepTransfer(interactionId, targetQuery, userData, extensions, succeeded, failed) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Make a single step transfer. | |||||||||||||||||||||
Parameters |
|
unblockMarkdone
Signature | <static> unblockMarkdone(interactionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Unblock the mark done operation on the selected interaction that was previously blocked. | ||||||||||||
Parameters |
|
accept
Signature | <static> accept(interactionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Accept an interaction when it is ringing in Agent Workspace. | ||||||||||||
Parameters |
|
reject
Signature | <static> reject(interactionId, succeeded, failed) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Reject an interaction when it is ringing in Agent Workspace. | ||||||||||||
Parameters |
|
Type definitions
The Interaction namespace includes the following object types:
Interaction
Description | Represents the JSON structure of an interaction. Attributes specific to voice interactions are: callUuid, direction, callType, ani, dnis and recordingState. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Object | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties |
|
Party
Description | Represents the JSON structure of a party. | ||||||
---|---|---|---|---|---|---|---|
Type | Object | ||||||
Properties |
|
Contact
Description | Represents the JSON structure of a contact. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Object | ||||||||||||
Properties |
|
Comments or questions about this documentation? Contact us for support!