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

From Genesys Documentation
Jump to: navigation, search
(Published)
 
Line 20: Line 20:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> get() → &#123;{{Link-SomewhereInThisVersion|manual=SCAPI|topic=AgentNamespace|anchor=Agent|display text=agent.Agent}}&#125;
+
{{!}}<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 32: Line 48:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> getState() → &#123;{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.State}}&#125;
+
{{!}}<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 44: 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 56: Line 104:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> setState(''stateOperationName'')
+
{{!}}<static> setState(''stateOperationName, succeeded, failed'')
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
Line 71: 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.
 
{{!}}}
 
{{!}}}
 
{{!}}}
 
{{!}}}

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!