Discount name error

Duplicate name conflict

If you are experiencing an error when publishing a discount function, it can be due to a name conflict with another discount or function:

Conflicts may appear if your campaign name is already used as a Shopify Discount.

Shopify Discounts

The Shopify Admin contains all discounts including discount functions created by Function Junction:

Shopify Admin -> Discounts

If you are experiencing a naming error when creating or publishing a discount, it's helpful to understand the type of discounts and how naming is affected.

Automatic Discounts

When creating a discount function in Function Junction, the discount type is set to Automatic. If you manually build an Automatic discount in the Shopify Admin, it's necessary to use a unique or different name for the discount. The Shopify Admin will display an error if a Function Junction discount with the same campaign name is used:

Same name conflict

Discount Code

When building a Discount Code type discount in the Shopify Admin, the discount code can be the same as the campaign name of a Function Junction function. However, this will supersede the Function Junction discount function and only execute the Shopify Platform discount code.

If you happen to use the same name, the Shopify discount will be triggered and not the function made in Function Junction. The platform will always supersede a third-party discount.

Last updated