Customize bot scenario
Access Type: Compliance Report - Editor
Premium Feature: Advanced Compliance Monitoring
Bot scenarios 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:
Custom bot scenarios can also be used to customize the Didomi bot's behavior for scanning multi-step login forms. Click here for more information
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:
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.
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.
Understand if there are any specific trackers triggered for a particular scenario.
Understand website behavior for when an end-user adds an element to a shopping basket.
Bot scenario instruction glossary
When customizing a scenario your organization can select four different instructions to give to the Didomi bot:
The default scenarios 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.
Accept
Will locate and click the action to accept all purposes in the consent notice. Note: This instruction can only be included in a scenario once and will prohibit the use of the Reject instruction in the same scenario.
Refuse
Will locate and click the action to refuse all purposes in the consent notice. Note: This instruction can only be included in a scenario once and will prohibit the use of the Accept instruction in the same scenario.
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.

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:
Navigate to your website and load your consent notice
Right-click the desired element on the consent notice where the Didomi bot should click (or insert text)
Select Inspect from the subsequent menu

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).

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 on the left-hand panel and either add a new domain or edit an existing domain.

Navigate to the bot scenarios section of the subsequent page and either expand the accordion for an existing scenario or click Add scenario.
The Didomi bot only supports up to three active scenarios at a time. Additionally, your organization can only add up to three custom scenarios,

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

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).

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.

Last updated