Coupon Earned (Awarded)

This event is triggered any time a customer earns a discount from completing a campaign (e.g. Newsletter Signup). This event is useful for sending an email with the coupon code to the customer.

Important AttributesDescription
emailThe email address of the customer who earned the coupon
redemption.reward_textThe coupon code earned or redeemed
redemption_option.nameShort description of what the coupon is for
perk.history_titleA short description of the action that leads them to earn this discount
{
    "topic": "swell/redemption/created",
    "name": "Swell Redemption Created",
    "redemption": {
        "id": 2,
        "created_at": "2016-10-15T16:00:17.786Z",
        "updated_at": "2016-10-15T16:00:17.786Z",
        "reward_text": "TENPERCENT",
        "approved": true,
        "approved_at": "2016-10-15T16:00:17.915Z",
        "is_admin": false,
        "is_pos": false,
        "at_checkout": false
    },
    "redemption_option": {
        "id": 152,
        "name": "10% Off",
        "description": "Get 10% off your next purchase for 0 points",
        "icon": "fa-percent",
        "cost_text": "0 Points",
        "amount": 0
    },
    "email": "[email protected]",
    "customer": {
        "total_spend_cents": 0,
        "total_purchases": 0,
        "perks_redeemed": 2,
        "last_purchase_at": null,
        "email": "[email protected]",
        "referred_by": "[email protected]",
        "points_earned": 5200,
        "points_balance": 4700,
        "points_expire_at": null,
        "first_name": "John",
        "last_name": "Smith",
        "last_seen_at": "2016-10-15T16:00:17.000Z",
        "third_party_id": "4302977345",
        "referral_code": {
            "code": "117yu4g",
            "shares": 0,
            "facebook_shares": 0,
            "twitter_shares": 0,
            "email_shares": 0,
            "emails_sent": 0,
            "emails_viewed": 0,
            "links_clicked_from_email": 0,
            "links_clicked_from_twitter": 0,
            "links_clicked_from_facebook": 0,
            "orders": 0,
            "amount_cents": 0,
            "average_amount_cents": 0,
            "expires_at": null,
            "expired": false,
            "completed_referral_customers": [],
            "email": "[email protected]",
            "unique_clicks": 0,
            "total_clicks": 0
        }
    },
    "perk": {
        "id": 3,
        "campaign_id": 4,
        "merchant_id": 1,
        "customer_id": 139,
        "reward_points": 0,
        "completed": false,
        "completed_at": null,
        "awarded": false,
        "awarded_at": null,
        "pending": false,
        "reversed": false,
        "reversed_at": null,
        "expired": false,
        "expired_at": null,
        "expires_at": null,
        "redemption_option_id": 152,
        "history_title": "Join our newsletter",
        "created_at": "2016-10-15T16:00:17.000Z",
        "redemption_option": {
            "id": 152,
            "name": "10% Off",
            "description": "Get 10% off your next purchase for 0 points",
            "icon": "fa-percent",
            "cost_text": "0 Points",
            "amount": 0
        }
    }
}