DEMO_GLOBALE_LOYALTY_CARDS. Replace the demo with a real provider before production. Do not import demo custom-object data from metadata/demo/ into production.
This is an optional feature. It requires project code (a provider and a SendCart decorator). See Required customization.
Sending loyalty data to the checkout
For a registered shopper who has loyalty points, the SendCart request tells Global-e how many points can be earned and spent on the checkout. Populate this by overriding the SendCart decorator:int_globale/cartridge/models/globale/sendCart/decorators/loyaltyPoints.js
The decorator should set:
These attributes are included in the SendCart payload so Global-e can show earn/spend options on checkout.
Redeeming points on checkout
On the Global-e checkout, the shopper enters the number of points to redeem and clicks Redeem. The flow uses the standard alternative-payment requests:
After a successful redeem, checkout totals update to show how much of the order the points cover.
- If the redeemed points cover the full order total, the shopper can place the order with no additional payment.
- If they cover only part of the total, the shopper selects a payment method for the remainder.
Required customization
The demo uses SFCC custom objects of typeDEMO_GLOBALE_LOYALTY_CARDS. For production, override both of the following:
- Loyalty card provider —
int_globale/cartridge/scripts/globale/alternativePayments/providers/LoyaltyCardProvider.js - Loyalty points SendCart decorator —
int_globale/cartridge/models/globale/sendCart/decorators/loyaltyPoints.js
Summary
The demo (based on SFCC custom objects) is a minimal reference showing the core moving parts. Production projects supply a provider that integrates their loyalty system and a decorator that reports earn/spend data in SendCart. Never deploy the demoDEMO_GLOBALE_LOYALTY_CARDS provider or demo object data to production.
See also
- Gift Cards · Native Gift Certificates
- Metadata reference —
DEMO_GLOBALE_LOYALTY_CARDS

