Skip to content

Instantly share code, notes, and snippets.

@bogdan
Last active May 24, 2018 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bogdan/d8712391dd305baf7bf955b15d91d6b1 to your computer and use it in GitHub Desktop.
Save bogdan/d8712391dd305baf7bf955b15d91d6b1 to your computer and use it in GitHub Desktop.
var a = {
success: true,
rewarded: true,
coupon_code: 'aaa',
unredeem_reason: 'aaa',
friend_person: {
"first_name": "John",
"last_name": "Smith",
"email": "advocate@example.com",
"username": "sample",
"external_customer_id": null,
"opted_in_at": null,
"sub_choice": false,
"custom_properties": {},
"unsubscribed": false
},
incentive: {
"amount": 5.0,
"description": "$5",
"percentage": false,
"incentive_type": "discount_coupon",
"action_type": "referrer",
"identifier": "referrer",
"for_advocate": true,
"for_friend": false,
"highest_amount": true,
"criteria_config": {
"new_customer": true,
"new_optin": false,
"subtotal_min": null,
"subtotal_max": null,
"referrals_min": null,
"referrals_max": null,
"reward_uniqueness": "once_per_friend",
"friend_event_category": "purchase",
"has_liquid_criteria": false
},
"coupon_expires_at": null
},
outcomes: {
click_incentive1: {
rewarded: true,
coupon_code: '8172811',
incentive: {}
},
click_incentive2: {
rewarded: false,
coupon_code: null,
unredeem_reason: 'CC',
incentive: {
}
}
}
};
var b = "You are not eligible for {{unredeems.click10.incentive.description}} because you are {{unredeems.click10.unredeem_reason}}, but you are aligible for {{reward.incentive.description}}";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment