Points Fact Tables

Points represent loyalty points of an organization that are issued to the loyalty customers through different sources such as Loyalty Manager, Data Import (import profiles) and Member Care (goodwill points). Customers can redeem their points against transactions. Given below are the fact tables associated with the points data:


Points Fact Table

This table captures events related to allocation and deduction of points.

Databricks Table Name: points

Points - Entity Relationship Diagram (ERD)

Zoom in the table for more clarity. Click the table title to view its details.

📘

Note

The points fact and points_redemption_summary fact are linked and share the same ERD.

Points Factallocated_points: doubleauto_update_time_pa: bigintauto_update_time_pabp: bigintauto_update_time_pacp: bigintauto_update_time_pal: bigintauto_update_time_palp: bigintauto_update_time_pd: bigintawarded_ref_id: bigintbill_id: bigintbill_lineitem_id: stringbill_number: stringdeducted_points: doublededucted_ref_id: bigintredemption_id: stringdeduction_summary_id: bigintdim_awarded_date_id: bigintdim_awarded_expiry_date_id: bigintdim_awarded_program_id: bigintdim_awarded_zone_till_id: bigintdim_category_id: bigintdim_deduction_type_id: bigintdim_event_date_id: bigintdim_event_log_id: bigintdim_event_program_id: bigintdim_event_time_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_expiry_date_id: bigintdim_expiry_time_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_awarded_points_promotion_id: bigintPKdim_points_awarded_type_id: bigintPKdim_points_event_type_id: bigintdim_points_promotion_id: bigintdim_redemption_program_id: bigintredemption_bill_number: stringPKevent_id: bigintexternal_reference_number: stringredemption_bill_id: bigintyear: intPoints CategoryLKcategory_id: bigintredeemtion_type: stringauto_update_program: bigintcategory_type: stringauto_update_points_category: bigintDeduction TypeLKid: biginttype: stringPoints Awarded TypeLKid: biginttype: stringPoints Event Typeid: biginttype: stringPoints Promotionname: stringLKid: bigintidentifier: stringauto_update_promotion: bigintpoints_promotion_id: biginttype: stringdateLKdate_id: intday_of_month: intweek_of_year: intmonth: stringyear: intquarter: stringweek_number: intweek_start_date: stringweek_end_date: stringday_of_week: stringmonth_no: intmonth_no_of_year: intmonth_of_year: stringday_of_week_no: intquarter_no: intyearly_quarter_no: intdate: stringDateZone_tillsstore_country: stringexternal_id_1: stringstore: stringauto_update_till_parent: bigintarea: stringstore_name: stringstore_city: stringstore_state: stringtill: stringauto_update_till_store_relation: bigintis_ffc_enabled: stringLKtill_id: biginttype: stringtill_description: stringauto_update_till: bigintstore_channel: stringexternal_id: stringis_billable: stringstore_id: bigintis_active: stringauto_update_store: bigintstore_description: stringlatitude: stringtimezone: stringexternal_id_2: stringtill_name: stringzone_name: stringZone TillsTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringTimeusersauto_update_merged_customer: bigintauto_update_loyalty: bigintfraud_status: stringtest_control_bucket: stringis_merged_customer: stringsubscription_status_email_bulk: stringfirst_name: stringslab_name: stringsubscription_status_wechat_bulk: stringemail: stringlast_name: stringmerged_user_id: bigintLKuser_id: bigintsubscription_status_wechat_trans: stringsubscription_status_sms_bulk: stringndnc_status: stringsubscription_status_email_trans: stringtest_control_status: stringauto_update_fraud_user: bigintis_inactive: stringsource: stringslab_number: intauto_update_users: bigintregistered_till_id: bigintauto_update_customer_enrollment: bigintslab_expiry_date: stringcustomer_external_id: stringsubscription_status_sms_trans: stringmobile: stringloyalty_type: stringauto_update_ndnc_status: bigintUsersProgrampoints_currency_ratio: integerauto_update_time: stringredeemable_point_category_id: integerLKprogram_id: integeris_active: stringprogram_name: stringis_default: stringdescription: stringProgramPoints FactDeduction TypePoints PromotionPoints CategoryPoints Awarded TypePoints Event TypeLKPoints Redemption Summaryauto_update_time: bigintdim_event_date_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_redemption_program_id: bigintPKevent_id: bigintnotes: stringpoint_category_id: bigintpoints_redeemed: doublepoints_redemption_time: bigintredemption_bill_id: bigintredemption_bill_number: stringreference_id: bigintdim_redemption_type_id: stringsource_type: stringyear: intPoints Redemption Summary

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table
Redemption TypeLKid: bigintredemption_type: stringRedemption Type

Points Fact Table

Column NameData TypeDescriptionLinked TableAvailability for Export in the Points Template
allocated_pointsdoublePoints awarded for a specific event. The points are awarded either at the bill level, line item level, or customer level._Yes; Measure Name: Allocated Points
auto_update_time_pabigintDate and time when the corresponding record in the points awarded (PA) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Pa
auto_update_time_pabpbigintDate and time when the corresponding record in the Points Awarded Bill Promotion (PABP) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Pabp
auto_update_time_pacpbigintDate and time when the corresponding record in the Points Awarded Customer Promotion (PACP) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Pacp
auto_update_time_palbigintDate and time when the corresponding record in the Points Awarded Lineitem (PAL) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Pal
auto_update_time_palpbigintDate and time when the corresponding record in the Points Awarded Lineitem Promotion (PALP) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Palp
auto_update_time_pdbigintDate and time when the corresponding record in the Points Deductions (PD) table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto Update Time Pd
awarded_ref_idbigintIt is the identifier that is created when a point is awarded._Yes; Measure Name: Awarded Ref Id
bill_idbigintUnique identifier for a transaction (loyalty log id or bill id) for which points are awarded or redeemed. This is populated primarily from the Points Awarded (PA), Points Awarded Lineitem (PAL), Points Awarded Lineitem Promotion (PALP), Points Awarded Bill Promotion (PABP) tables available at the source._Yes; Measure Name: Bill Id
bill_lineitem_idstringThe line item id against which points have been allocated._Yes; Measure Name: Bill Lineitem Id
bill_numberstringSystem-generated bill number for which points are awarded or redeemed. If there is no valid bill_id in the source table, this field would be empty._Yes; Measure Name: Bill Number
deducted_pointsdoubleThe number of points that have been redeemed, returned, or expired and thus deducted from the total points._Yes; Measure Name: Deducted Points
deducted_ref_idbigintThe original redemption or transfer deduction id against which a reversal has occurred._Yes; Measure Name: Deducted Ref Id
deduction_summary_idbigintIdentifier to group deducted points related to a single event. It is the primary key of the PRS (Point Redemption Summary) table.points_redemption
_summary Link
Yes; Measure Name: Deduction Summary Id
dim_awarded_date_idbigintDate when points were awarded to the customer.dateYes; Dimension Name: Awarded date > Date
dim_awarded
_expiry_date_id
bigintDate when the awarded points are set to expire.dateYes; Dimension Name: Awarded Expiry Date > Date
dim_awarded_program_idbigintIdentifier for the loyalty program associated with the awarded points._Yes; Dimension Name: Awarded Program > Program Id
dim_awarded
_zone_till_id
bigintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the points were awarded. It distinguishes one checkout location from another within the same store.zone_tillYes; Dimension Name: Awarded Zone Till > Till Id
dim_category_idbigintIdentifier which indicates the type of points awarded or deducted. The points categories can be - regular points, promised points, alternate currencies, trackers, and external trigger based points.points_categoryYes; Dimension Name: Category > Category Id
dim_deduction_type_idbigintIdentifier indicating the type of deduction. Possible values are - cancelled, expired, migrated, redeemed, returned, etc.deduction_typeYes; Dimension Name: Deduction Type > Id
dim_event_date_idbigintDate when the points were allocated/ deducted.dateYes; Dimension Name: Date > Date
dim_event_log_idbigintUnique identifier for the points event. Corresponds to the id in the event_log table and is mapped to the point awarded (PA) / points deducted (PD) table._Yes; Measure Name: Dim Event Log Id
dim_event_program_idbigintIdentifier of the loyalty program associated with the points event.programYes; Dimension Name: Event Program > Program Id
dim_event_time_idbigintTime when the points were allocated/ deducted.timeYes; Dimension Name: Time > Time Id
dim_event_user_idbigintIdentifier of the user, set internally by Capillary.usersYes; Dimension Name: User > User Id
dim_event_zone_till_idbigintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the points event occurred. It distinguishes one checkout location from another within the same store.zone_tillYes; Dimension Name: Store Hierarchy > Till Id
dim_expiry_date_idbigintDate when the allocated points are set to expire.date_
dim_expiry_time_idbigintTime when the allocated points are set to expire.time_
dim_latest_updated
_date_id
bigintDate when the data corresponding to this event/ row is changed in the source table.dateYes; Dimension Name: Latest Updated Date > Date
dim_latest_updated
_time_id
bigintTime when the data corresponding to this event/ row is changed in the source table.timeYes; Dimension Name: Latest Updated Time > Time Id
dim_points_awarded
_type_id
bigintIdentifier for the type of points that are awarded. Possible values are - bill promotion, line item, line item promotion, and customer promotion. This is the primary key of the table.points_awarded
_type Link
Yes; Dimension Name: Points Awarded Type > Id
dim_points_event_type_idbigintIdentifier for the type of event, indicating whether points were awarded or deducted. This is the primary key of the table.points_event_typeYes; Dimension Name: Points Event Type > Id
dim_points_promotion_idbigintIdentifier for the promotion against which points were allocated, redeemed, or expired.points_promotionsYes; Dimension Name: Points Promotion > Id
dim_redemption
_program_id
bigintIdentifier of the loyalty program associated with the points redemption.__
event_idbigintUnique identifier of the points event. It is the primary key of the table._Yes; Measure Name: Event Id
external_reference_numberstringRefers to the number, unique to each org, linked to the Points Redemption Summary (PRS) table. It is populated from the API Payload._Yes; Measure Name: External Reference Number
redemption_bill_idbigintIdentifier for a transaction (loyalty log id or bill id) for which the points are redeemed. It is generated by Capillary._Yes; Measure Name: Redemption Bill Id
redemption_bill_numberstringBill number for which the points are redeemed. If the source data does not provide this number, the system shows 'Not Captured'._Yes; Measure Name: Redemption Bill Number
redemption_idstringA unique 6-character long string for each redemption or reversal request, auto-generated by the Loyalty System._Yes; Measure Name: Redemption Id
dim_awarded_points
_promotion_id
bigintIdentifier for the promotion associated with the awarded points._Yes; Dimension Name: Awarded Points Promotion > Id
yearintYear when the points were awarded/ deducted._Yes; Dimension Name: Year

