Outreach rules
Greet visitors with one sentence after a set time, a share read, a pause, on leaving or on a return visit: rules, limits, path filter and speech bubble.
In plain language
The chat window can greet visitors on its own. It does this with a short sentence in a speech bubble. You decide when this happens. It can be after some time on the page or once a part has been read. It can also be after a pause, when leaving the page or on a second visit. With a filter you choose the pages. This page names each field and each limit.
All documentation topics
The Proactive outreach field group decides when the chat window addresses visitors to your website on its own, with a single sentence: after some time on the page, once a share of the page has been read, after a standstill, when the pointer leaves the page or on a second visit. This page covers every field, limit and message, and explains how the speech bubble behaves on your site.
Where to set up rules
-
Step 1
Open Assistants
In the app, go to Work › Assistants at app.xicbot.de/assistenten.
-
Step 2
Expand the assistant
Choose Edit next to the assistant you want. With the Read role the button says View instead and the fields stay locked. Close folds the assistant up again.
-
Step 3
Find the field group
The Chat window on your website section contains the Proactive outreach field group. Below the rules and the Add rule button there is a help text, and at its end a counter shows how many rules there are, for example
0/5. -
Step 4
Add a rule
Add rule puts a new row at the bottom. Pick the event, enter a number and a path where needed, and write the sentence.
-
Step 5
Save
Save submits the entire chat window form. The button reads Saving … while it is sending, and afterwards you see “Saved.”
The fields of a rule
Each field in a row has its label above it: Event, Value, Only on path and Sentence of the prompt. The unit, Seconds or Percent, follows the number field. Screen readers announce the number field with its label and unit, such as “Value Seconds”.
| Field | Required | Limits | Default |
|---|---|---|---|
| Event | yes | one of the five events | After time on the page |
| Value, followed by Seconds or Percent | only for time, share read and standstill | whole number within the event's range | 20 |
| Only on path | no | up to 120 characters, starts with / | empty, meaning every page |
| Sentence of the prompt | yes; a rule without one is dropped on saving | up to 200 characters | empty |
| Remove | – | takes the row out of the form | – |
Add rule is shown while there are fewer than five rules. Underneath you read “One event and one sentence per rule. The first rule that applies speaks; after that the widget stays quiet for this visit. Without a rule nothing appears unasked.” followed by the counter, for example 2/5. In practice “visit” here means a single page view. New rules go to the end of the list, and rules cannot be moved.
The five events
| Event | Number | Range | Fires when … |
|---|---|---|---|
After time on the page (zeit) | seconds | 1 to 600 | the set time has passed, counted from when the chat window loaded |
After share read (tiefe) | percent | 1 to 100 | the bottom edge of the visible area reaches the set share of the page height |
After a standstill (untaetig) | seconds | 5 to 600 | the visitor has not moved the pointer, clicked, typed, scrolled or touched the screen for that long |
When leaving the page (ausstieg) | – | – | the mouse pointer leaves the window across the top edge; only on devices with a mouse or touchpad |
On a second visit (wiederkehr) | – | – | the browser has already loaded a page with this rule within the last 90 days |
When the clock starts
The chat window only loads after the page itself has finished loading. Once it has received its settings from the server, the rules are armed, and that is when the clocks for After time on the page and After a standstill start. The page's own loading time is not included. Scrolling and the mouse wheel do not count as a standstill, because someone who is reading is not idle.
How the share read is measured
The measure is how far down the page the bottom edge of the visible area reaches, rounded to whole percent. At the top of a page three times the height of the window that is already 33 percent, so a rule set to 30 percent fires straight away. A page no taller than the window counts as read to the end. The check runs when the rules are armed, whenever the visitor scrolls and when the window is resized.
On a second visit
For On a second visit the widget keeps a marker in the browser. All it records is “has been here before”; it carries no identifier.
- Name in local storage:
xicbot.besuch.<key>, valid for 90 days. - Every time the rule is armed it reads the marker and writes it again, so the 90 days start over.
- The rule fires if the marker was already there. That is the case from the very next page view, even within the same session.
- The marker is only written on pages whose path matches the rule.
- If the browser does not allow storage, the rule does not fire.
<key>is the value of thedata-xicbotattribute in the embed code. With a different key, counting starts over.
Which rule speaks
- Rules are armed in the order they appear in the form, up to five. Rules without a sentence and rules whose path does not match are skipped.
- The rule whose event happens first speaks, and every other rule is switched off at that moment.
- If several rules already apply at the moment of arming – a second visit, say, or a low share on a short page – the one highest in the form wins.
- The lock lasts for one page view. On the next page of the same site the rules are armed again from scratch.
Path filter
Only on path looks at the start of the page path, leaving out the domain, query string and fragment. Upper and lower case matter. With the field left empty the rule applies on every page that embeds the widget.
| Only on path | Page path | Rule applies |
|---|---|---|
/pricing | /pricing | yes |
/pricing | /pricing/team | yes |
/pricing | /pricinglist | yes |
/pricing/ | /pricing | no |
/pricing | /Pricing | no |
| empty | any path | yes |
The speech bubble
The speech bubble appears where the chat window opens: in the same corner as the chat button, 12 pixels above it, or 12 pixels below it if the button sits at the top. When the button moves aside for a fixed bar on the page, the bubble moves with it. It is at most 320 pixels wide – on narrow screens at most the window width minus 32 pixels – with a white background, dark 15-pixel text and rounded corners.
- The sentence itself is a button at least 48 pixels tall. Clicking it opens the chat window.
- The cross beside it, 44 pixels wide, dismisses the bubble. Screen readers announce it as “Dismiss message” when the chat window is in English, otherwise as “Hinweis schließen”. The rules stay off for the rest of that page view.
The bubble has the status role, so screen readers announce the sentence without moving focus. It is rendered as plain text, meaning asterisks, links or HTML show up exactly as typed. There is no translation, so if your site has an English version, give it its own rule with a matching path such as /en/.
When the button steps back behind an overlay that covers nearly the whole window (80 percent of its height or more), the bubble is hidden too. Details are in Appearance and accessibility.
When no bubble appears
- No rule has a sentence, or no path matches the page being viewed.
- The visitor has already opened the chat window on this page. From that point outreach stays off for the page view.
- The script carries
data-einwilligung="erforderlich"and the visitor has not yet agreed throughwindow.xicbot.einwilligen(). See Consent and visitor rights. - The assistant's status is Draft or paused rather than active, Enable chat window is switched off, or the account is not active. The widget then also takes its button off the page.
- The assistant has no active version yet. No rule is armed then. The button stays on the page, and the opened chat window shows “This assistant is not ready yet.”
- The chat window has not yet received its settings from the server, for example without a network connection. Until then no rule is armed.
window.xicbot.widerrufen()has been called. Revoking takes the rules and any bubble off the page at once. Outreach then stays off until the next page view, even if your page callseinwilligen()again.
Saving and when changes apply
Before sending, the form tidies up: rules without a sentence are dropped, leading and trailing spaces are trimmed from path and sentence, and the number is pulled into the event's range. When leaving the page and On a second visit are sent with the value 0. The server checks the list once more, keeps only ereignis, wert, pfad and text for each rule, and stores an empty list as “no rules”.
Visitors pick up new rules on their next page view. On a page that is already open, the widget only checks for changes when the chat window is opened or the visitor returns to the browser tab, at most once a minute, and even then it takes over the display alone: heading, colour, corner, distances, width, height, scale, corner radius and image, plus the notice below the heading and the limits notice. The rules only apply there after a reload.
Messages when saving
| Message | When |
|---|---|
| “Saved.” | The changes have been saved. |
| “Saved. The embed code for “…” could not be reloaded afterwards. Open that assistant again to see it.” | The changes have been saved; only the embed code could not be fetched again afterwards. |
| “Please check the marked fields.” | The server rejected a rule (422). A sentence at the end of the Proactive outreach field group gives the reason; see below. |
| “With the Read role this area is view-only. Changes need at least the Edit role.” | Your role is not enough to make changes (403). |
| “Too many attempts. Please wait a moment.” | More than 30 changes to assistants per minute by the same signed-in user (429). Creating assistants, versions, restores, renewing the widget key and creating, changing and running the check questions under Acceptance count towards this. |
| “This area stays locked until the email address is confirmed.” | The email address of your login has not been confirmed yet (403). |
| “The service is not responding right now.” | The request did not reach the service, for example because you are offline. |
| “Not saved: the entry in the audit log could not be written. Please try again.” | The change could not be recorded in the audit log (500 with not_logged), so it was not applied. |
| “The service reported an error. Please try again later.” | The service answered with any other server error (5xx). |
If the server rejects a rule, a sentence at the end of the Proactive outreach field group gives the reason: for outreach_rule_path it reads “The path of a rule must start with “/” and be no longer than 120 characters, for example /contact.”, for any other code it reads “A proactive outreach rule is not valid. Check the event, value, path and sentence of each rule.” The app does not say which row is affected. If the server also rejects a field that the app does not mark, the message on saving is “That did not work. Please check your entries.” The API response lists one of the following codes under widget_outreach_rules. Checking stops at the first problem it finds.
| Code | Cause |
|---|---|
outreach_rules_not_a_list | The field is not a list. |
outreach_rules_too_many | More than five rules. |
outreach_rule_not_an_object | An entry is not an object. |
outreach_rule_unknown_event | The event is not one of the five. |
outreach_rule_text | The sentence is empty after trimming or longer than 200 characters. |
outreach_rule_path | The path does not start with / or is longer than 120 characters. The check runs after leading and trailing spaces are trimmed, so spaces before the / do no harm. |
outreach_rule_value | The number is not a whole number or is out of range. A missing number counts as 0, which only suits ausstieg and wiederkehr, as they accept nothing but 0. Digits sent as a string, such as "45", count as a number. |
Roles
| Role | View rules | Change rules |
|---|---|---|
| Read | yes | no |
| Edit | yes | yes |
| Administration | yes | yes |
| Owner | yes | yes |
With Read, the form in the Chat window on your website section is locked, Save included. See Team and roles for more.
API
Rules live on the assistant in the widget_outreach_rules field and are read and changed along with it. Responses return them under widget.outreach_rules. If an update leaves the field out, the rules stay untouched; null or [] deletes them. For the API in general, see API: knowledge and assistants and API limits.
PUT /api/v1/assistants/{id}
Updates an assistant. Every field is optional, and for outreach widget_outreach_rules is enough: a list of up to five objects with ereignis, wert, pfad and text. Returns 200 with assistant; a rejected rule returns 422 and an unknown assistant 404.
- Authentication
- Signed in, confirmed email address, Edit role or higher
- Rate limit
- 30 per minute per signed-in user, shared with creating assistants, versions, restores, renewing the widget key and creating, changing and running check questions
outreach-rules.json json
{
"widget_outreach_rules": [
{ "ereignis": "tiefe", "wert": 60, "pfad": "/pricing", "text": "Questions about the plans? Happy to help." },
{ "ereignis": "ausstieg", "wert": 0, "pfad": "", "text": "Before you go: anything I can answer?" },
{ "ereignis": "zeit", "wert": 45, "pfad": "", "text": "Looking for something in particular?" }
]
}In this example the first rule speaks on /pricing once 60 percent has been read, unless the pointer leaves the page or 45 seconds pass first. On every other page it comes down to leaving and time.
Further reading
- Widget settings: title, colour, position and size of the chat window
- Embed the widget
- Script attributes, including
data-einwilligung - JavaScript and storage
- Consent and visitor rights
- Appearance and accessibility
- Chat in the widget
- Widget delivery
Frequent questions
Why do I not see a speech bubble when testing?
Work through the list: does the rule have a sentence, does the path match the start exactly, is the assistant active, and have you already opened the chat window on this page? If the script carries data-einwilligung="erforderlich", consent has to be given first. Reload the page after saving, and keep in mind that When leaving the page only reacts to a mouse or touchpad.
Can several bubbles appear one after another?
Only one rule speaks per page. Once the visitor moves on to another page the rules are armed again there, and one of them may speak again.
Is the sentence translated into the visitor's language?
No, it is shown exactly as you typed it. For a multilingual site, create one rule per language with its own path, for example /de/ and /en/.
How do I reset the second visit for a test?
Delete the xicbot.besuch.<key> entry from the site's local storage in your browser's developer tools. The next page view then counts as a first visit and sets the marker again; the rule speaks on the view after that.
Does “When leaving the page” work on a smartphone?
No. On touch devices the widget does not arm this rule, since there is no mouse pointer that could leave the page. Use After a standstill or After share read there instead.
Ask it yourself, Assistant of this website
Automated assistant