Dynamic coupons

Please note: Dynamic coupons are only supported with WooCommerce. More integrations will be supported in future releases.

Dynamic coupons

Dynamic coupons are a new type of coupon within AffiliateWP.

Rather than needing to manually create and assign a new coupon for every affiliate that needs one, affiliates can have a dynamic coupon automatically generated for them. This can happen as each new affiliate registers, or by the site admin.

All dynamic coupons inherit their coupon settings from the designated coupon template. This makes updating the details of a coupon extremely easy. Just update one WooCommerce coupon, and all affiliate’s dynamic coupons now use the new settings.

The following fields are inherited by dynamic coupons from the coupon template:

  • amount
  • discount_type
  • excluded_product_ids
  • excluded_product_categories
  • product_ids
  • individual_use
  • free_shipping
  • exclude_sale_items
  • date_expires

Note: At this time, settings under the “Usage Limits” section are not inherited or honored by dynamic coupons. In addition, these settings are also not inherited from the “Usage Restriction” section:

  • minimum spend
  • maximum spend
  • product categories
  • Allowed emails

Enabling dynamic coupons

  1. Create a new coupon (if needed) by going to WooCommerce » Coupons » Add Coupon.
  2. From AffiliateWP » Settings » Coupons, select the coupon you created in step one from the Coupon Template select menu.
  3. Click Save Changes.

That’s it! Dynamic coupons are now set up.

Automatically generating dynamic coupons for affiliates

When affiliates join your program, dynamic coupons can be automatically generated for them.

To do this, enable the Automatically Generate Coupons option. You can find this option on the AffiliateWP » Settings » Coupons screen:

Once enabled, a dynamic coupon will be automatically generated when:

  1. An affiliate registers from the front-end using the default affiliate registration form.
  2. Affiliate approval is enabled, and an affiliate is approved from either the “Accept” quick action link, the “Bulk Actions” menu, or from the “Review Affiliate” screen.
  3. An affiliate is added manually from within the WordPress admin, and the “Affiliate Coupon” checkbox is enabled.
  4. Affiliate accounts are created when the setting “Auto Register New Users” is enabled in AffiliateWP » Settings » Misc.

Note: Currently dynamic coupons are automatically generated during new affiliate registration when using the default affiliate registration form. If using a custom affiliate registration form via Gravity Forms or Ninja Forms, dynamic coupons will not be automatically generated when new affiliates register.

Bulk generating dynamic coupons

Dynamic coupons can be bulk generated for all affiliates that do not currently have a dynamic coupon.

  1. Go to AffiliateWP » Tools » Coupons
  2. Click the Generate Coupons button
  3. A dynamic coupon will be generated for all active affiliates that do not already have a dynamic coupon assigned.

It’s also possible to bulk generate dynamic coupons for all affiliates and override all existing dynamic coupons. If an affiliate already has a dynamic coupon, an entirely new coupon will be generated for them.

To override all dynamic coupons:

  1. Enable the Override existing coupon for all affiliates option.
  2. Click the Generate Coupons button

Generating a dynamic coupon for a specific affiliate

A dynamic coupon can be generated for a specific affiliate.

  1. Click the affiliate’s name from the AffiliateWP » Affiliates screen to go to their Edit Affiliate screen.
  2. Next to Dynamic Coupon Code, click the Generate Coupon button.
  3. A dynamic coupon will then be created for the affiliate:

Deleting a dynamic coupon for a specific affiliate

A dynamic coupon can be deleted for a specific affiliate.

  1. Click the affiliate’s name from the AffiliateWP » Affiliates screen to go to their Edit Affiliate screen.
  2. Next to Dynamic Coupon Code, click the Delete Coupon button (see image above).
  3. The coupon code will then be deleted.

Showing a dynamic coupon to the affiliate

Dynamic coupons can be shown to an affiliate from either:

  1. The Affiliate Area
  2. The affiliate accepted email

Affiliate Area

A new Coupons tab will show within the Affiliate Area if:

  1. An affiliate has a dynamic coupon code assigned to them.
  2. An affiliate has one or more manually assigned coupon codes assigned to them.

Application accepted email

Use the new {registration_coupon} email tag to display a dynamic coupon to the affiliate as soon as they have been accepted into your affiliate program.

  1. Go to AffiliateWP » Settings » Emails
  2. In the Application Accepted Email Content text area, enter the {registration_coupon} email tag:
  3. When an affiliate registers they will see the coupon code within their acceptance email: