This page contains information about your Loyalty-related data views. For more information on Open Data - Data views, see Data views overview.
Loyalty status data
View name: loyalty_contact_points_state_latest_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains the latest Loyalty status data of your contacts.
This view contains data from November 1st, 2019 onwards.
Data field | Description | Type |
---|---|---|
external_id | The hashed version of the user_id used also by SI. | string |
customer_id | The unique ID (account ID) of the customer. | integer |
event_time | The exact time when the event happened. | timestamp |
loaded_at | Loading date to Data Platform (UTC). | timestamp |
plan_id | The plan identifier the contact belongs to. | string |
join_time | The exact time the user joined the Loyalty program. | timestamp |
tier | The name of the current tier for the contact. | string |
tier_entry_time | The exact time when the contact entered the tier. | timestamp |
balance_points | The number of balance points. | float |
status_points | The number of status points. | float |
pending_points | The points that are in the pending state. | float |
points_to_be_expired | The points that will expire. | float |
Loyalty detailed points data
View name: loyalty_points_earned_redeemed_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains all data on points for your contacts.
This view contains data from November 1st, 2019 onwards.
Data field | Description | Type |
external_id |
The hashed version of the user_id used also by Smart Insight |
string |
customer_id |
The unique ID (account ID) of the customer |
integer |
event_time |
The exact time when the event happened |
timestamp |
loaded_at |
Loading date to Data Platform (UTC) |
timestamp |
contact_state_id |
Internal identifier of the current state of the contact |
string |
points |
The number of points given to or taken off from the contact |
float |
points_type |
Balance or Status points |
string |
tracking_id |
||
source_of_points_awarded |
The reason why the user got or lost points.
|
string |
order_id |
The order_id for which the points were given |
string |
attach_id |
Internal ID to connect from which action the points were awarded. In case the user participated in the same action multiple times |
string |
action_id |
The action ID from which the points were awarded |
string |
reward_tracking_id |
Internal ID for future use |
string |
redeemed_item |
The item that was redeemed with the points.
|
string |
voucher_pool_id |
The internal ID of the voucher pool redeemed with the points |
string |
voucher_pool_name |
The voucher pool name redeemed with the points |
string |
exclusive_pool_id |
The internal ID of the exclusive access pool redeemed with the points |
string |
exclusive_pool_name |
The pool name of the exclusive access redeemed with the points |
string |
points_status |
Current status of the points:
|
string |
points_expiration_date |
The expiration date of the points, only for confirmed points. Data is available only from Oct 19th, 2020. |
timestamp |
Loyalty vouchers
View name: loyalty_vouchers_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains all data regarding vouchers that your contacts earned or redeemed via points.
This view contains data from November 1st, 2019 onwards.
Data field | Description | Type |
---|---|---|
external_id | The hashed version of the user_id used also by Smart Insight. |
string |
customer_id | The unique ID (account ID) of the customer | integer |
event_time | The exact time when the voucher was given out, namely, the voucher code was exposed (UTC). | timestamp |
loaded_at | Loading date to Data Platform (UTC) | timestamp |
contact_state_id | Internal identifier of the current state of the contact | string |
pool_name | The pool name to which the voucher belongs to. | string |
pool_id | The ID of the pool to which the voucher belongs to. | string |
voucher_type | This field is deprecated. | string |
voucher_name | The voucher name. | string |
voucher_code | The voucher code (Only if the user exposed the code). | string |
source_type |
The reason for the user getting this voucher:
|
string |
action_attach_id | Internal ID | string |
action_id | The action ID from which the voucher was awarded | string |
action_name | The action name from which the voucher was awarded. | string |
reward_tracking_id | The ID to connect to the action table | string |
fixed_benefit_name | The fixed benefit from which the user earned the voucher | string |
additional_benefit_name | The additional benefit from which the user earned the voucher | string |
redemption_type | Contains data on whether a voucher was given for points for free. Values:
|
string |
status | Contains the status of the vouchers. Values:
|
string |
expiration_time | Contains the date when the vouchers expires. | timestamp |
remove_time | Contains the date when the voucher was removed from the Loyalty member. | timestamp |
remove_source | Contains how a voucher was removed from a Loyalty member. Values:
|
string |
Loyalty exclusive access
View name: loyalty_exclusive_access_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains all data regarding exclusive access that your contacts earned or redeemed via points.
This view contains data from November 1st, 2019 onwards.
Data field |
Description | Type |
---|---|---|
external_id | The hashed version of the user_id used also by Smart Insight. |
string |
customer_id | The unique ID (account ID) of the customer. | integer |
event_time | The exact time when the voucher was given out, namely, the voucher code was exposed (UTC). | timestamp |
loaded_at | Loading date to Data Platform (UTC). | timestamp |
contact_state_id | Internal identifier of the current state of the contact | string |
exclusive_access_name | The pool name to which the voucher belongs to. | string |
exclusive_access_id | The ID of the pool to which the voucher belongs to. | string |
source_type |
The reason for the user getting this voucher:
|
string |
action_attach_id | Internal ID | string |
action_id | The action ID from which the exclusive access was awarded. | string |
action_name | The action name from which the exclusive access was awarded. | string |
reward_tracking_id | The ID to connect to the action table | string |
fixed_benefit_name | The fixed benefit from which the user earned the voucher | string |
redemption_type | Contains data on whether the exclusive access was given for points of for free. Values:
|
string |
status | Status of exclusive access: Did the user click on the exclusive access or not:
|
string |
reward_tracking_id | The ID to connect to the action table | string |
additional_benefit_name | The additional benefit from which the user earned the exclusive access | string |
is_redeemed |
Voucher code exposure status: Did the user click on the voucher?
|
boolean |
Loyalty actions
View name: loyalty_actions_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains all data regarding Loyalty actions with attached contacts and if the contacts completed them or not.
This view contains data from November 1st, 2020 onwards.
Data field | Description | Type |
---|---|---|
external_id | The hashed version of the user_id used also by Smart Insight. |
string |
customer_id | The unique ID (account ID) of the customer. | integer |
event_time | The exact time when the action was attached or completed by the user (UTC). | timestamp |
loaded_at | Loading date to Data Platform (UTC). | timestamp |
contact_state_id | Internal identifier of the current state of the contact. | string |
attach_id | Unique Internal ID for the action that was attached to a specific user. It is used to connect the attachment of an action to its completion time, to know when the action was attached and completed. Both the row for the attachment time and the row for the completion time have the same attach_id . If the same action is attached more than once, each time it will get a different attach_id . |
string |
snap_id | Future use | string |
action_name | The action name | string |
action_master_type |
Master types of actions:
|
string |
action_type | Action type:
|
string |
action_status | Action status:
|
string |
reward_tracking_id | This ID we can use to connect to points, voucher and exclusive access tables to see the reward the user got for completing the action. Only filled out when:action_status=”completed
|
string |
order_id | You will see here the corresponding order_id for a completed purchase action. |
string |
trigger_id | Internal future use | string |
valid_from | From what date can the user complete the action to be entitled to the reward. | timestamp |
valid_until | Until what date can the user complete the action to be entitled to the reward. | timestamp |
Loyalty referral codes
View name: loyalty_referral_codes_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains all the data related to the referral program. You can see how many codes where given out by your members.
Data field | Description | Type |
external_id | The hashed version of the user_id used also by Smart Insight. |
string |
customer_id | The unique ID (account ID) of the customer. | integer |
event_time | The exact time when the action was attached or completed by the user (UTC). | timestamp |
loaded_at | Loading date to Data Platform (UTC). | timestamp |
contact_state_id | Internal identifier of the current state of the contact. | string |
action_id | The referral program ID. | string |
action_name | The referral program name. | string |
voucher_code | The voucher code that was given out by your member to his friend. | string |
voucher_value | The voucher value. For example: 5$, 10$. This is the value that you entered under the field Voucher value in the Voucher Pool. | float |
Loyalty referral purchases
View name: loyalty_referral_purchases_[customer_ID]
(where customer_ID
is your Emarsys account ID)
This view contains the data related to the purchases your referred customers have made.
Data field | Description | Type |
external_id | The hashed version of the user_id also used by Smart Insight. This is the ID of your member, who referred his friend to make a purchase. |
string |
customer_id | The unique ID (account ID) of the customer. | integer |
event_time | The exact time when the action was attached to or completed by the user (UTC). | timestamp |
loaded_at | Loading date to Data Platform (UTC). | timestamp |
contact_state_id | Internal identifier of the current state of the contact. | string |
action_id | The referral program ID. | string |
attach_id | Unique Internal ID for the action that was attached to a specific user. It is used to connect the attachment of an action to its completion time, to know when the action was attached and completed. Both the attachment time and completion time rows have the same attach_id . If the same action is attached more than once, it will get a different attach_id each time. |
string |
snap_id | This data field is reserved for future use. | string |
reward_tracking_id | We can use this ID to connect the reward that the loyalty member got for the friend’s purchase. It can be joined to the points or voucher tables to see the reward the loyalty member got for the referral's completed purchase action. | string |
friends_total_order | The order value of the referred user. The order where the voucher code was used. | float |
voucher_code | The voucher code that was given out by your member to his friend and used in this purchase. | string |
voucher_value | The voucher value. For example: 5$, 10$. This is the value that you entered under the field Voucher value in the Voucher Pool. | float |
friends_order_timestamp | The time the referred user made the purchase. | timestamp |
friends_order_status | The status of order of the referred user: pending/confirmed/canceled. | string |