Points_redemption_summary Fact Table

This table captures the event where the customer redeems their points. The table captures the date and time of redemption, the loyalty program associated with the points, the category to which the points belong, the bill number associated with the points redemption, etc.

Databricks Table Name: points_redemption_summary

Points Redemption Summary - Entity Relationship Diagram (ERD)

Zoom in the table for more clarity. Click the table title to view its details.

📘

Note

The points fact and points_redemption_summary fact are linked and share the same ERD.

Points Factallocated_points: doubleauto_update_time_pa: bigintauto_update_time_pabp: bigintauto_update_time_pacp: bigintauto_update_time_pal: bigintauto_update_time_palp: bigintauto_update_time_pd: bigintawarded_ref_id: bigintbill_id: bigintbill_lineitem_id: stringbill_number: stringdeducted_points: doublededucted_ref_id: bigintredemption_id: stringdeduction_summary_id: bigintdim_awarded_date_id: bigintdim_awarded_expiry_date_id: bigintdim_awarded_program_id: bigintdim_awarded_zone_till_id: bigintdim_category_id: bigintdim_deduction_type_id: bigintdim_event_date_id: bigintdim_event_log_id: bigintdim_event_program_id: bigintdim_event_time_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_expiry_date_id: bigintdim_expiry_time_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_awarded_points_promotion_id: bigintPKdim_points_awarded_type_id: bigintPKdim_points_event_type_id: bigintdim_points_promotion_id: bigintdim_redemption_program_id: bigintredemption_bill_number: stringPKevent_id: bigintexternal_reference_number: stringredemption_bill_id: bigintyear: intPoints CategoryLKcategory_id: bigintredeemtion_type: stringauto_update_program: bigintcategory_type: stringauto_update_points_category: bigintDeduction TypeLKid: biginttype: stringPoints Awarded TypeLKid: biginttype: stringPoints Event Typeid: biginttype: stringPoints Promotionname: stringLKid: bigintidentifier: stringauto_update_promotion: bigintpoints_promotion_id: biginttype: stringdateLKdate_id: intday_of_month: intweek_of_year: intmonth: stringyear: intquarter: stringweek_number: intweek_start_date: stringweek_end_date: stringday_of_week: stringmonth_no: intmonth_no_of_year: intmonth_of_year: stringday_of_week_no: intquarter_no: intyearly_quarter_no: intdate: stringDateZone_tillsstore_country: stringexternal_id_1: stringstore: stringauto_update_till_parent: bigintarea: stringstore_name: stringstore_city: stringstore_state: stringtill: stringauto_update_till_store_relation: bigintis_ffc_enabled: stringLKtill_id: biginttype: stringtill_description: stringauto_update_till: bigintstore_channel: stringexternal_id: stringis_billable: stringstore_id: bigintis_active: stringauto_update_store: bigintstore_description: stringlatitude: stringtimezone: stringexternal_id_2: stringtill_name: stringzone_name: stringZone TillsTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringTimeusersauto_update_merged_customer: bigintauto_update_loyalty: bigintfraud_status: stringtest_control_bucket: stringis_merged_customer: stringsubscription_status_email_bulk: stringfirst_name: stringslab_name: stringsubscription_status_wechat_bulk: stringemail: stringlast_name: stringmerged_user_id: bigintLKuser_id: bigintsubscription_status_wechat_trans: stringsubscription_status_sms_bulk: stringndnc_status: stringsubscription_status_email_trans: stringtest_control_status: stringauto_update_fraud_user: bigintis_inactive: stringsource: stringslab_number: intauto_update_users: bigintregistered_till_id: bigintauto_update_customer_enrollment: bigintslab_expiry_date: stringcustomer_external_id: stringsubscription_status_sms_trans: stringmobile: stringloyalty_type: stringauto_update_ndnc_status: bigintUsersProgrampoints_currency_ratio: integerauto_update_time: stringredeemable_point_category_id: integerLKprogram_id: integeris_active: stringprogram_name: stringis_default: stringdescription: stringProgramPoints FactDeduction TypePoints PromotionPoints CategoryPoints Awarded TypePoints Event TypeLKPoints Redemption Summaryauto_update_time: bigintdim_event_date_id: bigintdim_event_user_id: bigintdim_event_zone_till_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintdim_redemption_program_id: bigintPKevent_id: bigintnotes: stringpoint_category_id: bigintpoints_redeemed: doublepoints_redemption_time: bigintredemption_bill_id: bigintredemption_bill_number: stringreference_id: bigintdim_redemption_type_id: stringsource_type: stringyear: intPoints Redemption Summary

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table
Redemption TypeLKid: bigintredemption_type: stringRedemption Type

