> For the complete documentation index, see [llms.txt](https://learn.doubletick.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.doubletick.io/bot-studio/triggers/on-attribute-changed.md).

# On Attribute Changed

The **On Attribute Changed** trigger starts a bot flow when an attribute is set, updated, or removed for a customer or channel.

Attributes can store information that helps your team manage conversations and customer journeys, such as lead stage, customer type, location, visit status, or other custom fields.

This trigger is useful when you want your bot to automatically respond to a change in that information—for example, starting a follow-up when a lead moves to a new stage.

<figure><img src="https://2303112206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F53n17VnOICC1LtDqlENV%2Fuploads%2F9P3ydlnfUHZ8ojqaT0UK%2FUntitled%20design%20-%202026-08-12T143429.937.gif?alt=media&amp;token=27d1bcfd-bd67-434b-a750-6943685b9e7f" alt=""><figcaption></figcaption></figure>

### <mark style="color:$primary;">**How to Configure the Trigger**</mark>

#### Step 1. Choose an attribute

Click **Choose attribute**. You can select an attribute from either of these tabs:

* **Customer level** — Attributes linked to a customer. These can include fields such as Chat Status, Support CSAT, Chat Queue, Customer Type, Email ID, WABA Number, org\_ID, or custom fields received through a CRM integration.
* **Channel level** — Attributes linked to a specific channel or WABA, such as Organisation ID, Potential, or No. of WABAs.

#### Step 2. Select where the bot should run

The next option depends on the type of attribute you selected.

**For Customer-level attributes -** Choose the WhatsApp channel on which you want the bot flow to run.

**For Channel-level attributes -** You can select one or more WABA numbers. Use **Select All** if you want the trigger to work for all available channels.

***

### <mark style="color:$primary;">**Choose When the Trigger Should Run**</mark>

After selecting the attribute, choose what kind of change should start the bot.

**On Set First Time -** The bot runs when the attribute is set for the first time, when it previously had no value.Use this option when you only want the automation to run on the initial assignment of the attribute.

**Example:**\
A customer's **Lead Stage** is set to **Interested** for the first time. The bot can start a journey with relevant follow-up messages.&#x20;

**On Changed Any Time -** The bot runs whenever the attribute's value changes. This includes the first time the attribute is set as well as any changes made later.

**Example:**\
A customer's **Lead Stage** changes from **Interested** to **Converted**. The bot can automatically start the onboarding journey.

Use this when every change in the attribute should trigger an automation.

**On Removed -** The bot runs when an attribute value is removed or cleared. This is particularly useful for attributes that are used as flags or status indicators.

**Example:**\
A **Visit Scheduled** attribute is cleared. The bot can start a follow-up asking the customer to reschedule.

***

### <mark style="color:$primary;">**Example Use Case**</mark>

Suppose your sales team uses a **Lead Stage** attribute to track customers through the sales funnel.

You can create a bot flow that starts whenever the lead stage changes:

* **New → Interested:** Send product information.
* **Interested → Qualified:** Notify the sales team or send a follow-up.
* **Qualified → Converted:** Start the onboarding journey.

This helps your team automate follow-ups based on the customer's current stage without manually starting each bot journey.

***

### <mark style="color:$primary;">**Frequently Asked Questions (FAQs)**</mark>

**Can I use On Attribute Changed with both customer and channel attributes?**\
Yes. You can use this trigger with both **Customer-level** and **Channel-level** attributes.

**What is the difference between On Set First Time and On Changed Any Time?**\
**On Set First Time** runs only when an attribute gets a value for the first time. **On Changed Any Time** runs whenever the attribute value changes, including the first time it is set.

**Can I trigger a bot when an attribute is removed?**\
Yes. Select **On Removed** to start the bot when an attribute value is cleared or removed.

**Can I select multiple channels for the trigger?**\
For **Channel-level attributes**, you can select **multiple channels**. For **Customer-level attributes**, you select **one channel** under **Select channel to run bot flow.**

**What can update an attribute?**\
An attribute can be updated through the **Set / Remove Attributes** action, API, CRM integrations, or by editing the customer's profile.

**Can I create different bot actions for different attribute changes?**\
Yes. Each condition—**On Set First Time, On Changed Any Time, and On Removed**—has its own connector, so you can connect each one to a different part of your bot journey.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.doubletick.io/bot-studio/triggers/on-attribute-changed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
