Change Agent State

Use the User - Change agent state API to change the agent state to Ready.

This example uses the same agent information as the previous example.

Note

This example shows the URL field for a Unified CCE deployment. In a Unified CCX deployment, you must include the port number in the URL.

  1. In Postman, enter the following string in the URL field:

    Code Snippet
    Copyhttps://finesse1.xyz.com/finesse/api/User/1234
  2. Enter the agent's ID (1234) and password (1001) in the two User Auth fields directly under the URL field.

  3. In the Content Type field, enter application/XML.

  4. In the area under Content Options, enter the following:

    Code Snippet
    Copy<User>
     <state>READY</state>
    </User>
  5. (Optional) To add the requestId:

    1. Click Headers.

    2. In the Name field, enter requestId, and in the Value field, enter xyz.

    3. Click Add/Change

  6. Click PUT.

    Postman returns the following response:

    Code Snippet
    CopyPUT on https://finesse1.xyz.com/finesse/api/User/1234
    Status 202: Accepted

    Finesse returns the following user notification:

    Code Snippet
    Copy<Update>
      <data>
        <user>
          <dialogs>/finesse/api/User/1234/Dialogs</dialogs>
          <extension>1001</extension>
          <firstName>John</firstName>
          <lastName>Smith</lastName>
          <loginId>1234</loginId>
          <loginName>jsmith</loginName>
          <roles>
            <role>Agent</role>
          </roles>
          <state>READY</state>
          <pendingState></pendingState>
          <settings>
            <wrapUpOnIncoming></wrapUpOnIncoming>
            <wrapUpOnOutgoing></wrapUpOnOutgoing>
          </settings>
          <stateChangeTime>2014-05-27T00:35:24.123Z</stateChangeTime> 
          <teamId>1</teamId>
          <teamName>Default</teamName>
          <uri>/finesse/api/User/1234</uri>
        </user>
      </data>
      <event>PUT</event>
      <requestId>xyz</requestId>
      <source>/finesse/api/User/1234</source>
    </Update>