Automation rules

Update automation rule in Account

Update a automation rule in account

patch/v1/workspaces/{workspace_id}/automation_rules/{id}

Request

  • Base URL: https://api.oxvo.com
  • URL: https://api.oxvo.com/v1/workspaces/{workspace_id}/automation_rules/{id}
  • Auth: API key in header api_access_token

Path parameters

idinteger required

The ID of the automation rule to be updated.

Request body

namestring

Rule name

descriptionstring

The description about the automation and actions

event_name'conversation_created' | 'conversation_updated' | 'conversation_resolved' | 'message_created'

The event when you want to execute the automation actions

activeboolean

Enable/disable automation rule

actionsobject[]

Array of actions which you want to perform when condition matches, e.g add label support if message contains content help.

conditionsobject[]

Array of conditions on which conversation filter would work, e.g message content contains text help.

Example request

{
  "name": "Add label on message create event",
  "description": "Add label support and sales on message create event if incoming message content contains text help",
  "event_name": "message_created",
  "actions": [
    {
      "action_name": "add_label",
      "action_params": [
        "support"
      ]
    }
  ],
  "conditions": [
    {
      "attribute_key": "content",
      "filter_operator": "contains",
      "query_operator": "OR",
      "values": [
        "help"
      ]
    }
  ]
}

Response

Success

Example response

{
  "payload": [
    {
      "name": "Add label on message create event",
      "description": "Add label support and sales on message create event if incoming message content contains text help",
      "event_name": "message_created",
      "conditions": [
        {
          "attribute_key": "content",
          "filter_operator": "contains",
          "values": [
            "help"
          ],
          "query_operator": "and"
        }
      ],
      "actions": [
        {
          "action_name": "add_label",
          "action_params": [
            "support",
            "sales"
          ]
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.