# Widget Greeting & Nudges (Page Targeting)

The chat widget greets visitors with a two-line welcome message and can show small rotating **nudge messages** ("attention messages") on the closed chat bubble to invite a click. Both can be targeted to specific pages of your website with a point-and-click condition builder — the pricing page can open with different guidance than the blog, and nudges can stay off your checkout entirely.

## What you'll need

- Permission to manage chat agents (`agents:chat:manage`) — ask a workspace admin if the **Edit (Sandbox)** button isn't visible on the agent.
- A chat agent embedded on your site — see [Creating a Chat Agent](/docs/chat-agents/creating-agents).

Changes take effect on your website after you publish them with **Save & Push Live** (or the Promote action). **Save Changes** alone only updates the sandbox copy used for previewing.

## The welcome greeting

The greeting is the first thing a visitor sees when the chat opens. It has two lines:

| Line | Field | Styling |
|---|---|---|
| First line | **Static Greeting** | Bold, e.g. "Hi! I'm your Assistant." |
| Second line | **Static User Instruction** | Muted, e.g. "Ask me anything — I can help with pricing, bookings, and support." |

To set the defaults shown on every page:

1. Open the chat agent for editing and stay on the **Setup** tab.
2. Scroll to the **Instructions & Greeting** section.
3. Fill in **Static Greeting** and **Static User Instruction**.
4. Click **Save Changes** — the live preview pane updates immediately.

<!-- SCREENSHOT: chat-agents/greeting-fields.png — Setup tab, Instructions & Greeting section, with Static Greeting and Static User Instruction filled in and the widget preview showing both lines -->

## Page-targeted user instructions

You can replace the Static User Instruction line on specific pages — for example, "Ask me about plan differences or volume discounts" on `/pricing` while the rest of the site keeps the default.

1. Open the chat agent for editing and go to the **Widget** tab.
2. Open the **Page-Targeted User Instructions** section. The panel at the top shows your current default under **Default (all other pages)**.
3. Click **Add Page-Targeted Instruction**.
4. Type the instruction text for the variant.
5. Under **Show on pages where**, click **Add condition** and build the page rule (see [Building page conditions](#building-page-conditions) below). A variant with no conditions matches every page.
6. Optionally add conditions under **Never on pages where** to exclude pages — an exclusion always wins over a match.
7. Click **Save Changes**, review in the preview, then **Save & Push Live** to publish.

How variants are picked, in order:

1. Variants are checked **top to bottom** — the first enabled variant whose conditions match the visitor's page wins. Use the **↑ / ↓** arrows to reorder; put your most specific variants first.
2. The toggle on each variant enables or disables it without deleting it.
3. If no variant matches, the widget falls back to the default **Static User Instruction**.

<!-- SCREENSHOT: chat-agents/page-targeted-instructions.png — Widget tab, Page-Targeted User Instructions section with two variants, one showing a "Page Path starts with /pricing" condition row -->

## Nudges (attention messages)

Nudges are the short rotating messages shown beside the closed chat bubble ("👋 Hi there! Need help?"). Configure them on the **Widget** tab under **Attention Messages**:

1. Turn on **Enable Attention Messages**.
2. Under **Messages**, edit the provided defaults or click **Add Custom Message**. Each row has:
   - A toggle to enable/disable that message.
   - The message text.
   - A sliders button that opens the message's page-targeting rules — **Only show on pages where** (empty = every page) and **Never show on pages where**. A count badge on the button shows how many conditions the message carries.
3. Under **Never Show On (Global Block Rules)**, add conditions for pages where **no nudge should ever appear** (checkout flows, account areas). Global block rules cannot be overridden by per-message rules.
4. Adjust **Timing Settings**:

| Setting | Meaning | Default |
|---|---|---|
| **Initial Delay (ms)** | Wait before the first nudge appears | 5000 |
| **Message Duration (ms)** | How long each nudge stays visible | 4000 |
| **Interval Between Messages (ms)** | Gap between nudges | 12000 |
| **Max Messages to Show** | Nudges shown before stopping | 3 |

5. **Save Changes**, then **Save & Push Live** to publish.

Rule precedence for nudges: **global block rules → per-message "never show" → per-message "only show"**. A message with no rules can show everywhere that isn't globally blocked.

<!-- SCREENSHOT: chat-agents/attention-message-rules.png — Attention Messages section with one message row expanded, showing the Only show / Never show condition builders -->

## Building page conditions

Everywhere rules appear — instruction variants, per-message nudge rules, and global block rules — you use the same condition builder. Each condition is three choices:

**What to match:**

| Field | Matches against | Example value |
|---|---|---|
| **Page URL** | The full page address | `https://example.com/pricing?ref=ad` |
| **Page Path** | The part after the domain | `/pricing` |
| **Hostname** | The domain only | `www.example.com` |

**How to match:** **equals**, **does not equal**, **contains**, **does not contain**, **starts with**, **ends with**, **matches glob (\* / \*\*)**, and — for hostnames — **is domain or subdomain of**.

**The value** to compare against.

Within one rule list, conditions are **OR-ed**: the list matches when **any** condition matches. Add one condition per page or pattern you want to include.

### Glob patterns

- `*` matches anything **within** one path segment: `/products/*` matches `/products/123` but not `/products/123/reviews`.
- `**` matches **across** segments: `/blog/**` matches `/blog/2026/07/post`.
- A glob on **Page URL** matches against `hostname + path` (no `https://`, no query string), so `example.com/products/**` works as written.

### Examples

| Goal | Condition |
|---|---|
| Only the pricing page | **Page Path** · equals · `/pricing` |
| Pricing and everything under it | **Page Path** · starts with · `/pricing` |
| Any blog post | **Page Path** · matches glob · `/blog/**` |
| Anywhere on a landing-page domain | **Hostname** · is domain or subdomain of · `promo.example.com` |
| Everywhere except checkout | Put **Page Path** · starts with · `/checkout` in the **Never** list |

## Troubleshooting

**My page-targeted instruction isn't showing on the live site.** Check, in order: the variant's toggle is on; a variant **above** it isn't matching first (first match wins — reorder with ↑/↓); a **Never on pages where** condition isn't excluding the page; and the change was published with **Save & Push Live**, not just saved to sandbox.

**Nudges aren't appearing at all.** Confirm **Enable Attention Messages** is on and the page isn't matched by a **Global Block Rule**. Nudges are also suppressed once the visitor opens the chat, and for visitors who have dismissed nudges (their choice is remembered in their browser). Finally, remember the **Initial Delay** — by default the first nudge appears 5 seconds after page load.

**My glob doesn't match.** The most common cause is `*` vs `**` — `*` stops at `/`. `/products/*` won't match `/products/shoes/red`; use `/products/**`.

## Related

- [Creating a Chat Agent](/docs/chat-agents/creating-agents) — embed code, tools, and CSP setup
- [Chat Sessions](/docs/chat-agents/chat-sessions) — reviewing the conversations your widget produces
- [Agent Handoff](/docs/chat-agents/agent-handoff) — transferring a chat to another agent
