Progressive Discount Return Email via LyrisHQ
Requirement
If the customer abandons the shopping cart and they have never ordered from us before then:
- Send them an email with a unique coupon code and a link to return to their cart.
- After 3 days if the customer has not ordered, send them another email with a different coupon and a link to return to their cart.
- After 4 days if the customer has not ordered, send them another email with a different coupon and a link to return to their cart.
Prerequisites
In order to use this tutorial you must have your Lyris account configured under:
Inside of Lyris you must have the following merge fields defined on your list:
- returnlink
- returncoupon
Inside of UltraCart you must have your coupons configured under:
Plan
Create a campaign with the steps below. Ensure that the proper enrollment trigger is set.
Step | Type | Description |
---|---|---|
Start | Start |
|
L1 | Logic | See if the customer has ordered and send email 1 with coupon 1 |
P1 | Pause | Wait 3 days |
L2 | Logic | See if the customer has ordered and send email 2 with coupon 2 |
P2 | Pause | Wait 4 days |
L3 | Logic | See if the customer has ordered and send email 3 with coupon 3 |
Below is the code for each of the logic steps.
#if($customer.orders.size() > 0) #set($result = '_ENDCAMPAIGN_') #else #set($result = 'P1') $externalAutoresponderFactory.getExternalAutoresponder("LyrisHQ").subscribeReturnEmail($cart, "MyList1", $coupon.generateCode("MyCoupon1", 72)) #end
#if($customer.orders.size() > 0) #set($result = '_ENDCAMPAIGN_') #else #set($result = 'P2') $externalAutoresponderFactory.getExternalAutoresponder("LyrisHQ").subscribeReturnEmail($cart, "MyList2", $coupon.generateCode("MyCoupon2", 72)) #end
#if($customer.orders.size() == 0) $externalAutoresponderFactory.getExternalAutoresponder("LyrisHQ").subscribeReturnEmail($cart, "MyList3", $coupon.generateCode("MyCoupon3", 72)) #end
Make sure you read about the $externalAutoresponderFactory and the $externalAutoresponder objects in our Velocity documentation.