Integrate Sparkfly with Attentive to send Sparkfly offer and loyalty event data to Attentive. You can use this event data to build journeys in Attentive to send triggered messages, for example to notify subscribers when they’re issued an offer from Sparkfly.
Sparkfly sends data about these events:
- Offer State Redemption events: when a member redeems an offer.
- Offer State Issuance events: when an offer is issued to a member.
- Points Exchange events: when members redeem loyalty points (if your Sparkfly configuration includes loyalty programs).
Prerequisites
- Make sure your brand or program is live with Sparkfly.
- Contact your Sparkfly representative for any additional setup requirements or lead times specific to your configuration.
Integrate Sparkfly with Attentive
In order to integrate Sparkfly with Attentive, you’ll need to generate an API key and share it with your Sparkfly representative.
- Follow these steps to generate an Attentive API key: Build an app to connect with Attentive's APIs.
- Contact your Sparkfly representative or team and provide them with the API key you created in Attentive.
- Sparkfly will complete the integration setup and notify you when it’s ready.
Once you’ve heard from Sparkfly that the integration is set up, your Sparkfly events are automatically sent to Attentive. If you have questions or run into any issues, contact Sparkfly support or your Sparkfly representative for further assistance.
See below for more information about the data Sparkfly sends to Attentive.
Sparkfly event data
After the integration is set up, Sparkfly sends data to Attentive whenever one of the following events occurs:
- Offer State Redemption
- Offer State Issuance
- Points Exchange
Each event is sent as a JSON payload to Attentive’s Custom Events endpoint. See the sections below for example JSON payloads.
Offer State Redemption event
{ "type": "sparkfly.member.offer_state_redeemed", "properties": { "credential_identifier": "abc123", "offer_state_id": 123, "store_number": "1", "campaign": { "xid": "A1B2C3", "name": "Sample Data 10% off Birthday", "external_id": "123", "id": 1, "distribution_channel_id": 123 } }, "occurredAt": "2021-03-30T14:38:29+0000", "user": { "externalIdentifiers": { "clientUserId": "test-number-1" } } }
Offer State Issuance event
{ "type": "sparkfly.member.offer_state_created", "user": { "externalIdentifiers": { "clientUserId": "test-number-4" } }, "properties": { "offer_state": { "offer_state_id": 66, "credential_identifier": "CJYA", "expiration": "2023-04-10T13:26:00Z", "campaign": { "id": 1, "xid": "XID_REUSABLE", "name": "", "external_id": "", "offer": { "id": 1, "name": "DefaultReusable", "description": "" } } } } }
Points Exchange event
{ "type": "sparkfly.member.enrollment.points_redeemed", "properties": { "points_debit": 150, "enrollment": { "id": 1, "enrollment_external_id": "1" }, "reward_state": { "id": 1, "offer_state_id": 1, "credential_identifier": "abc123", "issued_point_value": 100, "created_at": "2023-11-15T16:53:40+0000" } }, "occurredAt": "2024-03-15T14:38:29+0000", "user": { "externalIdentifiers": { "clientUserId": "test-number-1", "customIdentifiers": [ { "name": "sparkfly_enrollment_id", "value": 123 } ] } } }