Skip to main content

Using Flows to Create Promotion Rules & Conditions Messaging

Use Case: You want to create custom messaging for your promotion to make promotion restriction rules and conditions visible in your storefront.

In this scenario, you'll create a custom flow and corresponding fields to be visible when you create a new promotion using the Promotions Builder.

To set this up, you'll first need to create your flow, then enter the messaging content in your promotion.

Creating the Flow

  1. Create a Flow: Follow the steps to create a flow and create a new flow for your promotion rule messaging.
  2. Enter Slug: In the slug field for your flow settings, enter rule-promotions. This step is important as it allows your flow fields to appear in your promotion configuration area.
  3. Enable your Flow: After you add a description, check the Enabled checkbox to activate your flow, then click Save.
  4. Add Fields to the Flow:
    • Select the flow from the list to open its details.
    • Click +New Field to add fields necessary for your promotion rule messaging, such as eligibility requirements, shipping restrictions, exclusions, or usage limits.
    • Choose the appropriate Field Type (e.g., String for message content).
    • Configure field settings, including name, slug, description, whether it is required, and any default values or validation rules.

After configuring each field, click Save to add it to the flow.

configuring a flow and flow fields for use in promo builder

Adding Messaging to a Promotion in Promotion Builder

  1. Create a Promotion: Follow the steps for creating a new promotion in the Promotions Builder. For this example, we'll create a [Buy X, Get Y](guides/How-To/Promotions Builder/buy-x-get-y-promotion.mdx) promotion.
  2. Save your Promotion: Once all promotion details, conditions, and actions have been added, save your promotion. For this example, we configure that a cart must contain a product from both the "Moisturizer" and "Cleanser" hierarchy nodes and set up a Buy X, Get Y action where the shopper gets 50% off the cheapest treatment added to their cart.
  3. Expand the Custom Fields: To add your promotion rule messaging, expand the Custom Fields box to view the flow you have just created.
  4. Enter Promotion Rule Messaging: Add your messaging in the corresponding string field, then save your promotion.

configuring custom fields from promo builder in commerce manager