LetsFlow
Search…
Response
Executing an action in a process results a response. This is regardless of whether the action is performed manually by the user of automatically by the node.

Sending a response

Sending a response must be done by adding an event with a response resource to the event chain.
YAML
JSON
1
$schema: https://specs.letsflow.io/v0.2.0/response/schema.json#
2
process: 234jashaj3ljk34jkala
3
action: request_quote
4
response: ok
5
data:
6
name: John Doe
8
product: kettle washed jeans
9
quantity: 700
Copied!
1
{
2
"$schema": "https://specs.letsflow.io/v0.2.0/response/schema.json#",
3
"process": "234jashaj3ljk34jkala",
4
"action": "request_quote",
5
"data": {
6
"name": "John Doe",
7
"email": "[email protected]",
8
"product": "kettle washed jeans",
9
"quantity": 700
10
}
11
}
Copied!

Response schema

$schema

The Live Contracts response JSON schema URI that describes the JSON structure of the response.

process

The process id or process as object. If the process is an object, only the id property is used and the rest is ignored.

action

The key of the action that was performed.

response

The key of the response defined by the action. This property may be omitted, defaulting to ok.

data

The response data. What is expected depends on the action, specifically on the update instruction.