Skip to main content

Implement Customer-Targeted Pricing

Use customer-targeted pricing to apply a pricing rule to a subset of customers, such as when you want to offer a special promotion to first-time visitors to your storefront. With Price Rules, you can target subsets of customers based on their attributes:

AttributeDescriptionExample use case
Customer groupTargets customers based on their membership in groups created on your storefront's ecommerce platform.Promotions for first-time customers.
Customer IDTargets your storefront's unique ID for a customer who is logged in to your ecommerce store.Promotions for members of a brand loyalty program.
Referral URLTargets customers based on the URL in the referer header of their HTTP request to your storefront.Promotions for customers who visit your store from a partner website.
SourceTargets customers based on the value of a custom parameter in the link used to visit your storefront.Promotions for customers who visit your store from an email campaign.

Using customer-targeted conditions

To target a subset of customers with Price Rules, add a rule to your ruleset that includes a customer-targeted condition.

Customer-targeted conditions require these properties:

NameTypeDescription
typestring enumerationThe type of customer-targeted condition to apply.
valuestringThe value for the customer property that the condition targets.

The following example condition uses the CUSTOMER_GROUP type to target customers in the first-time-buyer group:

"conditions": [
{
"type": "CUSTOMER_GROUP",
"value": "first-time-buyer"
}
]

Price Rules supports these customer-targeted condition types and values:

Condition typeValueExample
CUSTOMER_GROUPThe customer tag or group you want to target.The first-time-buyer group.
CUSTOMER_IDThe email address of the customer you want to target. Bold uses the email address to retrieve the customer's unique ID from your ecommerce platform.[email protected]
REF_URLThe URL from the referer header of the customer's HTTP request to your storefront.https://example.com
SOURCEThe value of the preSource parameter found in the URL used to visit your store. Use the preSource parameter when constructing links for a promotion, such as an email campaign, then use this condition type to target customers who visit your store from that link.The string emailCampaign in the URL https://example.com?preSource=emailCampaign.

Creating customer-targeted promotions

Combine customer-targeted conditions with price adjustments to create targeted promotions.

The following example ruleset creates a promotion where customers who visit a link from an email campaign get 10% off the price of selected products. The SOURCE condition type in this example targets URLs where the preSource parameter has the value emailCampaign. In this way, only customers who visit the store using the link from the email campaign — https://example.com?preSource=emailCampaign — qualify for the discount.

{
"ruleset": {
"external_id": "Email_campaign_promotion",
"internal_name": "Email campaign promotion",
"product_selection": {
"type": "PRODUCT_SEARCH",
"sku_ids": ["PO-TS-34-BK", "PO-TS-34-BL"]
},
"rules": [
{
"type": "DISCOUNT",
"conditions": [
{
"type": "SOURCE",
"value": "emailCampaign"
}
],
"actions": [
{
"type": "PRICE_ADJUST_PERCENTAGE",
"value": -10
}
]
}
]
}
}

To publish your targeted promotion, use the Price Rules API to create a ruleset.