# 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. <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. <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/FmMeKce9DZOeSS9CYBYv" 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](/compliance-report/compliance-report-domains/add-domain-to-compliance-report-classic.md) or [edit an existing domain](/compliance-report/compliance-report-domains/edit-compliance-report-domain.md).&#x20;

<figure><img src="/files/QY7isB0LRMGxXEBRrST7" 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>

Utilize the **Add an instruction** tools to add steps to the bot scenario.

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

Input any required information for the Didomi bot to successfully identify the element and execute the desired the action (*i.e CSS selector and/or input text)*.

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

Repeat as necessary to reproduce the sequential steps needed to successfully login. When finished, use the provided arrows to order the instructions into the desired sequence.

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
