TriggerChatFlow

Updated at:

Triggers an online chat flow that has a manual trigger.

Operation description

  • You can call this operation to trigger a published version of a flow that has a manual trigger. You can also trigger the flow from the Marketing Campaign Management page if the flow is associated with a marketing campaign.

  • Before you call this operation, make sure that the flow has a manual trigger and is published.

  • If a flow with a manual trigger does not have a published version, you must publish it. In Chat Flow, you can click the flow name to open the canvas and publish the version. Alternatively, you can call the OnlineFlowVersion API to publish the version.

  • If your flow contains components that incur costs, such as message sending or function invocations, make sure that you understand the billing methods and pricing for these products before you trigger the flow.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cams:TriggerChatFlow

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

FlowCode

string

Yes

The code of the flow. View the flow code on the Flow Editor page.

9ccc41**************************

Data

object

No

The input parameters in a key-value format. The keys must match the input parameter policy configured in the start node of the flow. To view the variable names in the start node, go to the Flow Editor, click the name of the flow, and open the orchestration canvas.

{ "my_biz_data_0": "hi", "my_biz_data_1": "1024" }

Uuid

string

No

A custom unique ID for the event, used to ensure idempotence. Do not include business semantics in the ID. After the flow is triggered, you can retrieve this parameter from within the flow.

c68622e6-5f0d-c8a4-af41-e949c2a7580e

OutId

string

No

A custom serial number from an external system. Use this parameter to associate the trigger with an external business process. After the flow is triggered, you can retrieve this parameter from within the flow.

8d4acf7e-e360-eb83-6d74-fcf9c4538fda

ClaimTimeMillis

integer

No

The time when the event occurs. This is when the flow is triggered and is typically the time when the request is created. This is a UNIX timestamp in milliseconds.

1731502129000

DiscardTimeMillis

integer

No

The time when the event expires. If you specify this parameter, the trigger is canceled if the request is not processed before this time. This is a UNIX timestamp in milliseconds.

1731502729000

None.

Response elements

Element

Type

Description

Example

object

AccessDeniedDetail

string

Details about the access denied error.

None

RequestId

string

The request ID.

90E63D28-E31D-1EB2-8939-A94866411B2O

Message

string

The error message.

None

Data

object

The returned data.

Code

string

The status code.

OK

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "AccessDeniedDetail": "None",
  "RequestId": "90E63D28-E31D-1EB2-8939-A94866411B2O",
  "Message": "None",
  "Data": {
    "test": "test",
    "test2": 1
  },
  "Code": "OK",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.