---
schema_version: "1"
id: c8802865aa8444c48021d0ea871a7b9a39de1923d5a9efec85d56c0e1c217ca0
title: Promotion and Campaign Object Import and Export in B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_promotion_and_campaign_object_import_export.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_promotion_and_campaign_object_import_export.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7bc636bee13b253da659573e621adbd7d93a8e6ffc158c1534553cac141dd70d
description: Use the promotion.xsd schema file to import campaigns and promotions. Promotions can be assigned to multiple campaigns.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Promotion and Campaign Object Import and Export in B2C Commerce

Use the promotion.xsd schema file to import campaigns and promotions. Promotions can be assigned to multiple campaigns.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:39.0625%">
          <col style="width:60.9375%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e43">Object Information</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e46">Details</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e43 ">Schema file</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e46 ">promotion.xsd</td>

          </tr>
          <tr class="">
            <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e43 ">Granularity</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e46 ">Selected promotion.</td>

          </tr>
          <tr class="">
            <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e43 ">Business Manager import location</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e46 "><span class="menucascade"><strong class="uicontrol"><var>site</var></strong> | <strong class="uicontrol">Merchant Tools</strong> | <strong class="uicontrol">Online Marketing</strong> | <strong class="uicontrol">Import &amp; Export</strong></span> and <span class="menucascade"><strong class="uicontrol"><var>site</var></strong> | <strong class="uicontrol">Administration</strong> | <strong class="uicontrol">Site Development</strong> | <strong class="uicontrol">Site Import &amp; Export</strong></span></td>

          </tr>
          <tr class="">
            <td data-label="Object Information" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e43 ">Pipelets</td>

            <td data-label="Details" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e46 "><a name="b2c_promotion_and_campaign_object_import_export__ul_bgc_nmz_1nb"><!-- --></a>
              <ul id="b2c_promotion_and_campaign_object_import_export__ul_bgc_nmz_1nb">
                <li>ImportPromotions</li>

                <li>ExportPromotions</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Globally Excluded Products Import and Export in B2C Commerce

The promotion import includes Global Product Exclusions rules.

When configuring Global Product Exclusions rules, keep the following in mind:

- An empty Global Product Exclusions rule isn't exported.
- Global product exclusion rules are replicated with the campaigns and promotions of the site.
- Global product exclusion rules are replicated with the campaigns and promotions of the site.
- New promotion-level settings are replicated with the promotion.
- The `promotion.xsd` top-level element <promotions> contains the element <global-promotion-settings> of complex type PromotionSettings. This element is the container of the <global-excluded-products> rule.
- The <global-promotion-settings> element is optional and can occur at most one time. The complex types ProductPromotionRule and OrderPromotionRule support the flag <disable-global-excluded-products>.

A site always owns a PromotionSettings instance. This instance can never be deleted, but only reset. The following is how the different modes behave:

   
| <promotion-settings> | Update or Merge | Replace | Delete |
| --- | --- | --- | --- |
| with <global-excluded-products> | Global excluded product rule is created or updated. | PromotionSettings instance is reset to its initial state (meaning that all of its values are removed), after that global excluded products rule is created. | PromotionSettings instance is reset to its initial state (meaning that all of its values are removed). |
| with <global-excluded-products/> empty | If it exists, the global excluded product rule is removed. | PromotionSettings instance is reset to its initial state (means all of its values are removed), after that global excluded products rule is NOT new created. | PromotionSettings instance is reset to its initial state (means all of its values are removed). |
| empty | PromotionSettings instance isn't touched. | PromotionSettings instance is reset to its initial state (means all of its values are removed). | PromotionSettings instance is reset to its initial state (means all of its values are removed). |
| undefined | PromotionSettings instance isn't touched. | PromotionSettings instance isn't touched. | PromotionSettings instance isn't touched. |

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note If the import creates promotions with no <disable-global-excluded-products> flag, it sets the default value to FALSE. The import always updates the global-excluded-products rule completely. There’s no partial update of the rule.

## Attribute Operators in B2C Commerce

Promotion product and shipping product rules support operators for system and custom attributes.

This table lists the system attribute operators.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e316">Attribute</th>
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e319">Operators</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e316 ">ID</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e319 ">
                <p>is equal </p>
                <p>is not equal </p>
                <p>starts with</p>
                <p style="margin-bottom:0;">ends with</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Attribute" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e316 ">Brand</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e319 ">
                <p>exists </p>
                <p>doesn't exist</p>
                <p>is equal </p>
                <p>is not equal </p>
                <p>starts with</p>
                <p style="margin-bottom:0;">ends with</p>
              </td>

            </tr>
          </tbody>
        </table>

This table lists the operators available for any custom attributes you choose to create. Which operators are available differs by the data type of the attribute.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e393">Data Type</th>
              <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d218575e396">Operators</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e393 ">String and Set-of-String</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e396 ">
                <p>exists </p>
                <p>doesn't exist</p>
                <p>is equal </p>
                <p>is not equal </p>
                <p>starts with</p>
                <p style="margin-bottom:0;">ends with</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e393 ">Enum-of-String</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e396 ">
                <p>is equal </p>
                <p>is not equal </p>
                <p>starts with</p>
                <p style="margin-bottom:0;">ends with</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e393 ">Integer, Set-of-Integer, and Enum-of-Integer</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e396 ">
                <p>exists </p>
                <p>doesn't exist</p>
                <p>is equal </p>
                <p>is not equal </p>
                <p>is greater than or equals</p>
                <p style="margin-bottom:0;">is less than or equals</p>
              </td>

            </tr>
            <tr class="">
              <td data-label="Data Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e393 ">Boolean</td>

              <td data-label="Operators" class="slds-cell-wrap" style="vertical-align:top;" headers="d218575e396 ">
                <p>exists </p>
                <p>doesn't exist</p>
                <p style="margin-bottom:0;">is equal </p>
              </td>

            </tr>
          </tbody>
        </table>

## Promotion\_Campaign\_Assignent Element in B2C Commerce

The <promotion-campaign-assignment> element is at the top level in the XML for assignment of promotions to campaigns.

When using the <promotion-campaign-assignment> element, keep the following in mind:

- Each <promotion-campaign-assignment> element requires a <promotion-id> and <campaign-id>matching a valid promotion and campaign. If a promotion or campaign isn't found, an error message is logged and the element is skipped.
- All contained elements are optional. When optional elements aren’t provided for existing assignments in MERGE or UPDATE modes, the corresponding values aren’t changed. When optional elements aren’t provided for new assignments in MERGE and REPLACE modes, default values are used.
- Deletes are supported for the <promotion-campaign-assignment> element using mode="delete".
- When only <promotion-id> or <campaign-id> is provided with a delete, it acts as a wildcard delete. The delete can be for assignments of a specified promotion to all campaigns, or the assignments of all promotions to a specified campaign.
- When both <promotion-id> and <campaign-id> are provided, it's a delete of the assignment of the specified promotion to the specified campaign.
- A warning message is logged if the wildcard delete can't be performed because no assignments match the criteria.

## Trimmed Whitespace in B2C Commerce

Learn how leading and trailing white spaces are managed when editing product rules.

When editing promotions and shipping methods product rules, it's possible to accidentally enter leading and trailing whitespace for some IDs. These IDs can include Products, Price Books, Brands, or Catalog Categories. The system trims leading and trailing white spaces in the following ways:

- Business Manager trims IDs of whitespace when saving a product rule.
- IDs contained in the product rules of existing promotions or shipping methods are also trimmed of whitespace during promotion and shipping method export.