1. Documentation /
  2. AutomateWoo /
  3. Refer A Friend /
  4. Giving a free gift or coupon as a referral reward

Giving a free gift or coupon as a referral reward

By default, the Refer a Friend add-on uses store credit to reward advocates after a successful referral is made.

To change this and give a free gift as a reward instead, we can use a workflow that generates a unique coupon for the advocate instead. 

Create a Coupon Template

↑ Back to top
  1. Under AutomateWoo > Settings > Refer a Friend tab, set Reward type to No Reward, which eliminates store credit being assigned.
  2. Set up a coupon template by going to Marketing > Coupons and clicking Add Coupon.
  3. Set the name via the Coupon Code field with an example name free-gift-template
  4. From the Publish settings (top right), set the Visibility to Private and click OK
  5. Under the General tab, set Discount type to Percentage discount
  6. Set Coupon amount to 100% meaning products that this apply to will be free.
  7. Under the Usage restriction tab check Individual use only
  8. Then either assign one or more products under Products OR assign categories of products under Product categories. The coupon will be valid to a single product from whatever is specified here.
  9. Under the Usage limits tab, be sure to specify 1 for both Usage limit per coupon and Limit usage to X items, assuming you want to give your advocate only 1 free product per coupon.
  10. Click the Update button to save the changes. 
  11. Copy the coupon name, which is free-gift-template in our example. 

Create a Workflow

↑ Back to top


↑ Back to top
  1. Go to AutomateWoo > Workflows > Add Worflow
  2. Add a title, for example Free gift for advocate
  3. From the Trigger section select Refer a Friend > Referral Status Changed
  4. Set Customer to Friend (Invited customer) – more about the implication of this setting here.
  5. Leave From status blank to apply to any status, or select one or more specific statuses. 
  6. Set To status to Approved or one or more of the statuses of your choice. 
  7. Recheck status before run is checked by default and it’s OK to leave it as is. 
  8. Limit per advocate can be left blank here. 


↑ Back to top

It’s fine to not add any Rules unless you want to limit the workflow in certain ways. For instance, you might not want to send an advocate a free gift for every approved referral, but rather for every 3rd referral. In this case, do the following: 

  1. Click Add Rule Group
  2. From [Select Rule] choose Refer a Friend > Approved Referral Count
  3. Set is to is a multiple of and enter 3 (if you want to run the workflow when an advocate referred 3, 6, 9, etc. customers). 

Do note, if you change a referral’s status to Approved, and then for some reason back to another status, and back to Approved again, that would be counted as 2 referrals approved.


↑ Back to top

Next, let’s send the Advocate their coupon. For that, we’ll configure an Action

  1. Click Add Action
  2. Select Send Email
  3. From the Variable section towards the bottom-right, select advocate.email and copy it to the email’s To field. It should look similar to {{ advocate.email }}
  4. Do the same for advocate.firstname and advocate.lastname, copying their resulting placeholders to the appropriate email fields. 
  5. Add an appropriate title to the Email Subject field, for example Your Approved Referral Free Gift Coupon
  6. We also need to add content to the email, such as links to the products or categories the coupon will apply to. But most importantly, we want to include the advocate’s coupon. 
  7. For this we select advocate.generate_coupon from the Variables list. 
  8. It will open a modal to complete. For template select the name of the coupon, which in our example is free-gift-template
  9. If you want to set an expiry on the coupon, enter the number of days into the expires field. 
  10. The prefix field can help you organise your generated coupon, e.g. ref-adv-free-gift
  11. The default value for limit is 1 and refers to the number of times the coupon can be used. When we created the coupon template, we already set it to 1 for the products and usage, so this can be left as is. 
  12. Once completed, click Copy to clipboard and then paste the result into your email body prefixed by some explanatory text. For example:
    Your free gift coupon is {{ advocate.generate_coupon | template: ‘free-gift-template’, expires: ’30’, prefix: ‘ref-adv-free-gift’ }}

The workflow, as we configured it above, will send a free gift coupon to an advocate for every 3 referrals of theirs that are marked as approved. 

Customer setting in the trigger

↑ Back to top

The Customer setting in the Trigger determines whose information the customer variables will return. If this is set to Friend (Invited Customer), then variables like customer.email, customer.first_name, etc. will return the info of the referred friend. 

However, if the Customer setting is set to Advocate (original customer), then the same set of variables will return the info of the Advocate instead. 
In either case the advocate set of variables will always return the details of the advocate.