This event is triggered any time a customer earns points. This event is useful for keeping a customers point balance up to date in your CRM or email marketing platform.
| Important Attributes | Description |
|---|---|
email | The email address of the customer who earned points. |
customer.points_balance | The customers' updated point balance. |
perk.reward_points | The number of points they just earned. |
perk.history_title | A short description of the action that lead them to earn these points. |
{
"topic": "swell/points/earned",
"name": "Swell Points Earned",
"email": "[email protected]",
"customer": {
"total_spend_cents": 0,
"total_purchases": 0,
"perks_redeemed": 0,
"last_purchase_at": null,
"email": "[email protected]",
"referred_by": "[email protected]",
"points_earned": 200,
"points_balance": 200,
"points_expire_at": "2027-01-31T23:59:59.000Z",
"first_name": "John",
"last_name": "Smith",
"last_seen_at": "2016-10-15T15:29:27.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": 1,
"campaign_id": 1,
"merchant_id": 1,
"customer_id": 139,
"reward_points": 200,
"completed": true,
"completed_at": "2016-10-15T15:29:27.911Z",
"awarded": true,
"awarded_at": "2016-10-15T15:29:27.911Z",
"pending": false,
"reversed": false,
"reversed_at": null,
"expired": false,
"expired_at": null,
"expires_at": null,
"redemption_option_id": null,
"history_title": "Create an account",
"created_at": "2016-10-15T15:29:27.828Z",
"source": null,
"related_order_ids": [
"5731669966948"
]
}
}customer.points_expire_at
customer.points_expire_atSample payloads above use "2027-01-31T23:59:59.000Z" when an expiration date applies (Last Activity or Date Earned policies); the field is null when your policy is Never expire.
The date when the customer's points are set to expire. The value depends on your store's Points expiration policy:
- Last Activity — Returns the calculated expiration date based on the customer's last activity.
- Date Earned — Returns the next upcoming expiration date across all point batches.
- Never expire — Returns
null.
For Date Earned policies, customers may have multiple point batches with different expiration dates; this field reflects only the closest upcoming expiration.
The same semantics apply to GET /v1/customers, GET /v2/customers, and GET /api/v2/customers (Fetch Customer Details and Fetch All Recently Updated Customers).