Skip to content
WooCommerce WooCommerce

Order Created → Create Coupon

Generate personalized coupons when WooCommerce orders are placed. Perfect for referral programs, instant rewards, and encouraging additional purchases before checkout.

beginner 5 minutes |
#orders #coupons #referral #woocommerce #rewards

Use Case

When a customer places an order, you want to immediately generate a coupon for them. This can be a referral code to share, an upsell incentive, or a reward for their purchase.

Common scenarios:

  • Referral code for sharing with friends
  • “Add more items” discount before shipping
  • First-time buyer reward
  • Order-specific promotional codes
  • Bundle completion incentives

Step-by-Step Setup

1. Create a New Workflow

Navigate to Sequensy → Workflows in your WordPress admin and click Add New Workflow.

Name your workflow “Order Referral Code Generator” or “Instant Purchase Reward”.

2. Configure the Trigger

Select Order Created as your trigger.

Useful filters:

  • First Order: Only for new customers
  • Products: Specific products that trigger referrals
  • Order Total: Minimum spend for rewards
  • Customer Type: New vs returning

3. Set Up the Create Coupon Action

Configure your coupon:

SettingRecommended ValueDescription
Coupon CodeREF-{customer_id}Unique referral code
Discount TypePercentage15% off
Discount Amount15For referral recipients
Usage LimitUnlimitedOr set per-referral limits
ExpiryNonePermanent referral code

4. Deliver the Coupon

Chain a Send Email action:

Subject: Share this code & earn rewards!

Hi {billing_first_name},

Thanks for your order! Here's your personal referral code:

{coupon_code}

Share it with friends and family:
- They get 15% off their first order
- You'll earn $10 store credit for each referral

Share now: {referral_share_url}

Your order #{order_id} is being processed—we'll send tracking
soon!

5. Test Your Workflow

  1. Enable the workflow
  2. Place a test order
  3. Verify coupon was created
  4. Check email with referral code
  5. Test the coupon works

Pro Tips

Referral tracking: Use customer ID in coupon codes to track who referred whom.

Two-way rewards: Create a system where both referrer and referee benefit.

Permanent codes: For referrals, don’t set expiry—let customers share anytime.

Fraud prevention: Add minimum order requirements to prevent coupon abuse.

Coupon Strategies

Referral Program

Code: FRIEND-{customer_id}
Discount: 15% off for new customers
Referrer Reward: $10 credit per use
Tracking: Link coupon uses to referrer

Add-On Incentive

Code: ADDON-{order_id}
Discount: 20% off next item
Expiry: 24 hours
Message: "Add to your order before it ships!"

First Purchase Thank You

Code: THANKS-{order_id}
Discount: $5 off next order
Min Order: $25
Expiry: 30 days

Bundle Completion

Trigger: Purchased Product A
Code: COMPLETE-{order_id}
Discount: 25% off Product B
Message: "Complete your set!"

Referral Program Setup

Structure

PartyBenefit
New Customer (Referee)15% off first order
Existing Customer (Referrer)$10 credit per referral

Implementation

1. Order Created → Generate referral code
2. Track code usage via coupon analytics
3. When code used:
   - Apply discount to new customer
   - Credit referrer's account

Email Template

Subject: Your personal referral code is ready!

Hi {first_name},

You now have your own referral code to share:

YOUR CODE: {coupon_code}

🎁 Your friends get: 15% off their first order
💰 You get: $10 credit for each friend who orders

Easy sharing:
- Email: Forward this message
- Social: {social_share_links}
- Copy: {coupon_code}

Start sharing: {referral_dashboard_url}

Troubleshooting

Coupon not created?

  • Verify WooCommerce is active
  • Check workflow is enabled
  • Review coupon settings

Duplicate codes?

  • Use order ID or customer ID for uniqueness
  • Check for multiple workflow triggers
  • Review coupon code generation

Referral not tracking?

  • Verify coupon usage is logged
  • Check attribution system
  • Review referrer credit workflow