Difference between revisions of "PEC-Developer/Current/SCAPI/AgentNamespace"

From Genesys Documentation
Jump to: navigation, search
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2")
 
(One intermediate revision by one other user not shown)
Line 6: Line 6:
 
|ComingSoon=No
 
|ComingSoon=No
 
|Platform=GenesysEngage-cloud
 
|Platform=GenesysEngage-cloud
|Prereq=
 
 
|Section={{Section
 
|Section={{Section
 
|sectionHeading=Methods
 
|sectionHeading=Methods
 
|anchor=Methods
 
|anchor=Methods
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=The Agent namespace includes the following methods:
 
|structuredtext=The Agent namespace includes the following methods:
  
Line 23: Line 20:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> get() → {{{Link-SomewhereInThisManual|topic=AgentNamespace|anchor=Agent|display text=agent.Agent}}}
+
{{!}}<static> get(''succeeded, failed'') → &#123;{{Link-SomewhereInThisVersion|manual=SCAPI|topic=AgentNamespace|anchor=Agent|display text=agent.Agent}}&#125;
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
 
{{!}}Gets the agent's attributes.
 
{{!}}Gets the agent's attributes.
 +
{{!}}-
 +
!Parameters
 +
{{!}}
 +
{{{!}} class="wikitable"
 +
!Name
 +
!Type
 +
!Description
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 +
{{!}}}
 
{{!}}-
 
{{!}}-
 
!Returns
 
!Returns
Line 35: Line 48:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> getState() → {{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.State}}}
+
{{!}}<static> getState(''succeeded, failed'') → &#123;{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.State}}&#125;
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
 
{{!}}Gets the agent's state.
 
{{!}}Gets the agent's state.
 +
{{!}}-
 +
!Parameters
 +
{{!}}
 +
{{{!}} class="wikitable"
 +
!Name
 +
!Type
 +
!Description
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 +
{{!}}}
 
{{!}}-
 
{{!}}-
 
!Returns
 
!Returns
Line 47: Line 76:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> getStateList() → {Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.State}}>}
+
{{!}}<static> getStateList(''succeeded, failed'') → {Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.State}}>}
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
 
{{!}}Gets the list of possible agent states.
 
{{!}}Gets the list of possible agent states.
 +
{{!}}-
 +
!Parameters
 +
{{!}}
 +
{{{!}} class="wikitable"
 +
!Name
 +
!Type
 +
!Description
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 +
{{!}}}
 
{{!}}-
 
{{!}}-
 
!Returns
 
!Returns
Line 59: Line 104:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> setState(''stateOperationName'')
+
{{!}}<static> setState(''stateOperationName, succeeded, failed'')
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
Line 74: Line 119:
 
{{!}}string
 
{{!}}string
 
{{!}}An <tt>operationName</tt> from the agent states list. See {{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=State}}.
 
{{!}}An <tt>operationName</tt> from the agent states list. See {{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=State}}.
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 
{{!}}}
 
{{!}}}
 
{{!}}}
 
{{!}}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 83: Line 134:
 
|anchor=TypeDefinitions
 
|anchor=TypeDefinitions
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=The agent namespace includes the following object types:
 
|structuredtext=The agent namespace includes the following object types:
  
 
*{{Link-SomewhereInThisManual|topic=AgentNamespace|anchor=Agent|display text=Agent}}
 
*{{Link-SomewhereInThisManual|topic=AgentNamespace|anchor=Agent|display text=Agent}}
 
+
{{AnchorDiv|Agent}}
 
===Agent===
 
===Agent===
 
{{{!}}
 
{{{!}}
Line 121: Line 170:
 
{{!}}}
 
{{!}}}
 
{{!}}}
 
{{!}}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Latest revision as of 13:44, February 22, 2023

This topic is part of the manual Service Client API Reference for version Current of Developer.

Learn about the Agent namespace methods and type definitions in the Service Client API.

Methods

The Agent namespace includes the following methods:

get

Signature <static> get(succeeded, failed) → {agent.Agent}
Description Gets the agent's attributes.
Parameters
Name Type Description
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.
Returns agent.Agent

getState

Signature <static> getState(succeeded, failed) → {media.State}
Description Gets the agent's state.
Parameters
Name Type Description
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.
Returns media.State

getStateList

Signature <static> getStateList(succeeded, failed) → {Array.<media.State>}
Description Gets the list of possible agent states.
Parameters
Name Type Description
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.
Returns Array.<media.State>

setState

Signature <static> setState(stateOperationName, succeeded, failed)
Description Sets the agent's state.
Parameters
Name Type Description
stateOperationName string An operationName from the agent states list. See State.
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.

Type definitions

The agent namespace includes the following object types:

Agent

Description Represents the JSON structure of the agent.
Type Object
Properties
Name Type Description
employeeId string The agent's unique identifier used for routing purposes.
firstname string The agent's first name.
lastname string The agent's last name.
username string The agent's username. This is a global unique ID.
Comments or questions about this documentation? Contact us for support!