---
schema_version: "1"
id: 29ca5da90855a62b09a4bd1457bd4f41f8fce33132a29f3707b8c5ac141c3304
title: Context Definition Customizations for Custom Product Attributes
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/global_promotions_management_setup_context_service_attributes.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.global_promotions_management_setup_context_service_attributes.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 13d45d075b147ef4531a4f0e1fa80c05967a552320e049af61ace7547a6db57d
description: With Build Your Own Promotion promotion template, marketing managers can create product attribute-based promotion rules such as get 10% off on buying a 512-GB phone. Companies can choose to either use Product Catalog Management or use their own configuration to create product attributes. If a company decides to go ahead with their own product attribute configuration, then the admin must create a custom object that relates products with their attributes. And map the lookup fields of the custom object to attributes in their promotion context definitions.
products:
  - Marketing
release: "264"
---
# Context Definition Customizations for Custom Product Attributes

With Build Your Own Promotion promotion template, marketing managers can create product attribute-based promotion rules such as get 10% off on buying a 512-GB phone. Companies can choose to either use Product Catalog Management or use their own configuration to create product attributes. If a company decides to go ahead with their own product attribute configuration, then the admin must create a custom object that relates products with their attributes. And map the lookup fields of the custom object to attributes in their promotion context definitions.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions with Real-Time Offer Management</td></tr></tbody></table>

## Custom Object

Create a custom object that enables marketing managers to relate products with their attributes. The custom object must have two lookup fields that are related to the Product object and the Attribute Definition object.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-real_time_offer_management-264-0-0-production-enus/9bd7649d-776f-43e6-b210-f781a48bbc79/images/icon_tip.png)

Tip Add a tab for the custom object to ensure that product designers can view the custom object from the App Launcher.

## Product Attribute Records

After the custom object is created, product designers in your company create records in the custom object to relate products with their attributes.

To use product attributes in a promotion, the API name of the attribute definition must be in camel case. For example, enter the API name of the phone storage attribute definition as `phoneStorage`.

## Context Definition Customizations

In the context definitions created for promotions that plan to use Build Your Own Promotion templates, map the Product and Attribute Definition lookup fields of the custom object to context definition attributes.

If the context definition where you must add the product attribute mappings was created by extending the standard CartDetailGetEligiblePromotion context definition, use the standard MapCartLineValueLoyaltyField mapping to map:

- ProductObjectField from CartLineProductAttribute to the Product lookup field in the custom object
- AttributeKey from CartLineProductAttribute to the Attribute Definition lookup field in the custom object

## Product Attribute-Based Promotion Rule Conditions

If an org has product attributes configured by using both Product Catalog Management and the company's own configuration, marketing managers can select the company's configured product attributes while create promotion rule eligibility conditions.

#### See Also

- [_Salesforce Help_: Create a Custom Object in Lightning Experience](https://help.salesforce.com/s/articleView?id=platform.dev_objectcreate_task_lex.htm&type=5&language=en_US)
- [_Salesforce Help_: Create a Custom Object Tab](https://help.salesforce.com/s/articleView?id=platform.creating_custom_object_tabs.htm&type=5&language=en_US)
- [_Salesforce Help_: Add Context Mapping](https://help.salesforce.com/s/articleView?id=ind.context_service_add_context_mapping.htm&type=5&language=en_US)