Reserved Global Variables
The following are reserved global variables that can be used in code points and parts of other points.
_token
_tokenShortcut to access the data token. Also used to access temporary values passed by invoke points as attributes.
Example
A customer name may be written in the data token as data.crm.customer_name. This can be accessed in a code point as _token.crm.customer_name. To access without _token the data token would need to be imported into the code point.
Usage Notes
- When an invoke point passes values within its
attributeskey, it is temporarily written to the data token. Code points that this invoke activates can access those values using_token.
_this
_thisThe path of an entity, translating to the entity key with the array element index.
Example
If the entity key is selection, and there are three entities, the paths would be selection[0], selection[1], selection[2]. If _this is used on the third entity, it would return selection[2].
Usage Notes
_thiscan be used in point inputs, enabling undirected fill to activate points based on entities._thiscannot be used as the target of a value to be set via code. Instead, use theget_entity_string()function. Below is an example of using this function to set the output of a code point.
return {
[`${get_entity_string()}.write_result.response`]: result,
[`${get_entity_string()}.write_result.message`]: state_message
};token_id
token_idUnique identifier of a token. Useful when searching for a particular token.
task_id
task_idUnique identifier of a task. A task id can be present in multiple tokens. Useful when searching for tokens related to a task.
task_execution_id
task_execution_id
conversation_idSome platform features call for a
conversation_id.task_execution_idandconversation_idare interchangeable.conversation_idis a legacy term that will be deprecated.
Unique identifier for the activation of a configuration. This id is generated when a token has an active configuration. This value is needed for certain actions, such as restarting a task.
_user
_userThe unique identifier of the user who initiated the task, if the task was initiated by a human user.
_entity
_entityThe entity key for a task can be obtained within a point with _token._entity.type
The most common entity key is selection. A good snippet for key retrieval is:
const entityPath = _token._entity?.type ?? "selection";Updated 5 months ago
