Skip to main content

task_rule

idinteger
namestring
trigger_eventstring

What sets the rule off. The event also decides the subject the rule acts on, and therefore which actions it accepts.

Possible values: [deal_created, deal_stage_changed, deal_won, deal_lost, deal_stagnant, task_completed, close_date_overdue, conversation_created, contact_created, task_created, contact_updated, pipeline_created, pipeline_updated, organization_created, organization_updated, product_created, product_updated, service_created, service_updated, message_created]

trigger_settings object

Extra settings that only some triggers read

stagnant_daysinteger

Days without movement before deal_stagnant fires

message_directionstring

Which messages set message_created off. Defaults to incoming — the lead replying, rather than the agent following up.

Possible values: [incoming, outgoing, any]

conditions object[]

All of them have to hold for the actions to run

  • Array [
  • attributestring

    Field on the subject. Prefix with custom_field: to read a custom field.

    operatorstring
    query_operatorstring

    How this condition joins the next one

    valuestring
  • ]
  • actions object[]

    Run in order when the rule fires

  • Array [
  • action_namestring

    Possible values: [create_task, move_stage, assign_owner, change_status, create_deal, send_message, send_webhook, add_label]

    task_typestring

    create_task — the key of a task type

    title_templatestring

    create_task — supports the account's dynamic variables

    description_templatestring

    create_task

    delay_daysinteger

    create_task — how far out the due date lands

    delay_hoursinteger

    create_task

    prioritystring

    create_task

    Possible values: [low, medium, high]

    owner_strategystring

    create_task and create_deal — who ends up responsible. unassigned only applies to create_deal, which has no deal owner to inherit from.

    Possible values: [deal_owner, specific_user, round_robin, unassigned]

    owner_idinteger

    Used when owner_strategy is specific_user

    deal_pipeline_idinteger

    create_deal and move_stage

    deal_stage_idinteger

    create_deal and move_stage

    statusstring

    change_status

    Possible values: [ongoing, won, lost, paused]

    lost_reason_idinteger

    change_status, when the new status is lost

    name_templatestring

    create_deal — the name of the deal that gets opened

    skip_if_open_dealboolean

    create_deal — do nothing when the contact already has an open deal

    content_templatestring

    send_message — supports the account's dynamic variables

    webhook_urlstring

    send_webhook

    labelsstring[]

    add_label

  • ]
  • activeboolean

    An inactive rule stays configured and never fires

    deal_pipeline_idinteger

    Limits the rule to one pipeline. Null means every pipeline.

    deal_stage_idinteger

    Limits the rule to one stage

    created_atinteger
    updated_atinteger
    task_rule
    {
    "id": 0,
    "name": "string",
    "trigger_event": "deal_created",
    "trigger_settings": {
    "stagnant_days": 0,
    "message_direction": "incoming"
    },
    "conditions": [
    {
    "attribute": "string",
    "operator": "string",
    "query_operator": "string",
    "value": "string"
    }
    ],
    "actions": [
    {
    "action_name": "create_task",
    "task_type": "string",
    "title_template": "string",
    "description_template": "string",
    "delay_days": 0,
    "delay_hours": 0,
    "priority": "low",
    "owner_strategy": "deal_owner",
    "owner_id": 0,
    "deal_pipeline_id": 0,
    "deal_stage_id": 0,
    "status": "ongoing",
    "lost_reason_id": 0,
    "name_template": "string",
    "skip_if_open_deal": true,
    "content_template": "string",
    "webhook_url": "string",
    "labels": [
    "string"
    ]
    }
    ],
    "active": true,
    "deal_pipeline_id": 0,
    "deal_stage_id": 0,
    "created_at": 0,
    "updated_at": 0
    }