This webhook is triggered when a customer completes an activity by triggering a rule. To subscribe to this webhook, your access token needs to contain the read_customers and read_orders scope.

Payload

customer
object
required
Customer object with the same shape as the Customers API response
activity
object
required
The activity that was completed. An object with the same shape as the Activities API response
order
object | null
The order linked to this activity, if any. An object with the same shape as the Orders API response
If this activity was linked to a social media rule, e.g. “Follow on Instagram”, this will be the URL of the social media profile that was involved
review
object | null
If this activity was linked to a review rule, this will contain information about the review

Example

Example
{
  "id": "bff1bddb-6cd8-4c2c-9619-18744657053c",
  "topic": "program_events/customer.rule_completed",
  "created_at": "2018-01-01T03:00:05.000Z",
  "payload": {
    "properties": {
      "customer": {
        "id": 6932,
        "merchant_id": "2134606599",
        "email": "jessica@example.com",
        "points_approved": 200,
        "points_pending": 300,
        "points_spent": 500,
        "rewards_claimed": 5,
        "properties": {
          "name": "Jessica White"
        },
        "metadata": {},
        "birthday": "1990-01-29",
        "blocked": false,
        "guest": false,
        "enrolled": true,
        "enrolled_at": "2015-12-10T03:00:00.000Z",
        "referral_id": null,
        "referred_by": null,
        "loyalty_tier_membership": null,
        "insights_segment": "Loyal",
        "referral_url": null,
        "created_at": "2016-12-10T03:00:00.000Z",
        "updated_at": "2018-01-01T03:00:00.000Z"
      },
      "order": {
        "id": 194572858,
        "total": "45.96",
        "metadata": {},
        "total_tax": "0",
        "created_at": "2021-08-19T05:50:42.797Z",
        "total_paid": "45.96",
        "updated_at": "2021-08-19T05:50:42.797Z",
        "merchant_id": "4158567448655",
        "refund_status": "not_refunded",
        "payment_status": "paid",
        "total_refunded": "0",
        "total_shipping": "5.99",
        "merchant_number": "263961",
        "total_discounts": "10.00",
        "fulfillment_status": "not_fulfilled",
        "cancellation_status": "not_cancelled"
      },
      "activity": {
        "id": 239638566,
        "rule": {
          "id": 149623,
          "name": "$purchase",
          "title": "Make a purchase"
        },
        "state": "pending",
        "value": 1000,
        "merchant_id": null,
        "created_at": "2018-01-01T03:00:05.000Z"
      }
    }
  }
}