---
title: B2B Schemas and Datasets
slug: qatar-airways-bootcamp/b2b-schemas-and-datasets
docTags: 
createdAt: 2024-07-21T21:36:45.681Z
---

Adobe Real-Time Customer Data Platform B2B Edition provides several Experience Data Model (XDM) classes that capture fundamental B2B data entities, including [accounts](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-account), [opportunities](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-opportunity), [campaigns](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-campaign), and more. By building schemas based on these classes and enabling them for use in [Real-Time Customer Profile](https://experienceleague.adobe.com/en/docs/experience-platform/profile/home), you can merge data from disparate sources into a unified representation called a union schema.

However, union schemas can only contain fields captured by schemas that share the same class. This is where schema relationships come in. By implementing relationships in your B2B schemas, you can describe how these business entities relate to each other and can include attributes from multiple classes in downstream segmentation use cases.

The following diagram provides an example of how the different B2B classes can relate to each other in a basic implementation:

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/rVoGzF_sKd5GstKOTnpZE_screenshot-2024-07-22-at-115337.png)

## Creating a B2B Account schema

In this exercise, we will explore the B2B Data Model and create a Schema for Business Accounts.&#x20;

:::hint{type="info"}
To log into the Adobe Experience Platform, check the **Introduction Section.**
:::

1. Go to the Adobe Experience Platform [Homepage](https://experience.adobe.com/#/@adobeamericaspot4/sname\:sandbox20/platform/home)
2. Click on **Schemas** in the menu on the left side of your screen.
3. Click the button to **+ Create Schema** in the top right corner of your screen, and select **Other.&#x20;**
4. Search for **Account,** and select the option **B2B Business Account.**
5. Click **Next**.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/GnQs1lynXpbZ7mpJS73NJ_screenshot-2024-07-22-at-115753.png)

5\. Give your schema a name, for example: **`[your name] - Account Details`**, and selec&#x74;**&#x20;Finish.**

For this exercise, we will add two field groups:

- **XDM Business Account Details** – This is a pre-built field group which describes a business account.
- **Qatar - B2B Account Details** – This is a custom field group that will be created to ingest more information about the business which may have been sourced from a 3rd Party.

7\. Select **Add field groups**

8\. Search for the **XDM Business Account Details&#x20;**&#x66;ield group from the Standard Field Groups. Add this field group to the Schema.

9\. Next, search for the **Qatar - B2B Account Details** field group from the Custom field groups. Add this field group to the Schema.&#x20;

10\. Your Schema should now look like below:

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/j4yXIVRyaWRbhMnRI5qnx_screenshot-2024-07-22-at-122329.png)

:::hint{type="warning"}
We're not going to add any further fields groups or extend existing field groups in this Lab. The purpose is to simple explore the B2B Classes and Relationships.
:::

### Setting the Primary Identity

B2B Source is a standard Experience Data Model (XDM) data type that represents a composite identifier for a B2B entity (such as an [account](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-account), an [opportunity](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-opportunity), or a [campaign](https://experienceleague.adobe.com/en/docs/experience-platform/xdm/classes/b2b/business-campaign)).

When relying solely on string-based identifiers, there can be overlaps between IDs across multiple systems (for example, an opportunity could be given a string ID on one CRM system, but that same ID could refer to a completely different opportunity). This can result in data conflicts when merging data in [Real-Time Customer Profile](https://experienceleague.adobe.com/en/docs/experience-platform/profile/home).

The B2B Source data type allows you to to use the original string ID of an entity and combine it with source-specific contextual information to ensure that it remains wholly unique in the Platform system regardless of the source it originated from.

To set the primary identity for our B2B Account Schema

1. Click on the **Class** in the left hand menu to highlight the full schema.
2. Expand the **accountKey&#x20;**&#x6E;ode, and select the **sourceKey** field.&#x20;
3. Set this as the Primary Identity and Select the namespace, **`B2B Account`** from the dropdown
4. Click **Apply**, and **Save** your Schema.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/abVplXB0w9qFwsg3A9wns_screenshot-2024-07-22-at-122844.png)

:::hint{type="success"}
**Congratulations**! You have created your first B2B Schema
:::

