Record a customer activity
smile_create_activityWRITE: record that a customer performed an action (identified by an activity type token configured in Smile Admin, e.g. a custom 'newsletter signup' activity). Smile then asynchronously applies the store's earning rules and may issue points or rewards. Identify the customer by customer_id OR customer_email (exactly one). Pass distinct_id (e.g. an order number) to make it idempotent — a second activity with the same token + distinct_id is rejected. Custom activity types need Smile's Plus/Enterprise plan. Requires the activity:write scope. Smile: POST /activities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Activity type token, e.g. activity_f57a9b5a8d0ac5. | |
| customer_id | No | Smile customer ID (or give customer_email). | |
| distinct_id | No | Unique id for this activity in your system; prevents duplicates for the same token. | |
| customer_email | No | Customer email (or give customer_id). | |
| created_on_origin_at | No | ISO 8601 date-time the action actually happened, if earlier than now. |