Segment
Overview
Segment is a Customer Data Platform (CDP) that allows businesses to collect, unify, and route their customer data to different platforms for marketing, analytics, and other purposes. It gathers data from various touchpoints, such as websites, mobile apps, and servers, and centralizes it into a single location. This centralized data can then be sent downstream to other tools and services in the client's marketing and operational stack.
The platform supports event tracking, user identification, and user traits, making it easier for businesses to build a comprehensive view of their customers' interactions and behaviours. Visit the Segment website to learn more.
To learn more out Eagle Eye Connect as a whole please visit: https://developer.eagleeye.com/docs/ee-connect
To learn about the supported CDP/MAP use cases for this connector, please visit: https://developer.eagleeye.com/docs/eagle-eye-connect-cdp-map
Are you a Segment client interested in using Eagle Eye AIR?Please reach out to our Partnerships team at [email protected] to get you started!
Configuration
This is the recommended order for setup of various components in Segment and AIR.
Segment Source Connection Setup
This is a one time setup for outbound events from AIR to Segment
- Under Connections --> Sources --> Click
Add Source
- Under Categories --> Server --> click
HTTP API
- Click
Add Source
- Give it a meaningful name and click
Add Source
Write KeyThe above will produce a unique
Write Keyvalue that you can copy and provide to Eagle Eye to set up your outbound connector to Segment
AIR Connection Setup
This is a one time setup for inbound and outbound flow of data between AIR and Segment
Config Service via AIR DashboardCurrently the set up of connectors is possible via API with the help of EE. This feature will be available for clients to self-serve via the AIR dashboard in the near future.
When a new connector is requested, the following will also be done under the hood:
- The service will also configure unique API credentials for EE connect to use for Segment.
- Event notifications enriched with identity information from AIR to EE Connect will also be done automatically.
The client to provide information listed below to Eagle Eye for inbound and outbound connector setup:
Inbound Connector
The following information is required for inbound connector setup for Segment:
- Auth token - The client to come up with a secret key a.k.a.
Auth tokenfor the inbound connector from Segment to AIR. This value can be any string for e.g.ILoveEagleEyeInboundKey111, however the following special characters should be avoided:&,#,?. This key is used for authentication and is passed within the header for inbound API requests from Segment to to AIR by EE connect.
Inbound Connector URLOnce connector setup in AIR is complete, Eagle Eye to provide a Segment inbound connector URL with a unique connector ID that will be required for setting up a destination in Segment
Outbound Connector
The following information is required for outbound connector setup for Segment:
- Auth token - The client to come up with a secret key a.k.a.
Auth tokenfor the outbound connector from AIR to Segment. This value can be any string for e.g.ILoveEagleEyeOutboundKey222, however the following special characters should be avoided:&,#,?. This key is used for authentication and is passed within the header for outbound API requests from AIR to Segment by EE connect. - writeKey - Found in Segment Dashboard under Connections --> Sources --> a source for EE AIR --> settings --> API keys
- currency - 3 character alphanumeric currency for e.g. USD
- identityType - an identifier for looking up the consumer in both AIR and Segment for e.g. CARD
Segment Destination Connection Setup
Once connectors are configured within AIR you can go ahead and set up an Engage destination in Segment.
Destination from Engage SpaceEnsure the destination to be created in Segment is via the Engage space. This is because Audiences in Segment reside within
Engageand it is via anAudiencethat rewards in AIR can be issued
- Go to Engage --> Engage settings --> Click
Add destinationwithin your selected Segment space
- Search for Eagle Eye destination and select it
- Click
Add destination
- Verify that the correct Engage space is selected and then click
Confirm Source
- Enter in the Inbound Connector URL and Auth Token (External Key) configured in AIR, give the destination a meaningful name for e.g. "AIR UAT Destination", enable the destination and
save changes
- Refresh the page and go back into the destination you just created under Connections --> Destinations --> Click your new destination
- Click the
Mappingstab and clickNew Mappings
- Select
Trigger Behavioural Action
- Scroll down to the
Map Fieldssection and enter a desired wallet transaction reference and clickSave
Wallet Transaction ReferenceIt is recommended to use Segment's messageId which will be unique for each message generated by Segment to air. Text fields can be added as prefix or suffix to make the wallet transaction more meaningful and easy to recognize in AIR amongst wallet transactions from other sources.
Do not change the
User Identity ValueandBehavioural Action Trigger Referencefields as these will be automatically populated for a user within an audience.
- Enable the mapping you just created
AIR Social Behavioural Action Trigger Setup
Social Behavioural Action Triggers can be set up in AIR for various use cases with a unique Action Reference. This unlocks the capability of issuing rewards in AIR via Social and Behavioural Actions.
Segment Audience Setup
Audiences can be set up to trigger an API call to EE Connect to issue rewards in AIR or outputs to other platforms for various purposes including communications to a consumer. There can be various triggers for e.g.
- when a custom EE event is received from AIR
- when events are received from other platforms
- when audiences are created based on the various search criteria
Once you have set up Social Behavioural Action Triggers in AIR, you can now configure Segment to tigger a reward in AIR.
- Ensure you are in the correct Engage Space
- Go to Engage --> Audiences --> Click
New Audience
- Select
Profiles audience--> clickNext
- Select criteria for your audience where all users who
Performed an Event
- Select a custom AIR event from the dropdown list and add any additional properties and filtering as desired. Refer to the Events section within the Data Model for a full list of supported events out of AIR
- Select the AIR destination you set up earlier
- Plug in your Social Behavioural Action Trigger reference from AIR, enable
track, disableIdentity, selectDefault Setupand clickSave
Identity vs TrackOnly enable Track events for sending an API call to AIR. Select Identity and Track will issue two triggers to AIR and result in undesirable behaviour.
- Click
Next - Give in a meaningful Audience name for e.g. "New Loyalty Joiner" and click
Create Audience - Now you are ready to start making API calls from AIR and confirm rewards being issued in AIR when audience criteria is met!
Data Model
Traits
Traits are attributes that are stored within a user profile in Segment. The following table details the traits that are populated and maintained by the Segment integration.
| Trait | Data Type | Description |
|---|---|---|
| loyalty_member | boolean | True if the user is a member of the loyalty program, false (or not set) if not. |
| points_balance | number | Current balance of points account (legacy: last Points operation in the event). |
| loyalty_points_accounts | array(object) | Per–POINTS-account rows for multi-scheme wallets (account_id, campaign_id, wallet_id, points_balance, type, client_type, status, state). |
| tier_id | string | Id of the loyalty tier of the user |
| tier_balances_points | number | Tier points |
| tier_balances_spend | number | Tier spend |
| tier_balances_transactions | number | Tier transaction count |
| tier_balances_reset_date | string | Tier balances reset date |
Multi-scheme POINTS accounts
- Identify calls include
loyalty_points_accountsin traits whenever the connector sends POINTS snapshot data (full profile).- Track calls for purchases, refunds, spend, programme join, scheme create, service trigger, and similar do not put
loyalty_points_accountson the primary business event’spropertiesorcontext.traits.- When snapshots exist, the connector also sends a dedicated track
EE Loyalty Points Accounts Updatedwithproperties.loyalty_points_accounts(see below).
- When snapshots exist, the connector also sends a dedicated track
- Track calls for purchases, refunds, spend, programme join, scheme create, service trigger, and similar do not put
Events
The table below shows the mapping of Eagle Eye AIR events to Segment Events. Where the inbound AIR event includes POINTS wallet account snapshots, the integration may emit EE Loyalty Points Accounts Updated in the same batch as the mapped event(s), in addition to any identify that updates traits.
| EE AIR Event | Segment Event(s) |
|---|---|
| SERVICE.WALLET.ACCOUNTS.CREATE | EE Loyalty Program Joined EE Loyalty Continuity Account Created (zero or more) EE Loyalty Quest Account Created (zero or more) EE Loyalty Stamp Card Account Created (zero or more) |
| SERVICE.WALLET.CREATE | EE Loyalty Program Joined |
| TIER.MEMBERSHIP.CREATE | EE Loyalty Tier Membership Created |
| TIER.MEMBERSHIP.MOVE | EE Loyalty Tier Membership Moved |
| TIER.MEMBERSHIP.CREDIT | EE Loyalty Tier Membership Credited |
| TIER.MEMBERSHIP.DEBIT | EE Loyalty Tier Membership Debited |
| TIER.MEMBERSHIP.ADJUST | EE Loyalty Tier Membership Adjusted |
| POSCONNECT.WALLET.SETTLE | EE Loyalty Coupon Redeemed (zero or more) EE Loyalty Purchase EE Loyalty Continuity Account Progressed (zero or more) EE Loyalty Quest Objective Redeemed (zero or more) EE Loyalty Stamp Card Progressed (zero or more) |
| POSCONNECT.WALLET.FULFIL (initial) | EE Loyalty Coupon Redeemed (zero or more) EE Loyalty Order Fulfilment Initiated |
| POSCONNECT.WALLET.FULFIL (middle) | EE Loyalty Order Fulfilment In Progress |
| POSCONNECT.WALLET.FULFIL (final) | EE Loyalty Order Fulfilment Completed |
| POSCONNECT.WALLET.REFUND | EE Loyalty Coupon Redeemed (zero or more) EE Loyalty Coupon Unredeemed (zero or more) EE Loyalty Purchase Refunded |
| POSCONNECT.WALLET.SPEND | EE Loyalty Points Spent |
| POSCONNECT.WALLET.SPEND.VOID | EE Loyalty Points Spend Voided |
| WALLET.ACCOUNT.CREATE.PLAN | EE Loyalty Subscription Joined |
| WALLET.ACCOUNT.UPDATE | EE Loyalty Subscription Cancelled |
| SERVICE.TRIGGER | EE Loyalty Reward Triggered |
| WALLET.ACCOUNT.CREATE.SCHEME | EE Loyalty Scheme Account Created |
| WALLET.ACCOUNT.CREATE.CAMPAIGN | EE Loyalty Campaign Account Created EE Loyalty Continuity Account Created (zero or more) EE Loyalty Quest Account Created (zero or more) EE Loyalty Stamp Card Account Created (zero or more) |
| WALLET.ACCOUNT.TRANSACTION.REDEEM | EE Loyalty Coupon Redeemed (zero or more) |
EE Loyalty Points Accounts Updated
Emitted when the inbound AIR event includes POINTS wallet account snapshot rows. Use this event (or identify traits) for multi-scheme balances; primary commerce or loyalty track payloads do not duplicate this array.
Properties
| Property | Data Type | Description |
|---|---|---|
| loyalty_points_accounts | array(object) | Per–POINTS-account rows (account_id, campaign_id, wallet_id, points_balance, type, client_type, status, state). |
The connector sends context.traits as an empty object on this track (multi-scheme data lives in properties.loyalty_points_accounts and on identify).
EE Loyalty Program Joined
Traits (identify / profile)
These fields are sent on identify when the connector updates the Segment profile. loyalty_points_accounts appears here when POINTS snapshots exist; it is not repeated on the EE Loyalty Program Joined track’s properties or context.traits when EE Loyalty Points Accounts Updated is emitted for the same AIR event.
| Trait | Data Type | Description |
|---|---|---|
| loyalty_member | boolean | True if the user is a member of the loyalty program, false (or not set) if not. |
| points_balance | number | Current balance of points account (legacy: last Points operation in the event). |
| loyalty_points_accounts | array(object) | Per–POINTS-account rows for multi-scheme wallets (account_id, campaign_id, wallet_id, points_balance, type, client_type, status, state). |
| tier_id | string | Id of the loyalty tier of the user |
| tier_balances_points | number | Tier points |
| tier_balances_spend | number | Tier spend |
| tier_balances_transactions | number | Tier transaction count |
| tier_balances_reset_date | string | Tier balances reset date |
Properties
| Property | Data Type | Description |
|---|---|---|
| points_balance | number | Current balance of points account (legacy: last Points operation in the event). |
| tier_id | string | Id of the loyalty tier of the user |
| tier_balances_points | number | Tier points |
| tier_balances_spend | number | Tier spend |
| tier_balances_transactions | number | Tier transaction count |
| tier_balances_reset_date | string | Tier balances reset date |
| coupons[] | array | List of coupons assigned to the user on joining the loyalty program |
| coupons[].account_id | string | Account id of the coupon |
| coupons[].campaign_id | string | Campaign id of the coupon |
| coupons[].type | string | Type of the coupon, e.g. ECOUPON |
| coupons[].client_type | string | Client Type of the coupon, e.g. OFFER, ENTITLEMENT |
| coupons[].status | string | Status of the coupon, e.g. ACTIVE |
| coupons[].date_start | string | Date from which the coupon is valid. |
| coupons[].date_end | string | Date until which the coupon is valid. |
The EE Loyalty Program Joined track may include context.traits with loyalty_member, points, and tier fields aligned to the identify call; it does not include loyalty_points_accounts on that track when the dedicated EE Loyalty Points Accounts Updated event is also sent.
Properties
| Property | Data Type | Description |
|---|---|---|
| tier_id | string | Id of the loyalty tier of the user |
| tier_balances_points | number | Tier points |
| tier_balances_spend | number | Tier spend |
| tier_balances_transactions | number | Tier transaction count |
| tier_balances_reset_date | string | Tier balances reset date |
EE Loyalty Tier Membership Moved
Payload identical to EE Loyalty Tier Membership Created
EE Loyalty Tier Membership Credited
Payload identical to EE Loyalty Tier Membership Created
EE Loyalty Tier Membership Debited
Payload identical to EE Loyalty Tier Membership Created
EE Loyalty Tier Membership Adjusted
Payload identical to EE Loyalty Tier Membership Created
EE Loyalty Coupon Redeemed
Properties
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the redeemed coupon |
| campaign_id | string | Campaign id of the redeemed coupon |
| value | number | Value of the redeemed coupon |
EE Loyalty Purchase
| Property | Data Type | Description |
|---|---|---|
| order_id | string | transaction reference of the order |
| total | number | total cost of the order, including discounts |
| currency | string | currency used |
| products | array | List of products purchased |
| products[].product_id | string | Product id |
| products[].sku | string | Product SKU |
| products[].name | string | Product description |
| products[].price | number | Price per unit of the product |
| products[].quantity | number | Number of items purchased |
| coupons_redeemed | array | List of coupons redeemed during the transaction |
| coupons_redeemed[].account_id | string | Account ID of the coupon |
| coupons_redeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_redeemed[].value | number | Value of the coupon |
| total_points_earned | number | Total points earned as a result of the transaction |
| discounts_received | number | Total discount received on the transaction |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Order Fulfilment Initiated
| Property | Data Type | Description |
|---|---|---|
| order_id | string | transaction reference of the order |
| total | number | total cost of the order, including discounts |
| currency | string | currency used |
| products | array | List of products purchased |
| products[].product_id | string | Product id |
| products[].sku | string | Product SKU |
| products[].name | string | Product description |
| products[].price | number | Price per unit of the product |
| products[].quantity | number | Number of items purchased |
| coupons_redeemed | array | List of coupons redeemed during the transaction |
| coupons_redeemed[].account_id | string | Account ID of the coupon |
| coupons_redeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_redeemed[].value | number | Value of the coupon |
| total_points_earned | number | Total points earned as a result of the transaction |
| discounts_received | number | Total discount received on the transaction |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Order Fulfilment In Progress
| Property | Data Type | Description |
|---|---|---|
| order_id | string | transaction reference of the order |
| total | number | total cost of the order, including discounts |
| currency | string | currency used |
| products | array | List of products fulfilled |
| products[].product_id | string | Product id |
| products[].sku | string | Product SKU |
| products[].name | string | Product description |
| products[].price | number | Price per unit of the product |
| products[].quantity | number | Number of items purchased |
| coupons_redeemed | array | List of coupons redeemed during the transaction |
| coupons_redeemed[].account_id | string | Account ID of the coupon |
| coupons_redeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_redeemed[].value | number | Value of the coupon |
| total_points_earned | number | Total points earned as a result of the transaction |
| discounts_received | number | Total discount received on the transaction |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Order Fulfilment Completed
| Property | Data Type | Description |
|---|---|---|
| order_id | string | transaction reference of the order |
| total | number | total cost of the order, including discounts |
| currency | string | currency used |
| products | array | List of products fulfilled |
| products[].product_id | string | Product id |
| products[].sku | string | Product SKU |
| products[].name | string | Product description |
| products[].price | number | Price per unit of the product |
| products[].quantity | number | Number of items purchased |
| coupons_redeemed | array | List of coupons redeemed during the transaction |
| coupons_redeemed[].account_id | string | Account ID of the coupon |
| coupons_redeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_redeemed[].value | number | Value of the coupon |
| total_points_earned | number | Total points earned as a result of the transaction |
| discounts_received | number | Total discount received on the transaction |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Purchase Refunded
| Property | Data Type | Description |
|---|---|---|
| order_id | string | transaction reference of the order |
| total | number | total cost of the order, including discounts |
| currency | string | currency used |
| products | array | List of products refunded |
| products[].product_id | string | Product id |
| products[].sku | string | Product SKU |
| products[].name | string | Product description |
| products[].price | number | Price per unit of the product |
| products[].quantity | number | Number of items purchased |
| coupons_redeemed | array | List of coupons redeemed during the transaction |
| coupons_redeemed[].account_id | string | Account ID of the coupon |
| coupons_redeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_redeemed[].value | number | Value of the coupon |
| coupons_unredeemed | array | List of coupons unredeemed during the transaction |
| coupons_unredeemed[].account_id | string | Account ID of the coupon |
| coupons_unredeemed[].campaign_id | string | Campaign ID of the coupon |
| coupons_unredeemed[].value | number | Value of the coupon |
| points_deducted | number | Total points deducted as a result of the transaction |
| discounts_received | number | Total discount received on the transaction |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Points Spent
| Property | Data Type | Description |
|---|---|---|
| transaction_reference | string | Transaction reference of the order |
| original_transaction_reference | string | Transaction reference of the original order |
| points_spent | number | The number of points spent in the transaction |
| points_balance | number | The remaining points balance |
| tier | number | TBD |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
EE Loyalty Points Spend Voided
| Property | Data Type | Description |
|---|---|---|
| transaction_reference | string | Transaction reference of the order |
| original_transaction_reference | string | Transaction reference of the original order |
| points_spent | number | The number of points spent in the transaction |
| points_balance | number | The remaining points balance |
| tier | number | TBD |
| store_location | object | Location of the store where the transaction occurred |
| store_location.store_id | string | Store ID |
| store_location.store_parent_id | string | Store parent ID |
| voided | boolean | Set to true to indicate the Points Spend is voided |
EE Loyalty Subscription Joined
| Property | Data Type | Description |
|---|---|---|
| account_id | string | The account id of the subscription |
| campaign_id | string | The campaign id of the subscription |
| entitlements | array | List of entitlements associated with the subscription |
| entitlements[].account_id | string | Account ID of the entitlement |
| entitlements[].campaign_id | string | Campaign ID of the entitlement |
EE Loyalty Subscription Cancelled
| Property | Data Type | Description |
|---|---|---|
| account_id | string | The account id of the subscription |
| campaign_id | string | The campaign id of the subscription |
| entitlements_cancalled | array | List of entitlements that are lost as result of the cancelled subscription |
| entitlements_cancalled[].account_id | string | Account ID of the entitlement |
| entitlements_cancalled[].campaign_id | string | Campaign ID of the entitlement |
EE Loyalty Reward Triggered
| Property | Data Type | Description |
|---|---|---|
| account_id | string | The account id of the subscription |
| campaign_id | string | The campaign id of the subscription |
| points | number | The number of points awarded |
| coupons | array | List of coupons awarded |
| coupons[].account_id | string | Account id of the coupon |
| coupons[].campaign_id | string | Campaign id of the coupon |
| coupons[].type | string | Type of the coupon, e.g. ECOUPON |
| coupons[].client_type | string | Client Type of the coupon, e.g. OFFER, ENTITLEMENT |
| coupons[].status | string | Status of the coupon, e.g. ACTIVE |
| coupons[].date_start | string | Date from which the coupon is valid |
| coupons[].date_end | string | Date until which the coupon is valid |
The context.traits on this track carry points and tier fields from the connector but not loyalty_points_accounts; multi-scheme balances use identify and EE Loyalty Points Accounts Updated when snapshots exist.
EE Loyalty Scheme Account Created
This track has no event properties. Multi-scheme POINTS snapshots are delivered via identify traits (loyalty_points_accounts) and, when present, EE Loyalty Points Accounts Updated; the scheme-created track carries only context.traits for legacy points/tier fields (not loyalty_points_accounts on that track).
EE Loyalty Campaign Account Created
| Property | Data Type | Description |
|---|---|---|
| coupons | array | List of coupons awarded |
| coupons[].account_id | string | Account id of the coupon |
| coupons[].campaign_id | string | Campaign id of the coupon |
| coupons[].type | string | Type of the coupon, e.g. ECOUPON |
| coupons[].client_type | string | Client Type of the coupon, e.g. OFFER, ENTITLEMENT |
| coupons[].status | string | Status of the coupon, e.g. ACTIVE |
| coupons[].date_start | string | Date from which the coupon is valid |
| coupons[].date_end | string | Date until which the coupon is valid |
| coupons[].objective_of | array | Optional. Flattened objective-of links when the coupon is an objective of a quest. Present only when available. |
| coupons[].objective_of[].account_id | string | Parent quest account id |
| coupons[].objective_of[].date_created | string | ISO date the objective-of relationship was created |
Per-account POINTS balances are not on this track’s properties or context.traits when EE Loyalty Points Accounts Updated is emitted for the same payload.
EE Loyalty Continuity Account Created
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the continuity account |
| campaign_id | string | Campaign id of the continuity account |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Current balances snapshot |
| balances.total_spend | number | Total qualifying spend accrued |
| balances.current_spend | number | Spend in the current cycle |
| balances.transaction_count | number | Total qualifying transaction count |
| balances.current_transactions | number | Transactions in the current cycle |
| balances.total_units | number | Total qualifying units accrued |
| balances.current_units | number | Units in the current cycle |
EE Loyalty Quest Account Created
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the quest account |
| campaign_id | string | Campaign id of the quest account |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Current balances snapshot |
| balances.objectives_met | number | Number of objectives completed |
| objectives | array | Optional. Flattened quest objectives derived from relationships.OBJECTIVE. Present only when available. |
| objectives[].account_id | string | Objective coupon account id |
| objectives[].date_created | string | ISO date the objective link was created |
EE Loyalty Stamp Card Account Created
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the stamp card |
| campaign_id | string | Campaign id of the stamp card |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Current balances snapshot |
| balances.available | number | Number of available stamps |
| balances.refundable | number | Number of refundable stamps |
EE Loyalty Continuity Account Progressed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the continuity account |
| campaign_id | string | Campaign id of the continuity account |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Updated balances snapshot |
| balances.total_spend | number | Total qualifying spend accrued |
| balances.current_spend | number | Spend in the current cycle |
| balances.transaction_count | number | Total qualifying transaction count |
| balances.current_transactions | number | Transactions in the current cycle |
| balances.total_units | number | Total qualifying units accrued |
| balances.current_units | number | Units in the current cycle |
EE Loyalty Continuity Account Redeemed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the continuity account |
| campaign_id | string | Campaign id of the continuity account |
| status | string | Status of the account post redemption |
| balances | object | Updated balances snapshot |
| balances.total_spend | number | Total qualifying spend accrued |
| balances.current_spend | number | Spend in the current cycle |
| balances.transaction_count | number | Total qualifying transaction count |
| balances.current_transactions | number | Transactions in the current cycle |
| balances.total_units | number | Total qualifying units accrued |
| balances.current_units | number | Units in the current cycle |
EE Loyalty Quest Objective Redeemed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the quest account |
| campaign_id | string | Campaign id of the quest account |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Updated balances snapshot |
| balances.objectives_met | number | Number of objectives completed |
EE Loyalty Quest Account Redeemed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the quest account |
| campaign_id | string | Campaign id of the quest account |
| status | string | Status of the account post redemption |
| balances | object | Updated balances snapshot |
| balances.objectives_met | number | Number of objectives completed |
EE Loyalty Stamp Card Progressed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the stamp card |
| campaign_id | string | Campaign id of the stamp card |
| status | string | Status of the account, e.g. ACTIVE |
| balances | object | Updated balances snapshot |
| balances.available | number | Number of available stamps |
| balances.refundable | number | Number of refundable stamps |
EE Loyalty Stamp Card Redeemed
| Property | Data Type | Description |
|---|---|---|
| account_id | string | Account id of the stamp card |
| campaign_id | string | Campaign id of the stamp card |
| status | string | Status of the account post redemption |
| balances | object | Updated balances snapshot |
| balances.available | number | Number of available stamps |
| balances.refundable | number | Number of refundable stamps |
Sample Journey: A Consumer Joins Loyalty Program
A wallet is created in AIR
API call Services Wallet Account Create is made and all wallet objects are created by one request.
Expand to see request and response payload examples
{
"state": "DEFAULT",
"status": "ACTIVE",
"type": "CONSUMER",
"consumer": {
"friendlyName": "Sample Consumer Wallet",
"type": "INDIVIDUAL",
"status": "ACTIVE",
"meta": {
"meta1": "Sample meta value 1",
"meta2": "Sample meta value 2"
}
},
"identities": [
{
"state": "EARNBURN",
"status": "ACTIVE",
"type": "CUSTOMER_ID",
"value": "1111111111111111_July14c"
}
],
"accounts": {
"campaign": [
{
"campaignTag": "frequencydriver",
"state": "LOADED"
}
],
"scheme": [
{
"status": "ACTIVE",
"schemeId": {{schemeId}},
"state": "LOADED"
}
]
}
}{
"walletId": "242563299",
"friendlyName": null,
"status": "ACTIVE",
"type": "CONSUMER",
"state": "DEFAULT",
"meta": [],
"dateCreated": "2025-07-14T16:50:54+00:00",
"lastUpdated": "2025-07-14T16:50:54+00:00",
"relationships": {
"parent": [],
"child": [],
"associate": [],
"donor": []
},
"identities": [
{
"identityId": "194682251",
"walletId": "242563299",
"type": "CUSTOMER_ID",
"friendlyName": null,
"value": "1111111111111111_July14c",
"safeValue": null,
"secret": null,
"dates": {
"start": "2025-07-14T16:50:54+00:00",
"end": null
},
"meta": [],
"state": "EARNBURN",
"status": "ACTIVE",
"dateCreated": "2025-07-14T16:50:54+00:00",
"lastUpdated": "2025-07-14T16:50:54+00:00",
"mobileWallet": "https://sb.uk.mypass.is/identity/177556/242563299/194682251/a65deb82bef2644fb7f3d634f5794b53b4288fbd2127788279272a7967480166"
}
],
"accounts": {
"campaign": {
"total": 1,
"results": [
{
"errorCode": "NF",
"errorMessage": "Campaign not found"
}
],
"successful": {
"total": 0,
"results": []
},
"failed": {
"total": 1,
"results": [
{
"errorCode": "NF",
"errorMessage": "Campaign not found"
}
]
}
},
"scheme": {
"successful": {
"results": [
{
"accountId": "4475151659",
"walletId": "242563299",
"campaignId": "100380258",
"type": "POINTS",
"clientType": "RETAILPOINTS",
"status": "ACTIVE",
"state": "LOADED",
"dates": {
"start": "2025-07-14T16:50:54+00:00",
"end": "2038-01-19T03:14:07+00:00"
},
"meta": [],
"dateCreated": "2025-07-14T16:50:54+00:00",
"lastUpdated": "2025-07-14T16:50:54+00:00",
"overrides": [],
"balances": {
"current": 0,
"usable": 0,
"locked": 0,
"lifetime": 0,
"lifetimeSpend": 0,
"lifetimeSpendValue": 0,
"pending": 0
},
"relationships": [],
"mobileWallet": "https://sb.uk.mypass.is/a/4475151659/ddab549dd761cc7"
}
],
"total": 1
},
"failed": {
"results": [],
"total": 0
},
"total": 1,
"results": [
{
"accountId": "4475151659",
"walletId": "242563299",
"campaignId": "100380258",
"type": "POINTS",
"clientType": "RETAILPOINTS",
"status": "ACTIVE",
"state": "LOADED",
"dates": {
"start": "2025-07-14T16:50:54+00:00",
"end": "2038-01-19T03:14:07+00:00"
},
"meta": [],
"dateCreated": "2025-07-14T16:50:54+00:00",
"lastUpdated": "2025-07-14T16:50:54+00:00",
"overrides": [],
"balances": {
"current": 0,
"usable": 0,
"locked": 0,
"lifetime": 0,
"lifetimeSpend": 0,
"lifetimeSpendValue": 0,
"pending": 0
},
"relationships": [],
"mobileWallet": "https://sb.uk.mypass.is/a/4475151659/ddab549dd761cc7"
}
]
}
},
"consumer": {
"consumerId": "49880404",
"walletId": "242563299",
"friendlyName": "Sample Consumer Wallet",
"type": "INDIVIDUAL",
"state": "DEFAULT",
"status": "ACTIVE",
"data": [],
"meta": {
"meta1": "Sample meta value 1",
"meta2": "Sample meta value 2"
},
"dateCreated": "2025-07-14T16:50:54+00:00",
"lastUpdated": "2025-07-14T16:50:54+00:00"
}
}User is created in Segment within the specified Audience
Note: if the user already exists in Segment from other source systems, then Segment will automatically enhance an existing user profile instead of creating a new one as long as the user ID matches.
{
"external_ids": [
{
"collection": "USERS",
"type": "user_id",
"id": "1111111111111111_July14c",
"encoding": "none"
}
],
"context": {
"library": {
"name": "@segment/analytics-node",
"version": "2.2.1"
},
"traits": {
"loyalty_member": true,
"points_balance": 0,
"tier_balances_points": 0,
"tier_balances_reset_date": "2025-07-14T23:59:59.000Z",
"tier_balances_spend": 0,
"tier_balances_transactions": 0,
"tier_id": "97"
}
},
"type": "track",
"source_id": "aFnwKkyEJYYC3tgzVgrZrc",
"message_id": "006f3f25-b34a-4ab2-8c7b-3fd5cd93b50f-2",
"timestamp": "2025-07-14T16:50:55.013Z",
"received_at": "2025-07-14T16:50:58.606Z",
"sent_at": "2025-07-14T16:50:58.261Z",
"properties": {
"tier_balances_spend": 0,
"coupons": [],
"tier_balances_transactions": 0,
"points_balance": 0,
"tier_balances_points": 0,
"tier_id": "97",
"tier_balances_reset_date": "2025-07-14T23:59:59.000Z"
},
"event": "EE Loyalty Program Joined",
"related": {
"USERS": [
"use_XzYyCeqY8ZczslGAtym2zsFR3jb"
]
},
"metadata": {
"jsRuntime": "node",
"nodeVersion": "v22.16.0"
}
}Segment triggers an inbound call to issue reward in AIR
Upon receipt of custom event ee_loyalty_program_joined event from AIR, Segment destination to EE Connect issues a welcome coupon via Social Behavioural Actions using a specific Action Reference in AIR.
Social Behavioural Action triggered in AIR
Coupon issued in AIR
Outbound Trigger event is sent from AIR to Segment
Once the reward is issued an event is reflected back into the user profile
Technical Information
The code for Eagle Eye Foundation Connector is written in TypeScript and is open sourced in GIT here.
Technical documentation can be found in GIT here.
GIT AccessWe are in the process of open sourcing the code in GIT. The above links will become available for use very shortly.


