> ## Documentation Index
> Fetch the complete documentation index at: https://docs.instaforge.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Behaviour

> What the assistant does for messages, comments, tags, story mentions and story replies.

The **Behaviour** page has two parts: what someone sees the first time they write, and **rules** for everything that happens on Instagram.

<Frame caption="Welcome message (1), welcome test (2) and starter questions (3)">
  <img src="https://mintcdn.com/instaforge/HVDnlmyBMfIyfa_y/images/behaviour.png?fit=max&auto=format&n=HVDnlmyBMfIyfa_y&q=85&s=de234c336bf34330c1548010f2315ac2" alt="Welcome message (1), welcome test (2) and starter questions (3)" width="1950" height="415" data-path="images/behaviour.png" />
</Frame>

## First contact

* **Welcome message (1):** sent once, the first time someone writes. If they only said hello, nothing else is sent; if they asked something, the answer follows.
* **Try two welcome messages (2):** half of new people get each version. Each person keeps seeing the same one, and Insights shows which brought more bookings.
* **Starter questions (3):** up to four questions Instagram shows as buttons in a new chat, such as "Prices", "Book a time", "Where are you?". Tapping one sends it as a message.

## Rules

Each rule says: **when this happens** (and the message matches), **then do this**.

| This happens | Example |
| - | - |
| Direct message | Someone writes in Direct |
| Comment | Someone comments under a post or reel |
| Tag in a post or comment | Someone tags the account |
| Story mention | Someone mentions the account in their story |
| Story reply | Someone replies to one of the account's stories |

| Then | What happens |
| - | - |
| Answer with AI | Uses the knowledge base and what it knows about the person |
| Send a fixed message | Exactly your text, no AI |
| Start a question flow | Begins asking the questions of a flow |
| Hand over to a human | Sends the hand-off message and goes quiet in that chat |
| Do nothing | Saves the event only |

For comments you can reply **publicly**, in a **private DM**, or **both** (a short public reply such as "Sent you a DM 📩" while the full answer goes to Direct).

<Info>
  Rules are checked from top to bottom and the first match wins. Put specific rules (keywords, patterns) above general ones.
</Info>

## Examples

<AccordionGroup>
  <Accordion title="Thank people who mention you in their story">
    **When:** Story mention, always. **Then:** Send a fixed message: `Thank you for the mention, {{username}}! 💛`
  </Accordion>

  <Accordion title="Never discuss a sensitive topic">
    **When:** Direct message containing "complaint", "lawyer" or `refund*`. **Then:** Hand over to a human.
  </Accordion>

  <Accordion title="Push a promotion when people ask about prices">
    **When:** Direct message containing `price*` or "how much". **Then:** Answer with AI, with the extra instruction "Mention our 10% discount for first visits".
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.