> For the complete documentation index, see [llms.txt](https://docs.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.didomi.io/advanced-compliance-monitoring-acm/compliance-report-acm/customize-bot-scenario.md).

# Customize bot scenario

{% hint style="success" %}
**Access Type**: Compliance Report - Editor

**Premium Feature**: Advanced Compliance Monitoring or XL Scan
{% endhint %}

[Bot scenarios](/advanced-compliance-monitoring-acm/compliance-report-acm/bot-scenarios-overview.md) are the instructions used by the Didomi bot to interact with your consent notice and domain in the process of generating the data for your configured compliance report. In this article, we will cover the following:

* [Use case](#use-case)
* [Bot scenario instruction glossary](#bot-scenario-instruction-glossary)
* [Retrieve CSS selectors](#retrieve-css-selectors)
* [Configure customized bot scenario ](#configure-customized-bot-scenario)

{% hint style="info" %}
Custom bot scenarios can also be used to customize the Didomi bot's behavior for scanning multi-step login forms. [Click here](/advanced-compliance-monitoring-acm/compliance-report-acm/scan-domain-that-requires-login.md#multi-step-login) for more information
{% endhint %}

***

### Use case

Below are three generic use cases for why your organization would want to customize the bot scenarios used to produce your compliance report:

<table><thead><tr><th width="100" data-type="number">Use Case</th><th width="637"></th></tr></thead><tbody><tr><td>1</td><td><p>The CMP on the domain is configured in a way that does not align with the default logic of the Didomi bot. For example, if your organization is scanning a consent notice where the action to refuse all purposes and vendors is only on the second layer of the consent notice then the Didomi bot would fail to collect data without a customized Refuse all scenario. </p><p></p><p>This is due to the fact that the default behavior of the Didomi bot is to only search for this action on the first layer of the consent notice.</p></td></tr><tr><td>2</td><td>Understand if there are any specific trackers triggered for a particular scenario.</td></tr><tr><td>3</td><td>Understand website behavior for when an end-user adds an element to a shopping basket.</td></tr></tbody></table>

### Bot scenario instruction glossary

When customizing a scenario your organization can select four different instructions to give to the Didomi bot:

{% hint style="info" %}
The [default scenarios](/advanced-compliance-monitoring-acm/compliance-report-acm/bot-scenarios-overview.md) Accept All and Refuse All that are provided by Didomi will always include an Accept and Refuse instruction, respectively. These actions can not be removed from the default scenarios.
{% endhint %}

| Instruction | Description                                                                                                                                                                                                                                                                                                                                                     |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Accept      | <p>Will locate and click the action to accept all purposes in the consent notice (either programmatically or via specified CSS selector).<br><br><mark style="background-color:$warning;"><strong>Note</strong>: This instruction can only be included in a scenario once and will prohibit the use of the Reject instruction in the same scenario.</mark></p>  |
| Refuse      | <p>Will locate and click the action to refuse all purposes in the consent notice (either programmatically or via specified CSS selector). <br><br><mark style="background-color:$warning;"><strong>Note</strong>: This instruction can only be included in a scenario once and will prohibit the use of the Accept instruction in the same scenario.</mark></p> |
| Click       | Will click on the specified element (identified by the CSS selector).                                                                                                                                                                                                                                                                                           |
| Fill in     | Will navigate to an input field (identified by the CSS selector) and input the configured text.                                                                                                                                                                                                                                                                 |

<figure><img src="/files/BZo0lSJk2560XSlFuoLh" alt="" width="563"><figcaption></figcaption></figure>

### Retrieve CSS selectors

For the **Click** and **Fill in** instructions, the Didomi bot utilizes the provided CSS selector of the element for which it has to click or input text, respectively. In this section, we will cover how to retrieve the CSS selector for an element in your consent notice or website. To collect the CSS selector values:

1. Navigate to your website and load your consent notice
2. Right-click the desired element on the consent notice where the Didomi bot should click (or insert text)
3. Select **Inspect** from the subsequent menu

<figure><img src="/files/RKy2Le7k8Adh6gWHkIxe" alt="" width="375"><figcaption></figcaption></figure>

The element should be highlighted in the Inspector. Right-click the highlighted item in the Inspector and select **Copy > Copy selector** (or **CSS Selector** depending on browser).

<figure><img src="/files/hMLKWiAx3eWaO6sgvSFd" alt="" width="563"><figcaption></figcaption></figure>

Repeat as necessary for elements that the Didomi bot will need to click in order to achieve the desired behavior.

### Configure customized bot scenario

Click **Advanced Compliance Monitoring** or **Compliance Report** on the left-hand panel and either [add a new domain](/tracker-and-vendor-discovery/tracker-and-vendor-discovery-domains/configure-tracker-and-vendor-discovery-classic-scan.md) or [edit an existing domain](/tracker-and-vendor-discovery/tracker-and-vendor-discovery-domains/edit-tracker-and-vendor-discovery.md).&#x20;

<figure><img src="/files/yYhdwlznALKjoIppEtLt" alt="" width="563"><figcaption></figcaption></figure>

Navigate to the bot scenarios section of the subsequent page and either expand the accordion for an existing scenario or click **Add scenario**.

{% hint style="info" %}
The Didomi bot only supports up to three active scenarios at a time for Classic scans. Additionally, your organization can only add up to three custom scenarios,
{% endhint %}

<figure><img src="/files/8tXZNQ5hBEtUaonhszEf" alt="" width="563"><figcaption></figcaption></figure>

Select the tabs below for information on different customizations your organization can make to a scenario:

ALL BOT SCENARIOS now have css selector but for Refuse and Accept instructions its optional

{% tabs %}
{% tab title="Add instruction" %}
Utilize the **Add an instruction** tools to add steps to the bot scenario.

<figure><img src="/files/E2j50HzHcrTN0A1VabrD" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="CSS selector" %}
A CSS selector enables your organization to direct the Didomi bot to identify an element and execute the desired action.&#x20;

<table><thead><tr><th width="130.066650390625">Instruction</th><th width="203.066650390625" data-type="checkbox">CSS Selector Required?</th></tr></thead><tbody><tr><td>Accept</td><td>false</td></tr><tr><td>Refuse</td><td>false</td></tr><tr><td>Click</td><td>true</td></tr><tr><td>Fill in</td><td>true</td></tr></tbody></table>

Input the CSS selector in the provided field for the instruction.

<figure><img src="/files/rOEP6MVPvmkxuG970xQM" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Input text" %}
For the **Fill in** instruction, utilize the provided field to add the text that the Didomi bot should input into a field (identified by its CSS selector).

<figure><img src="/files/ap1FeugPohenUfIyEjbk" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Label" %}
Each instruction has an optional Label field where your organization can add an internal label to the instruction. This label can be useful in identifying the action taken in compliance report results.

<figure><img src="/files/EuNiNowRjg4LfuAvPXGy" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Reorder instructions" %}
Use the provided arrows to order the instructions into the desired sequence.

<figure><img src="/files/9yoEAnqqV3BgCW9uEHYS" alt="" width="563"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.didomi.io/advanced-compliance-monitoring-acm/compliance-report-acm/customize-bot-scenario.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