Points Redemption Summary Fact Table

Column NameData TypeDescriptionLinked TableAvailable for Export in Points Redemption Summary Template
auto_update_timebigintDate and time when the corresponding record in the points redemption summary table available at the source was last updated. It is in the Unix timestamp format._Yes; Measure Name: Auto update time
dim_event_date_idbigintDate when the points were redeemed.dateYes; Dimension Name: Date > Date
dim_event_user_idbigintIdentifier of the user, set internally by Capillary.usersYes; Dimension Name: User > User Id
dim_event_zone_till_idbigintIdentifier assigned to the point-of-sale (POS) terminal within a store, where the points were redeemed. It distinguishes one checkout location from another within the same store.zone_tillYes Dimension: Concept_Hierarchy > Till_Id
dim_latest_updated_date_idbigintDate when the data corresponding to this event/ row is changed in the source table.dateYes; Dimension Name: Latest Updated Date > Date
dim_latest_updated_time_idbigintTime when the data corresponding to this event/ row is changed in the source table.timeYes; Dimension Name: Latest Updated Time > Time Id
dim_redemption_program_idbigintIdentifier of the loyalty program associated with the points redemption.programYes; Dimension Name: Program > Program Id
dim_redemption_type_idstringIdentifier for the points redemption type. Possible values are redemption, reversal, group_redemption, and reversal_on_return.redemption typeYes; Dimension Name: Redemption Type > Id
event_idbigintUnique identifier of the points redemption event, correlating to Deduction_Summary_Id in the Points Fact table. It is the primary key of this table.points factYes; Measure Name: Event Id
notesstringAny additional information or comments provided during the redemption process._Yes; Measure Name: Notes
point_category_idbigintIt refers to the Point category Id column of PRS table. This id comes from points_category source table, which indicates whether the points category is main, delayed accrual, trigger based or trackers. In case of Group Redemption, this ID will be set to -1._Yes; Measure Name: Points Category Id
points_redeemeddoubleTotal points redeemed in a particular redemption. The value is populated from the points_redemption_summary table available at the source._Yes; Measure Name: Points Redeemed
points_redemption_timebigintTime when the points were redeemed, populated from the points_redemption_summary table available at the source._Yes; Measure Name: Points Redemption Time
redemption_bill_idbigintIdentifier for a transaction (loyalty log id or bill id) for which the points are redeemed. It is generated by Capillary.points factYes; Measure Name: Redemption Bill Id
redemption_bill_numberstringBill number for which the points are redeemed. If the source data does not provide this number, the system shows 'Not Captured'.points factYes; Measure Name: Redemption Bill Number
reference_idbigint_Yes; Measure Name: Reference Id
source_typestringSource from where the redemption data is collected (API or redemption data import)._Yes; Measure Name: Source Type
yearintYear when the points were redeemed._Yes; Dimension Name: Year

