Consent and visitor rights
How to require consent before the first conversation, and how visitors get information, withdraw consent and delete their conversation in the chat window.
In plain language
This page explains visitor consent. You can ask visitors to agree first. Only then does the chat start in the chat window. In the chat window, visitors find their rights over their own chat. They can get a copy of their data. They can delete their chat. If consent is switched on, they can also take it back. They do not need an account for this.
All documentation topics
You can require visitors to agree to storage before the first conversation starts in the chat window. Separately, visitors find their rights over their own conversation under Your data in the chat window: a copy of their data and deleting the conversation, plus withdrawing consent when consent is switched on, with no account and no sign-in. This page covers the setting, the flow in the window, the checks on the service side and the matching endpoints.
Switching consent on
The setting belongs to the assistant. In the app, open Assistants at app.xicbot.de/assistenten, choose the assistant and go to the Chat window on your website section. Members with the Edit role or higher can change it; with the Read role the fields are locked. Save applies the values, after which the section shows Saved. Setting up an assistant is covered in Assistants, roles in Team and roles.
| Field | Default | Effect |
|---|---|---|
| Consent before the first conversation | off | The chat window shows a consent screen before the first conversation. Without agreement nothing can be typed or sent. A visitor who declines closes the window without a conversation being created. |
| Consent wording | empty | Up to 500 characters. Editable while consent is switched on. Empty means the default wording applies, in the language of the window. |
The language of the window is taken first from the data-sprache attribute in the embed code, as long as it starts with de or en. Otherwise the language of the published version applies, falling back to German. The service returns the default wording in that language. Your own wording appears exactly as you entered it, whatever the language. The attribute is described in Script attributes.
| Language | Default wording |
|---|---|
| German | Ich bin damit einverstanden, dass mein Gespräch gespeichert und zur Beantwortung meiner Frage verarbeitet wird. |
| English | I agree that my conversation is stored and processed in order to answer my question. |
The gate in the embed code
With consent switched on, the embed code also carries data-einwilligung="erforderlich". After saving, the app reloads the embed code. The loader reads the gate from this attribute only, not from the setting. If you embedded the code earlier, copy it into your page again: without the attribute, the loader builds the chat window as soon as your page has loaded, and the window fetches its public configuration before your visitor has agreed in your banner. The consent screen in the window still appears in that case. How to embed the code is covered in Embed the widget.
index.html html
<script src="https://cdn.xicbot.de/einbetten.js" data-xicbot="…" data-api="…" data-einwilligung="erforderlich" defer></script>With the attribute, the loader only builds the chat window on its own once your page calls window.xicbot.einwilligen(). It keeps this agreement for 180 days in your page’s storage and during that time loads the window on its own on later page views as well. If the storage cannot be written, for instance because it is blocked or full, the agreement applies only to the current page view; on the next page the loader waits for the call again. It also loads it when the visitor, in the chat window on a previous page, confirmed a suggestion to fill in a form on this page; see Form prefill. If the visitor clicks the launcher before that, it loads anyway: a click is a request. Agreement in your banner does not replace consent in the chat window; one is the banner on your page, the other the screen before the first conversation. Connecting your banner is covered in JavaScript and storage.
The consent screen in the chat window
Whether the screen appears is decided by the service: the public configuration of the window contains consent and the wording in consent_text. A page therefore cannot skip the screen by leaving out a field. If consent is required and there is no conversation yet, the window shows the screen with your wording. The input field and the send button stay locked until the visitor agrees. This applies once the assistant has a published version; until then the window locks the input with This assistant is not ready yet.
| Element | German | English |
|---|---|---|
| Heading | Bevor es losgeht | Before we start |
| Agree | Einverstanden, Chat starten | I agree, start the chat |
| Decline | Ablehnen und schließen | Decline and close |
| Message after declining | Ohne Einwilligung entsteht kein Gespräch. | No conversation without consent. |
| Message when the wording has changed | Der Einwilligungstext wurde geändert. Bitte lesen Sie ihn und stimmen Sie erneut zu. | The consent text has changed. Please read it and agree again. |
-
Step 1
Agree
With I agree, start the chat the screen disappears, the input field is unlocked and the window creates the conversation with
consent: true. For the consent it sends two further values: asconsent_textthe wording the screen showed, and aslanguagethe same language wish as when it fetched the settings, that is the value ofdata-sprache. Without the attribute the value stays empty, and, as when fetching the settings, the service uses the language of the published version, falling back to German. If the wording shown matches the current one, the language in which it was shown counts for the check value. -
Step 2
Check on creation
The service checks this before it creates the conversation: if
consentis not exactlytrue, it answers with 422consent_missingand no conversation is created. If the wording sent differs from the current consent wording, it answers with 422consent_changedand returns the current wording asconsent_text; again no conversation is created. Differences in whitespace, such as a line break instead of a space, several spaces instead of one or a trailing space, do not count as a difference. The comparison covers the wording in both languages, so a change of the published version’s language between loading and agreeing does not count as changed wording. -
Step 3
Record the consent
The service stores the time and the check value on the new conversation and returns the conversation ID to the window. All further visitor rights are tied to this ID.
Decline and close sits next to it with equal weight. The window then creates no conversation, locks the input with No conversation without consent. and asks your page to close the window.
Checks on the service side
The chat window checks consent, and the service checks it a second time. It refuses these actions:
| Action | Condition | Response |
|---|---|---|
| Create a conversation | Consent required, consent is not true | 422 consent_missing |
| Create a conversation | Consent required, the consent_text sent differs from the current wording | 422 consent_changed |
| Send a message | Consent withdrawn | 403 consent_revoked |
| Send a message | Consent required, none recorded on the conversation | 403 consent_missing |
| Rate an answer | Consent withdrawn | 403 consent_revoked |
| Attach a file | Consent withdrawn | 422 consent_revoked |
| Take over the conversation as your team | Consent withdrawn | 403 consent_revoked |
| Your team’s message in a conversation taken over | Consent withdrawn, even after the takeover | 403 consent_revoked |
Consent is attached to the conversation, not to a value in the browser. Such a value can disappear, and consent tied to it could then neither be shown nor withdrawn. Three fields are stored on the conversation:
| Field | Content |
|---|---|
consent_at | Time of agreement, set when the conversation is created. |
consent_hash | SHA-256 over three values separated by |: the consent wording that applies when the conversation is created, that is the wording you entered or, with the field left empty, the default wording in the language in which the screen showed it. Since the service creates no conversation when the wording has changed, this is the wording the visitor agreed to. The other two values are the version of the service’s privacy policy and the host name of the page the window reported. |
consent_revoked_at | Time of withdrawal, otherwise empty. |
Your data: the rights in the chat window
In the header of the chat window, next to the close button, there is a shield icon labelled Privacy. It expands the Your data panel and moves focus to the first button. With Consent before the first conversation switched on, the panel opens with this text:
This conversation is stored by the operator of this website. You can request a copy, withdraw your consent or delete the conversation. Enquiries, appointment requests and baskets you have handed to the operator through the chat stay with the operator as part of their own records, even after the conversation is deleted.
With consent switched off, the middle sentence reads “You can request a copy or delete the conversation.” The Withdraw consent button is then not shown: without consent there is nothing to withdraw.
| Button | Effect | Message on success | Message on failure |
|---|---|---|---|
| Copy of my data | Fetches the information on the conversation and shows it in the Your data panel: a summary, followed by messages and records. | Stored: *count* messages since *start*. Controller: *name*. Conversations are deleted *n* days after they began. If no period is set, it ends with No fixed deletion period is set. instead. | The information could not be loaded. |
| Withdraw consent | Shown only with consent switched on. Withdraws consent for this conversation and locks the input. | Consent withdrawn. If an answer was running, followed by The running answer was stopped. | The withdrawal did not go through. If the conversation has no recorded consent: No consent was given for this conversation, so there is nothing to withdraw. You can still delete it. |
| Delete conversation | Deletes the conversation on the service and clears the history in the window. | Conversation deleted. | The conversation could not be deleted. |
If there is no conversation yet, the three buttons report There is no conversation yet. The information names your account as the controller: the operator of the website is responsible, not XICBOT. If the name is missing, it reads “the website operator”.
Access, withdrawal and deletion remain open to a visitor you have blocked. The service checks the block when a conversation is created and when a message is sent, not for these three rights.
What withdrawing consent does
The service records the withdrawal on the conversation before it looks at whether an answer is running. An answer that is being written sees the withdrawal and stops.
- A second withdrawal changes nothing; the first timestamp stays.
- A running answer checks for a withdrawal at most once per second and one last time when it ends. Its text is not saved, and the partial piece disappears from the window. In Conversations, this message is marked consent withdrawn.
- The tokens used up to that point are still booked, because they were actually consumed. How usage is counted is covered in Plans and quotas.
- After that, the conversation accepts no further messages, ratings or attachments from the visitor. The window locks the input; after a stopped answer it reports Consent withdrawn. This conversation is closed.
- Your team can no longer take over a withdrawn conversation, and cannot write into it even after an earlier takeover. The app then reports The visitor has withdrawn consent. Nothing more can be written to this conversation.
- Withdrawal deletes nothing. The messages up to that point remain stored until the conversation is deleted.
- A conversation without recorded consent cannot be withdrawn. The service then answers with 422
without_consent, and the window reports The withdrawal did not go through.
What the information contains
The service returns the information as JSON. It comes from the conversation itself; there is no separate visitor table. The window shows it below the summary in an area that scrolls on its own: every message with sender (You, Assistant, Staff), time and text. The records follow below: enquiries, appointment requests, baskets with items and total, files with size, and the assistant’s steps with their status. Times use the date format of the window language. There is no file to download; the endpoint further down returns all fields.
| Field | Content |
|---|---|
conversation.started | Start of the conversation |
conversation.host | Host name of the page where the conversation started |
conversation.message_count | Number of messages |
conversation.consent_at, conversation.consent_revoked_at | Time of agreement and of withdrawal, otherwise empty |
messages | All messages in order of time, each with role, text and time |
records.tool_calls | What the assistant triggered on the visitor’s behalf, in shortened form |
records.requests | Enquiries with name, email address, phone, subject and time |
records.appointments | Appointment requests with start, type, name, email address, phone, status and time |
records.attachments | Attached files with name, type, size and checksum, without the content |
records.carts | Handed-over baskets with items, amounts in cents, coupon code, currency and status |
controller | Your account name as the controller |
retention_days | The conversation retention value set in your account, in days; empty if none is set |
The retention setting for conversations is covered in Retention and deletion.
Deleting a conversation
Delete conversation removes the conversation and its messages on the service. Deleting does not require a prior withdrawal. The history disappears from the window, and the loader removes the remembered conversation ID from your page’s storage.
- Staying with you: enquiries, appointment requests and baskets handed to you through the chat. They are your own records and only lose their link to the conversation.
- Audit log: before deleting, and within the same transaction, the service writes a Conversation deleted entry to your account’s Audit log, with channel
widget, the number of messages andby: visitor. No member of your team is listed as the actor. - No entry, no deletion: if the log entry cannot be written, the service deletes nothing and answers with 500
not_logged. The window then reports The conversation could not be deleted.
Other ways in which conversations are deleted are covered in Retention and deletion; finding conversations in your account is covered in Conversations.
Endpoints
The three rights live in the public branch of the widget API, which the chat window calls from other websites. There is no sign-in there: the visitor has no account. The rights are therefore tied to the conversation ID that the service returns to the window when the conversation is created. {key} is the widget key from data-xicbot, {conversation} the conversation ID. The other endpoints of this branch are covered in Widget endpoints, the limits in API limits.
POST /api/v1/public/widget/{key}/conversation/{conversation}/revoke
Withdraws consent for the conversation. Returns 200 with revoked: true and run_aborted, which is true if the conversation had an answer marked as running at that moment. A second call also returns 200, and the first timestamp stays. An unknown conversation returns 404 not_found, a conversation without recorded consent 422 without_consent.
- Authentication
- None; widget key and conversation ID in the path
- Rate limit
- 60 calls per minute per visitor. On top of that, the minute and day limits that apply to your account, counted per visitor and per conversation; above them the service answers 429
too_many_requestswithlimit_per_min,limit_per_day,waitand aRetry-Afterheader.
GET /api/v1/public/widget/{key}/conversation/{conversation}/export
Returns the information as JSON with conversation, messages, records, controller and retention_days. An unknown conversation returns 404 not_found.
- Authentication
- None; widget key and conversation ID in the path
- Rate limit
- 60 calls per minute per visitor. On top of that, the minute and day limits that apply to your account, counted per visitor and per conversation; above them the service answers 429
too_many_requestswithlimit_per_min,limit_per_day,waitand aRetry-Afterheader.
DELETE /api/v1/public/widget/{key}/conversation/{conversation}
Deletes the conversation and its messages. Returns 200 with deleted: true and messages, the number of deleted messages. An unknown conversation returns 404 not_found; if the audit log entry cannot be written, the service answers with 500 not_logged and deletes nothing.
- Authentication
- None; widget key and conversation ID in the path
- Rate limit
- 60 calls per minute per visitor. On top of that, the minute and day limits that apply to your account, counted per visitor and per conversation; above them the service answers 429
too_many_requestswithlimit_per_min,limit_per_day,waitand aRetry-Afterheader.
Consents in the account export
Only the Owner role may fetch your account export; it is described in Privacy and legal. Its consents part lists every conversation with recorded consent, sorted by the time of agreement, with conversation_id, granted_at, revoked_at and content_hash. The conversations part also carries consent_at and consent_revoked_at on each conversation.
Frequent questions
Does agreement in my banner replace the consent screen in the chat window?
No. With data-einwilligung="erforderlich", your banner uses window.xicbot.einwilligen() to control when the loader loads the chat window. Consent to storing the conversation is collected by the window itself when Consent before the first conversation is switched on.
What happens if a visitor declines?
No conversation is created. The window reports No conversation without consent. and closes through your page.
Where can I see when a visitor agreed?
The time and check value of the agreement are stored on the conversation. In the account export you find both in the consents part, together with the time of any withdrawal.
Do enquiries from the chat remain when a visitor deletes their conversation?
Yes. Enquiries, appointment requests and baskets that reached you through the chat remain as your own records and only lose their link to the conversation. Before deleting, the service writes a Conversation deleted entry to your Audit log. If a visitor also asks for their enquiry or appointment to be erased, delete the single case under Cases, see Appointments and cases.
Can a blocked visitor still delete their conversation?
Yes. The block applies when creating a conversation and sending messages. Access, withdrawal and deletion remain open to the visitor.
Ask it yourself, Assistant of this website
Automated assistant