Sales & MarketingRetail & E-commerce

Personal Discount Codes Based on Browsing Behavior

Blanket discounts cut margins without targeting the shoppers who need a nudge. This workflow watches for buying signals, such as lingering on a product page, and sends a unique, well-judged discount code to that shopper.

The challenge

Site-wide promotions give money away to customers who would have bought anyway. Meanwhile, the shopper who has returned to the same product three times gets no encouragement at all.

Deciding who should get an offer, and how large it should be, is hard to do by hand. Unique codes also need to be created and tracked so they are not shared or reused.

The solution

Website analytics send events such as an abandoned cart or a long visit on a product page to n8n. An OpenAI model reviews the behavior and decides whether an offer makes sense and what it should be.

The workflow creates a unique discount code through your store's backend, such as Shopify or WooCommerce, and sends it by email, SMS or in-app message. Each code and the customer's response are logged for future remarketing.

How it works

The workflow, step by step

  1. 01Trigger

    Detect buying signals

    Website analytics report events like cart abandonment or long product page visits.

  2. 02Step

    Decide on an offer

    OpenAI reviews the behavior and recommends a suitable discount.

  3. 03Step

    Generate a unique code

    The workflow creates a single-use code in Shopify or WooCommerce.

  4. 04Step

    Send the offer

    The code is delivered by email, SMS or in-app notification.

  5. 05Result

    Log for remarketing

    Code issuance and the customer's response are recorded in the CRM.

Tech stackn8nGoogle AnalyticsOpenAIShopifyWooCommerceTwilioSendGrid

The outcome

Discounts go to shoppers who are showing real interest, rather than to everyone. Unique codes keep offers under control, and the logged data helps you refine your promotion strategy over time.

Want this running in your business?

Tell us about your process and systems. We will show you how this workflow would fit, what it takes to build and how we would launch it safely.