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

Dialog Interfaces (V2)

Description

The OIAP provides interfaces for third-party systems to perform real-time dialog operations such as initialization, dialog interaction, dialog transfer, and hangup so that third-party systems can complete multi-round dialog interactions with customers as well as business handling and query.

Compared with the original dialog interfaces, the dialog interfaces (V2) support gray routing based on vdnId (carried in the interface URL). The interface parameters and logic are the same as those of the original dialog interfaces.

Interface Method

The request method must be set to POST.

URL

https://IP:PORT/oifde/rest/v2/crs/process/{vdnId}

Request

Table 1 Parameters in the request body

Parameter

Type

Position

Mandatory

Description

userid

String

Body

Yes

The ODFS establishes call instances internally based on this parameter. The ODFS may have multiple call instances at the same time. Subsequent interactions are associated with the same call based on the parameter.

The value can contain a maximum of 64 characters.

inaction

Integer

Body

Yes

Type of the request that the access party executes this time.

8: dialog initialization request (for the first invoking)

9: request after dialog interaction

11: request after dialog transfer

Note: This parameter is set to 8 for the first interface invoking. In subsequent interactions, the parameter is set to the value of outaction received in the previous interaction.

seat

String

Body

No

Agent type. The default value is vir.

  • vir: virtual agent
  • ass: agent assistant

inparams

Object

Body

Yes

Parameters that are sent to the ODFS to inform the ODFS of the detailed information about the operation result. The value of inparams varies depending on the value of inaction. The parameters are described by scenario.

extparams

Object

Body

No

Optional dynamic parameters that are sent to the ODFS, which are used only in the initialization scenario.

Response

Parameter

Type

Position

Mandatory

Description

ret

Integer

Body

Yes

Execution result.

  • 0: success
  • Other values: failure

userid

String

Body

Yes

The ODFS establishes call instances internally based on this parameter. The ODFS may have multiple call instances at the same time. Subsequent interactions are associated with the same call based on the parameter.

outaction

Integer

Body

Yes

Type of the operation performed by the access party.

  • 9: dialog interaction
  • 11: dialog transfer
  • 10: hangup
  • 12: query
  • 7: packet capture and recording enabled in the dialog
  • 13: recognition result requesting

outparams

Object

Body

Yes

Detailed information required for the access party to complete the operation. The parameters are described by scenario.

Return Code

If the response body does not contain the return code and description, use the native return code of HTTPS.

Return Code

Description

Possible Cause

Solution

200

This operation is successful.

The processing is successful.

-

400

The request is incorrect.

The request URL is incorrect.

Use a correct request URL.

500

The business fails.

The value of a parameter in the request does not exist in the system. For example, the case type code that you send does not exist in the system.

Verify the values of the parameters in the request.

Others

Refer to the standard HTTPS status code.

-

-