Create the Entity Relation Table
Open the entity that should own the relation
Open the entity that you randomize on (for example, Visitor).
Input a SQL query
Input a SQL query that outputs two columns that specifies the mapping between the entities.
Confidence doesn’t clean the data coming from this table, so it’s important that it’s of high quality
to ensure trustable experiment results. Any required data cleaning can either be done before the data ends up in the
relation table, or inline in the table definition since it can be any SQL query.Below is a short description of possible error cases and how those would affect the results, using the Visitor to User case as an example:
- No mapping exists for a visitor ID: For metrics with padding enabled, the user is included in the calculation of the metrics for the experiment, but get 0 as the metric value. Otherwise, the user is excluded.
- Multiple visitor ID’s map to the same user: The user would be included once, with first exposure set to the earliest assignment for the visitor ID.
- One visitor ID maps to multiple users: All users mapped to the visitor ID would be considered exposed to the experiment.
Create the Experiment
With the entity relation table in place, you can now create the experiment.Create an experiment
Create an experiment and choose the entity that owns the relation as the entity to randomize on.

