Gameball Developers Guide
v3.0
Ask or search…
K

Track Orders & Cashback Reward

Start tracking players' orders on your platform upon order completion and successful payment. This enables rewarding the player with cashback wallet points for paid amounts as per your cashback program configuration on Gameball.
Cashback rewarding and order tracking can be done via server side Order API which is a tailored API to support retail and e-commerce platforms
The Order API is comprehensive and accepts multiple order data, including line items details, taxes, and discounts. This enables businesses to track customer activity in detail and provide tailored rewards and cashback based on their purchases. For example, businesses can offer customers extra loyalty points for purchasing specific products or spending a certain amount of money.
Order API automatically creates a player in Gameball if it was not created before via Create Player API
The Order API identifies the order transaction using the Order ID parameter. Which can be the id of the transaction in the POS system. This helps in consolidation between Gameball and POS systems and refund cases.
A simple example for order API usage can be as below example. Where a player with id id123 made a purchase of 2 items of a product with id 197765 The total paid was 100.
{
"playerUniqueId":"id123",
"orderId":"6253e03b",
"orderDate":"2019-09-21T16:53:28.190Z",
"totalPrice":"90",
"totalPaid":"100",
"totalDiscount":"0",
"totalShipping":"0",
"totalTax":"10",
"lineItems":[
{
"productId":"197765",
"tag":[
"VIP"
],
"quantity":2,
"category":[
"natural",
"cosmetics"
],
"vendor":"nike",
"collection":[
"14313",
"4343"
]
}
],
"holdReference":null
}

Track Orders from branches

Order API can be expanded to include information about merchants and branches using the merchant object. The merchant object within the Order API can be used to identify the branch where the transaction has occurred. This can be useful for businesses with multiple locations, as it allows them to track customer activity. The merchant object contains information such as the merchant ID, branch ID, and branch name, which can be used to identify the specific location where the transaction took place. By tracking customer activity at each branch, businesses can gain insights into customer behavior and tailor their rewards and incentives accordingly. This can help to improve customer satisfaction, drive repeat purchases, and ultimately increase revenue.
Merchant module should be enabled in order to work properly.
Suppose the above order example was received in the central park branch of brand Amazing brand. The brand\merchant had the id of m_001 and the branch has the id of b_001.
The payload to be sent to Gameball will look like the below
{
"playerUniqueId":"id123",
"orderId":"6253e03b",
"orderDate":"2019-09-21T16:53:28.190Z",
"totalPrice":"90",
"totalPaid":"100",
"totalDiscount":"0",
"totalShipping":"0",
"totalTax":"10",
"lineItems":[
{
"productId":"197765",
"tag":[
"VIP"
],
"quantity":2,
"category":[
"natural",
"cosmetics"
],
"vendor":"nike",
"collection":[
"14313",
"4343"
]
}
],
"merchant":{
"uniqueId":"m_001",
"name":"amazing brand",
"branch":{
"uniqueId":"b_001",
"name":"central park"
}
},
"holdReference":null
}
Order API support the account merging feature too. For case of merge, email or mobile number must be sent top level with the order API payload as below
{
"playerUniqueId":"id123",
}