Difference between revisions of "PEC-Developer/Current/SCAPI/InteractionNamespace"
From Genesys Documentation
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2") |
|||
(6 intermediate revisions by 3 users not shown) | |||
Line 6: | Line 6: | ||
|ComingSoon=No | |ComingSoon=No | ||
|Platform=GenesysEngage-cloud | |Platform=GenesysEngage-cloud | ||
− | |||
|Section={{Section | |Section={{Section | ||
+ | |alignment=Vertical | ||
+ | |structuredtext={{NoteFormat|Depending on your environment, you might need to contact your Genesys representative to complete the configuration described on this page.|}} | ||
+ | |Status=No | ||
+ | }}{{Section | ||
|sectionHeading=Methods | |sectionHeading=Methods | ||
|anchor=Methods | |anchor=Methods | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=The Interaction namespace includes the following methods: | |structuredtext=The Interaction namespace includes the following methods: | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=completeConference|display text=completeConference}} | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=completeTransfer|display text=completeTransfer}} | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=consult|display text=consult}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=deleteUserData|display text=deleteUserData}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=deleteUserData|display text=deleteUserData}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=getByInteractionId|display text=getByInteractionId}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=getByInteractionId|display text=getByInteractionId}} | ||
Line 22: | Line 26: | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=markdone|display text=markdone}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=markdone|display text=markdone}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=blockMarkdone|display text=blockMarkdone}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=blockMarkdone|display text=blockMarkdone}} | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=singleStepConference|display text=singleStepConference}} | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=singleStepTransfer|display text=singleStepTransfer}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=unblockMarkdone|display text=unblockMarkdone}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=unblockMarkdone|display text=unblockMarkdone}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=accept|display text=accept}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=accept|display text=accept}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=reject|display text=reject}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=reject|display text=reject}} | ||
+ | |||
+ | ===completeConference=== | ||
+ | {{{!}} | ||
+ | !Signature | ||
+ | {{!}}<static> completeConference(''consultInteractionId, succeeded, failed'') | ||
+ | {{!}}- | ||
+ | !Description | ||
+ | {{!}}Completes a conference. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}consultInteractionId | ||
+ | {{!}}string | ||
+ | {{!}}The unique identifier for the consultation interaction. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
+ | ===completeTransfer=== | ||
+ | {{{!}} | ||
+ | !Signature | ||
+ | {{!}}<static> completeTransfer(''consultInteractionId, succeeded, failed'') | ||
+ | {{!}}- | ||
+ | !Description | ||
+ | {{!}}Completes a transfer. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}consultInteractionId | ||
+ | {{!}}string | ||
+ | {{!}}The unique identifier for the consultation interaction. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
+ | |||
+ | ===consult=== | ||
+ | {{{!}} | ||
+ | !Signature | ||
+ | {{!}}<static> consult(''interactionId, targetQuery, userData, extensions, succeeded, failed'') | ||
+ | {{!}}- | ||
+ | !Description | ||
+ | {{!}}Make a consultation interaction. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}interactionId | ||
+ | {{!}}string | ||
+ | {{!}}The unique identifier for the interaction. | ||
+ | {{!}}- | ||
+ | {{!}}targetQuery | ||
+ | {{!}}object or string | ||
+ | {{!}}The destination target object, or a character string (for example, phone number). | ||
+ | |||
+ | *If targetQuery is a character string, the Service Client API creates the operation that uses a target of type '''CustomContact''' with a destination set to this value. | ||
+ | *If targetQuery is a JSON object, specify the following sub-parameters: | ||
+ | **'''target (string)''': The target type. The possible values are: "AGENT", "AGENT_GROUP", "SKILL", "INTERACTION_QUEUE", "ROUTING_POINT", and "CUSTOM_CONTACT". | ||
+ | **'''destination (string)''': The destination. The supported values are: the employeeId of an agent, the name of an AgentGroup, the name of a Skill, the name of an InteractionQueue, the name of a RoutingPoint, and a phone number for CustomContact. | ||
+ | **'''[media] (string)''': An optional media used to make the consultation. If not specified, uses the same media as the specified interaction. For example, if the interaction has a "chat" media, and you want to make a voice consultation, you must specify "voice" here. | ||
+ | {{!}}- | ||
+ | {{!}}userData | ||
+ | {{!}}object | ||
+ | {{!}}The attached user data key/value object. Set an undefined or empty JSON object if you don't want to set any user data. | ||
+ | {{!}}- | ||
+ | {{!}}extensions | ||
+ | {{!}}object | ||
+ | {{!}}The extensions key/value object. Set an undefined or empty JSON object if you don't want to set any extensions. This is not applicable for the chat media. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
===deleteUserData=== | ===deleteUserData=== | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> deleteUserData(''interactionId'', ''key'') | + | {{!}}<static> deleteUserData(''interactionId'', ''key'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
− | {{!}}Deletes the user data attached to the interaction. The {{Link-AnywhereElse|product=PEC-AS|version=Current|manual=ManageCC|topic=Service_Client_options|display text=List of User Data Write Allowed}} | + | {{!}}Deletes the user data attached to the interaction. The {{Link-AnywhereElse|product=PEC-AS|version=Current|manual=ManageCC|topic=Service_Client_options|display text=List of User Data Write Allowed}} setting in Agent Setup or the [https://docs.genesys.com/Documentation/Options/Current/HTCC/GWS-interaction-workspace#service-client-api-user-data-write-allowed service-client-api.user-data.write-allowed] configuration option might restrict the allowed key/value pairs. |
{{!}}- | {{!}}- | ||
!Parameters | !Parameters | ||
Line 48: | 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 54: | 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 69: | 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 78: | 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 96: | 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 134: | Line 276: | ||
{{!}}string | {{!}}string | ||
{{!}}The unique identifier for the case. | {{!}}The unique identifier for the case. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 140: | Line 290: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> setUserData(''interactionId'', ''keyValues'') | + | {{!}}<static> setUserData(''interactionId'', ''keyValues'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
− | {{!}}Sets the user data on the live interaction (for voice, this means the {{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=interaction is not in the IDLE state}}). This request overwrites any existing keys on the user data. The {{Link-AnywhereElse|product=PEC-AS|version=Current|manual=ManageCC|topic=Service_Client_options|display text=List of User Data Write Allowed}} | + | {{!}}Sets the user data on the live interaction (for voice, this means the {{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=interaction is not in the IDLE state}}). This request overwrites any existing keys on the user data. The {{Link-AnywhereElse|product=PEC-AS|version=Current|manual=ManageCC|topic=Service_Client_options|display text=List of User Data Write Allowed}} setting in Agent Setup or the [https://docs.genesys.com/Documentation/Options/Current/HTCC/GWS-interaction-workspace#service-client-api-user-data-write-allowed service-client-api.user-data.write-allowed] configuration option might restrict the allowed key/value pairs. |
{{!}}- | {{!}}- | ||
!Parameters | !Parameters | ||
Line 159: | 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 165: | Line 323: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> markdone(''interactionId'') | + | {{!}}<static> markdone(''interactionId'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 180: | 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. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
+ | {{AnchorDiv|outbound}} | ||
+ | ====Outbound interactions==== | ||
+ | The <tt>markdone</tt> 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 [https://docs.genesys.com/Documentation/OU Outbound Contact Server] to stop sending direct push preview records. | ||
===blockMarkdone=== | ===blockMarkdone=== | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> blockMarkdone(''interactionId'', ''warningMessage'') | + | {{!}}<static> blockMarkdone(''interactionId'', ''warningMessage'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 205: | 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. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
+ | |||
+ | ===singleStepConference=== | ||
+ | {{{!}} | ||
+ | !Signature | ||
+ | {{!}}<static> singleStepConference(''interactionId, targetQuery, userData, extensions, succeeded, failed'') | ||
+ | {{!}}- | ||
+ | !Description | ||
+ | {{!}}Make a single step conference. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}interactionId | ||
+ | {{!}}string | ||
+ | {{!}}The unique identifier for the interaction. | ||
+ | {{!}}- | ||
+ | {{!}}targetQuery | ||
+ | {{!}}object or string | ||
+ | {{!}}The destination target object, or a character string (for example, phone number). | ||
+ | |||
+ | *If targetQuery is a character string, the Service Client API creates the operation that uses a target of type '''CustomContact''' with a destination set to this value. | ||
+ | *If targetQuery is a JSON object, specify the following sub-parameters: | ||
+ | **'''type (string)''': The target type. The possible values are: "AGENT", "AGENT_GROUP", "SKILL", "INTERACTION_QUEUE", "ROUTING_POINT", and "CUSTOM_CONTACT". | ||
+ | **'''destination (string)''': The destination. The supported values are: the employeeId of an agent, the name of an AgentGroup, the name of a Skill, the name of an InteractionQueue, the name of a RoutingPoint, and a phone number for CustomContact. | ||
+ | {{!}}- | ||
+ | {{!}}userData | ||
+ | {{!}}object | ||
+ | {{!}}The attached user data key/value object. Set an undefined or empty JSON object if you don't want to set any user data. | ||
+ | {{!}}- | ||
+ | {{!}}extensions | ||
+ | {{!}}object | ||
+ | {{!}}The extensions key/value object. Set an undefined or empty JSON object if you don't want to set any extensions. This is not applicable for the chat media. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
+ | |||
+ | ===singleStepTransfer=== | ||
+ | {{{!}} | ||
+ | !Signature | ||
+ | {{!}}<static> singleStepTransfer(''interactionId, targetQuery, userData, extensions, succeeded, failed'') | ||
+ | {{!}}- | ||
+ | !Description | ||
+ | {{!}}Make a single step transfer. | ||
+ | {{!}}- | ||
+ | !Parameters | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}interactionId | ||
+ | {{!}}string | ||
+ | {{!}}The unique identifier for the interaction. | ||
+ | {{!}}- | ||
+ | {{!}}targetQuery | ||
+ | {{!}}object or string | ||
+ | {{!}}The destination target object, or a character string (for example, phone number). | ||
+ | |||
+ | *If targetQuery is a character string, the Service Client API creates the operation that uses a target of type '''CustomContact''' with a destination set to this value. | ||
+ | *If targetQuery is a JSON object, specify the following sub parameters: | ||
+ | **'''type (string)''': The target type. The possible values are: "AGENT", "AGENT_GROUP", "SKILL", "INTERACTION_QUEUE", "ROUTING_POINT", and "CUSTOM_CONTACT". | ||
+ | **'''destination (string)''': The destination. The supported values are: the employeeId of an Agent, the name of an AgentGroup, the name of a Skill, the name of an InteractionQueue, the name of a RoutingPoint, and a phone number for CustomContact. | ||
+ | {{!}}- | ||
+ | {{!}}userData | ||
+ | {{!}}object | ||
+ | {{!}}The attached user data key/value object. Set an undefined or empty JSON object if you don't want to set any user data. | ||
+ | {{!}}- | ||
+ | {{!}}extensions | ||
+ | {{!}}object | ||
+ | {{!}}The extensions key/value object. Set an undefined or empty JSON object if you don't want to set any extensions. | ||
+ | {{!}}- | ||
+ | {{!}}succeeded | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation succeeds. | ||
+ | {{!}}- | ||
+ | {{!}}failed | ||
+ | {{!}}function | ||
+ | {{!}}A function called when the operation fails. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 211: | Line 484: | ||
{{{!}} | {{{!}} | ||
!Signature | !Signature | ||
− | {{!}}<static> unblockMarkdone(''interactionId'') | + | {{!}}<static> unblockMarkdone(''interactionId'', succeeded, failed) |
{{!}}- | {{!}}- | ||
!Description | !Description | ||
Line 226: | 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 231: | Line 512: | ||
===accept=== | ===accept=== | ||
{{{!}} | {{{!}} | ||
− | ! Signature | + | !Signature |
− | {{!}} <static> accept(''interactionId'', ''succeeded'', ''failed'') | + | {{!}}<static> accept(''interactionId'', ''succeeded'', ''failed'') |
{{!}}- | {{!}}- | ||
− | ! Description | + | !Description |
− | {{!}} Accept an interaction when it is ringing in Agent | + | {{!}}Accept an interaction when it is ringing in Agent Workspace. |
{{!}}- | {{!}}- | ||
− | ! Parameters | + | !Parameters |
{{!}} | {{!}} | ||
{{{!}} | {{{!}} | ||
− | ! Name | + | !Name |
− | ! Type | + | !Type |
− | ! Description | + | !Description |
{{!}}- | {{!}}- | ||
− | {{!}} interactionId | + | {{!}}interactionId |
− | {{!}} string | + | {{!}}string |
− | {{!}} The unique interaction identifier of the interaction to be accepted. | + | {{!}}The unique interaction identifier of the interaction to be accepted. |
{{!}}- | {{!}}- | ||
− | {{!}} succeeded | + | {{!}}succeeded |
− | {{!}} | + | {{!}}function |
− | {{!}} | + | {{!}}A function called when the operation succeeds. |
{{!}}- | {{!}}- | ||
− | {{!}} failed | + | {{!}}failed |
− | {{!}} | + | {{!}}function |
− | {{!}} | + | {{!}}A function called when the operation fails. |
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 260: | Line 541: | ||
===reject=== | ===reject=== | ||
{{{!}} | {{{!}} | ||
− | ! Signature | + | !Signature |
− | {{!}} <static> reject(''interactionId'', ''succeeded'', ''failed'') | + | {{!}}<static> reject(''interactionId'', ''succeeded'', ''failed'') |
{{!}}- | {{!}}- | ||
− | ! Description | + | !Description |
− | {{!}} Reject an interaction when it is | + | {{!}}Reject an interaction when it is ringing in Agent Workspace. |
{{!}}- | {{!}}- | ||
− | ! Parameters | + | !Parameters |
{{!}} | {{!}} | ||
{{{!}} | {{{!}} | ||
− | ! Name | + | !Name |
− | ! Type | + | !Type |
− | ! Description | + | !Description |
{{!}}- | {{!}}- | ||
− | {{!}} interactionId | + | {{!}}interactionId |
− | {{!}} string | + | {{!}}string |
− | {{!}} The unique interaction identifier of the interaction to be rejected. | + | {{!}}The unique interaction identifier of the interaction to be rejected. |
{{!}}- | {{!}}- | ||
− | {{!}} succeeded | + | {{!}}succeeded |
− | {{!}} | + | {{!}}function |
− | {{!}} | + | {{!}}A function called when the operation succeeds. |
{{!}}- | {{!}}- | ||
− | {{!}} failed | + | {{!}}failed |
− | {{!}} | + | {{!}}function |
− | {{!}} | + | {{!}}A function called when the operation fails. |
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
− | |||
− | |||
− | |||
|Status=No | |Status=No | ||
}}{{Section | }}{{Section | ||
Line 294: | Line 572: | ||
|anchor=Typedefinitions | |anchor=Typedefinitions | ||
|alignment=Vertical | |alignment=Vertical | ||
− | |||
− | |||
|structuredtext=The Interaction namespace includes the following object types: | |structuredtext=The Interaction namespace includes the following object types: | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=Interaction}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Interaction|display text=Interaction}} | ||
*{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Party|display text=Party}} | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Party|display text=Party}} | ||
+ | *{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Contact|display text=Contact}} | ||
===Interaction=== | ===Interaction=== | ||
Line 410: | Line 687: | ||
{{!}}boolean | {{!}}boolean | ||
{{!}}Is true if the case containing this interaction is selected, otherwise is false. | {{!}}Is true if the case containing this interaction is selected, otherwise is false. | ||
+ | {{!}}- | ||
+ | {{!}}ronaCallState | ||
+ | {{!}}string | ||
+ | {{!}}This value is populated on event RELEASED when an agent receives an inbound call and does not answer. Possible values are: REDIRECTED or NO_ANSWER. | ||
{{!}}- | {{!}}- | ||
{{!}}isCaseExpanded | {{!}}isCaseExpanded | ||
Line 418: | Line 699: | ||
{{!}}string | {{!}}string | ||
{{!}}The <tt>attr_itx_id</tt> for a multimedia interaction or the <tt>callUuid</tt> for a voice interaction. | {{!}}The <tt>attr_itx_id</tt> for a multimedia interaction or the <tt>callUuid</tt> for a voice interaction. | ||
+ | {{!}}- | ||
+ | {{!}}connId | ||
+ | {{!}}string | ||
+ | {{!}}The unique connection ID from the T-Server. | ||
+ | {{!}}- | ||
+ | {{!}}contact | ||
+ | {{!}}{{Link-SomewhereInThisManual|topic=InteractionNamespace|anchor=Contact|display text=interaction.Contact}} | ||
+ | {{!}}An object representing the contact's information. | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
Line 441: | Line 730: | ||
{{!}}} | {{!}}} | ||
{{!}}} | {{!}}} | ||
− | | | + | |
− | + | {{AnchorDiv|contact}} | |
+ | ===Contact=== | ||
+ | {{{!}} | ||
+ | !Description | ||
+ | {{!}}Represents the JSON structure of a contact. | ||
+ | {{!}}- | ||
+ | !Type | ||
+ | {{!}}Object | ||
+ | {{!}}- | ||
+ | !Properties | ||
+ | {{!}} | ||
+ | {{{!}} | ||
+ | !Name | ||
+ | !Type | ||
+ | !Description | ||
+ | {{!}}- | ||
+ | {{!}}displayName | ||
+ | {{!}}string | ||
+ | {{!}}The contact's display name. | ||
+ | {{!}}- | ||
+ | {{!}}firstNname | ||
+ | {{!}}string | ||
+ | {{!}}The contact's first name. | ||
+ | {{!}}- | ||
+ | {{!}}lastName | ||
+ | {{!}}string | ||
+ | {{!}}The contact's last name. | ||
+ | {{!}}} | ||
+ | {{!}}} | ||
|Status=No | |Status=No | ||
}} | }} | ||
}} | }} |
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!