Updated on 2023-09-27 GMT+08:00

Flow Status Change Interface

Interface Method

POST

URL

https://IP:PORT/oifde/rest/api/flow/changeWorkMode

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

tenantId

String

Body

Yes

Tenant ID.

callId

String

Body

Yes

Session ID.

agentId

String

Body

Yes

Agent ID.

workMode

String

Body

Yes

Session state, that is, the state of the flow to be switched.

0: common state

1: supervision state

2: insertion state

3: transfer state

NOTE:

This interface can be invoked to switch the status only in the supervision or insertion state. The new status is compared with the status of the current session.

  • The supervision state and the insertion state change with each other. The session determines how the silent agent controls the session based on the new state.
  • When the supervision or insertion state is changed to the common state, the session is no longer controlled by the silent agent.
  • When the supervision or insertion state is changed to the transfer state, the call is transferred in the session.

callTransferRequest

Object

Body

This parameter is mandatory when workMode is set to 3.

For details about call transfer parameters, see Table 2.

authToken

String

Body

Yes

Authentication token.

For details, see C3 OIAP Interface Authentication.

Table 2 callTransferRequest

Parameter

Type

Position

Mandatory

Description

callTransferType

String

Body

Yes

Call transfer type.

1: transfer to the manual service (to a skill queue by routing code)

2: transfer to an IVR

3: transfer to the manual service (to a skill queue by skill name)

4: transfer to the manual service (to an agent by ID)

5: transfer to a third-party number

6: online digital assistance

7: transfer to the manual service (to the last agent. Currently, only multimedia is supported.)

8: transfer to the manual service (to the skill queue to which an agent belongs. Currently, only multimedia is supported.)

31: transfer to a multimedia message (to the last agent)

32: transfer to a multimedia message (to a skill queue)

33: transfer to a multimedia message (to an agent)

callTransferRouteValue

String

Body

Yes

Call transfer route value.

  • If callTransferType is set to 1, set this parameter to the route code for transferring a call to a skill queue. For this configuration, you need to ensure that the manual flow and the current flow are under the same system access code. The call is transferred to the manual skill queue through the extension code configured on the Called Route page.
  • If callTransferType is set to 2, set this parameter to the IVR flow access code.
  • The figure shows the IVR flow access code in the AICC integration deployment mode.
  • If callTransferType is set to 3, set this parameter to the name of the skill queue where the agent to whom the call is transferred resides, for example, Agent Group 1.
  • If callTransferType is set to 4, set this parameter to the platform employee ID of the agent to whom the call is transferred.
  • If callTransferType is set to 5, set this parameter to the third-party number.
  • If callTransferType is set to 6, set this parameter to the flow route code agreed with the third-party intelligent system.
  • If callTransferType is set to 7, you do not need to set this parameter.
  • If callTransferType is set to 8, set this parameter to the platform employee ID or variable corresponding to the agent to whom the call is transferred.
  • If callTransferType is set to 31, you do not need to set this parameter.
  • If callTransferType is set to 32, set this parameter to the name or access code of the skill queue where the agent to whom the call is transferred resides.
  • If callTransferType is set to 33, set this parameter to the platform employee ID or variable corresponding to the agent to whom the call is transferred.

callTransferTransData

String

Body

No

Channel-associated data.

callTransferNumber

String

Body

No

Calling number.

Response

Parameter

Type

Position

Mandatory

Description

errorCode

String

Body

No

Error code.

  • 0: success
  • Other values: failure

errorMsg

String

Body

No

Response description.

Example

  • Request
    { 
        "tenantId":"XXX",
        "callId":"123123412300030010",
        "agentId":"88880002",
        "workMode":"3",
        "authToken": "t***********************",
        "callTransferRequest"{
             "callTransferType":"5",
             "callTransferRouteValue":"88880006",
             "callTransferTransData":"",
             "callTransferNumber":""
         }
     }
  • Response
    { 
         "errorCode" : "0",
         "errorMsg" : "" 
     }