The record.search: command returns record dictionaries from a search query.
start:
record.search:
inputs:
record_type: ticket
record_query: status:${status}
record_query_params:
status: o
output: results
Syntax
inputs:
Key | |
---|---|
record_type: |
The record type to search. |
record_query: |
The search query to match. Use limit:1 to return a single dictionary rather than an array of dictionaries. |
record_query_params: |
Query parameters with untrusted user input as keys/values. Reference these as ${param} in queries. |
validation@raw: |
An optional template to validate results. Any non-empty output triggers the on_error: event. |
validation@raw:
A template with scripting syntax where any output is considered to be an error that triggers the on_error:
event.
For instance, a record.search:
with an id:123 limit:1
query that fails the automation if the expected record is not found. This is a shortcut for adding an on_success:outcome:if@bool:
for every lookup.
output:
Save the search results as record dictionaries in this placeholder.
on_simulate:
The commands to run during simulation instead of searching records.
If omitted, records are searched during simulation.
on_success:
The commands to run on success.
The output:
placeholder is an array of record dictionaries.
on_error:
The commands to run on failure. If omitted, the automation exits in the error
state.
The output:
placeholder receives a dictionary with these keys:
Key | |
---|---|
error |
The error message. |