Chat icon

Chat

Interact with the Chat API

Actions253

Automation Rule → Update

AI-generated

Summary

Updates an existing automation rule for a given Approach account.

Inputs

  • accountId (required) — Select the Approach account that contains the automation rule to update.
  • automationRuleId (required) — Select the automation rule to update, either by ID or from a list.
  • active — Set whether the automation rule should be active after the update.
  • name — New name for the automation rule.
  • description — New description for the automation rule.
  • event_name — The event that triggers the automation rule (e.g., message_created, conversation_opened).
  • queryOperator — Logic for combining multiple conditions: AND (all must match) or OR (any can match).
  • conditions — Collection of conditions that determine when the rule runs. Each condition includes an attribute, operator, and values.
  • updateFields — Collection of actions to perform when the rule triggers. Each action defines a type (e.g., send_message, assign_agent) and its associated parameters.

Output shape

object

Returns the updated automation rule object as provided by the Approach API.

Examples

Example 1: Assign a conversation to a specific agent when a new message arrives.

Select account and rule, set event_name to 'message_created', add a condition on 'message_type' = 'incoming', add an action of type 'assign_agent' with the desired agent ID.

Links

Discussion