Use Case: Tracking In-Store Orders to Award Loyalty Points
What This Is
This use case explains how to track an in-store purchase by submitting the order details to Gameball. This allows the customer to earn loyalty points based on the transaction value and configured earning rules.Why It Matters
- Enables customers to accumulate points for in-store purchases
- Drives program participation and repeat visits
- Allows Gameball to evaluate campaign logic, trigger milestone rewards, and calculate tier progression
- Without tracking the order, no points can be rewarded, and the customer receives no benefit from their purchase
How to Implement It
Use the Track Order API to submit each completed order. Required fields include:customerId: the unique identifier for the customerorderId: a unique transaction ID from your POS systemorderDate: the exact time the order occurredtotalPaid: the amount paid by the customer after discounts and redemptionstotalPrice: the full value of the order before any discounts
totalTax, totalShipping, discounts, and lineItems.
Validation Rules
orderIdmust be unique per store environmentcustomerIdmust refer to an existing Gameball profile
Example Scenario
A customer completes a purchase worth 300 SAR. No points were redeemed. The POS submits the order using the customer’s profile:What Gameball Does Behind the Scenes
- Evaluates earning rules based on the transaction value
- Issues points according to the business logic defined in the dashboard
- Logs the order in the customer’s purchase history
- May trigger campaign or tier logic based on cumulative spend or conditions
Key Takeaways for Developers
- Always submit final prices with appropriate tax and shipping data if they affect point logic
- Use consistent, timestamped
orderDatevalues in ISO 8601 format - Do not reuse
orderId. Duplicate values will be rejected - Submit the order after confirming payment but before closing the POS session to ensure reward accuracy