Points_expiry_reminder_info Fact Table

This table captures the event where communication is made with the customer to remind them about their points, which would expire after a certain date. It captures the date and time of the communication, the channel used, the number of points expiring, and the date and time the points will expire, among other details.

Databricks Table Name: points_expiry_reminer_info

Points Expiry Reminder Info - Entity Relationship Diagram (ERD)

Zoom in the table for more clarity. Click the table title to view its details.

Points Expiry Reminder Infoauto_update_time_point_exp_reminder: bigintdim_communication_channel_id: bigintdim_event_date_id: bigintdim_event_time_id: bigintdim_event_user_id: bigintdim_expiry_date_id: bigintdim_expiry_time_id: bigintdim_latest_updated_date_id: bigintdim_latest_updated_time_id: bigintpoints_expiring: doublereminded_before_days: intPKreminder_id: bigintyear: intPoints Expiry Reminder InfodateLKdate_id: intday_of_month: intweek_of_year: intmonth: stringyear: intquarter: stringweek_number: intweek_start_date: stringweek_end_date: stringday_of_week: stringmonth_no: intmonth_no_of_year: intmonth_of_year: stringday_of_week_no: intquarter_no: intyearly_quarter_no: intdate: stringDateTimeLKtime_id: biginttime: stringhour_of_day: intminute_of_day: intday_shift: stringday_shift_no: inthour_range: stringTimeusersauto_update_merged_customer: bigintauto_update_loyalty: bigintfraud_status: stringtest_control_bucket: stringis_merged_customer: stringsubscription_status_email_bulk: stringfirst_name: stringslab_name: stringsubscription_status_wechat_bulk: stringemail: stringlast_name: stringmerged_user_id: bigintLKuser_id: bigintsubscription_status_wechat_trans: stringsubscription_status_sms_bulk: stringndnc_status: stringsubscription_status_email_trans: stringtest_control_status: stringauto_update_fraud_user: bigintis_inactive: stringsource: stringslab_number: intauto_update_users: bigintregistered_till_id: bigintauto_update_customer_enrollment: bigintslab_expiry_date: stringcustomer_external_id: stringsubscription_status_sms_trans: stringmobile: stringloyalty_type: stringauto_update_ndnc_status: bigintUsersCommunication ChannelLKid: integerchannel: stringactivity_name: stringCommunication Channel

Legend

PK   Primary Key

LK   Linking Key

Fact Table
Dimension Table

Points Expiry Reminder Info Fact Table

Column NameData TypeDescriptionLinked TableAvailability for Export in the Points Expiry Reminder Template
auto_update_time
_point_exp_reminder
bigintDate and time when the corresponding record in the points reminder expiry info Fact table available at the source was last updated. It is in Unix timestamp format._Yes; Measure Name: Auto Update Points Expiry Reminder
dim_communication
_channel_id
bigintIndicates the channel used for communicating with the customer. Possible values are - SMS, email, voicemail, Wechat, Facebook, Viber, etc.communication
_channel Link
Yes; Dimension Name : Communication Channel > Id
dim_event_date_idbigintDate when the points expiry reminder is sent.dateYes; Dimension Name : Date > Date
dim_event_time_idbigintTime when the points expiry reminder is sent.timeYes; Dimension Name : Time > Time Id
dim_event_user_idbigintIdentifier for the customer who has performed the redemption or reversal, part of the points_redemption_summary fact.usersYes; Dimension Name : User > User Id
dim_expiry_date_idbigintDate when the allocated points are set to expire.dateYes; Dimension Name : Expiry Date > Date
dim_expiry_time_idbigintTime when the allocated points are set to expire.timeYes; Dimension Name : Expiry Time > Time Id
dim_latest_updated_date_idbigintDate when the data corresponding to this event/row is changed in the source table.dateYes; Dimension Name : Latest Updated Date > Date
dim_latest_updated_time_idbigintTime when the data corresponding to this event/row is changed in the source table.timeYes; Dimension Name : Latest Updated Time > Time Id
points_expiringdoubleTotal number of points that are set to expire, for which the reminder is sent._Yes; Measure Name: Points Expiring
reminded_before_daysintThe number of days in advance a reminder should be sent before the points are set to expire._Yes; Measure Name: Reminded Before Days
reminder_idbigintUnique identifier for the table. It is the primary key of this table._Yes; Measure Name: Reminder Id
yearintYear in which the points expiry reminder is sent._Yes; Dimension Name : Year