Cashback Object
The cashback object is returned in the Configurations API response body. It describes the cashback program configurations.
Copy {
"rewardFactor" : 0.3 ,
"amountRewardThreshold" : 10 ,
"rewardWalletFactor" : 3 ,
"rewardRankFactor" : 1
}
Challenge Object
Represents the challenge object that describes a configured rewards campaign and tracks the relative customer's progress.
Copy {
"id" : 3350 ,
"name" : "view product + tag internal" ,
"description" : "" ,
"rankReward" : 3 ,
"walletReward" : 10 ,
"repeatable" : true ,
"maxAchievement" : 0 ,
"type" : "EventBased" ,
"visibility" : "AlwaysVisible" ,
"icon" : "gb-icon-challenge-10@2x" ,
"availability" :{
"minLevel" : 5 ,
"tags" : [
"2nd tag"
]
}
}
Event Object
The Event object is how you record any actions your users perform, along with any metadata that describe the action. For further elaboration on events check Understand your customers' events .
Event and Metadata example:
Copy "buy" : {
"product_id" : "a123456" ,
"price" : 30 ,
"product_category" : "fashion"
"product_tags" : [ "men" , "new_collection" ]
}
The following example shows a collection of events
Copy "events" : {
"buy" : {
"category" : "Electronics" ,
"amount" : 300
} ,
"travel" : {
"destinations" : [ "Paris" , "Cairo" ] ,
"tickets" : 4 ,
"season" : "Winter"
} ,
"visit_branch" : {}
}
Leaderboard object
Defines the customer rank and progress in the leaderboard based on the specified query parameters.
Copy {
"displayName" : "Customer 1" ,
"playerUniqueId" : "5097238429738" ,
"progress" : 1748 ,
"rank" : 1 ,
"levelName" : "Bronze" ,
"levelIcon" : "https://cdn.gameball.co/uploads/c007/e7e1580c-f1ae-48be-9e14-2635848c6817icon-level-bronze@2x.png"
}
Level Object
Contains information about the customer's current VIP tier.
Parameters Description
Copy {
"name" : "Gold" ,
"description" : null ,
"levelStartScore" : 7500 ,
"levelOrder" : 4 ,
"iconPath" : "https://cdn.gameball.co/uploads/Client 1/2cf4b388-f957-4789-8309-5476907c1baeicon-level-gold@2x.png" ,
"benefits" : {
"scoreEnteryReward" : 0 ,
"pointsEnteryReward" : 0 ,
"levelDiscount" : null ,
"discountCapping" : null
}
}
LineItems Object
Represent a Product in your system with its relative information, this object is used in the Orders API .
Copy {
"productId" : "197765" ,
"tag" : [ "VIP" ] ,
"category" : [
"natural" ,
"cosmetics"
] ,
"weight" : "20" ,
"vendor" : "nike" ,
"collection" : [ "14313" , "4343" ]
}
Merchant Object
Holds information of merchant and its branch
Parameters Description
Copy "merchant" : {
"uniqueId" : "string" ,
"name" : "string" ,
"branch" : {
"uniqueId" : "string" ,
"name" : "string"
}
}
Notification Object
Represents a notification that your customer receives.
Copy {
"notificationId" : "123" ,
"title" : "New level!" ,
"body" : "Keep it up! You are now on Bronze " ,
"isRead" : true ,
"createdAt" : "2021-05-12T00:08:09.646174" ,
"lang" : "en" ,
"icon" : "https://cdn.gameball.co/uploads/client776/ad8b2587-959f-48fd-ab58-a643323652begb-icon-level-13.png"
}
Score Object
Contains info about the customer's score.
Parameters Description
Copy "score" : {
"scoreBalance" : 15830 ,
"scoreName" : "Score"
}
PlayerAttributes Object
Contains all of the attributes describing your customer.
Parameters Description
Copy "playerAttributes" : {
"displayName" : "Jon Snow" ,
"firstName" : "Jon" ,
"lastName" : "Snow" ,
"email" : "jon.snow@example.com" ,
"mobile" : "+1234567" ,
"gender" : "M" ,
"dateOfBirth" : "1980-09-19T00:00:00.000Z" ,
"joinDate" : "2019-09-19T21:06:29.158Z" ,
"tags" : "VIP,Platinum" ,
"custom" : {
"location" : "Miami" ,
"graduationDate" : "2018-07-04T21:06:29.158Z" ,
"isMarried" : false
}
}
Points Object
Contains information about the customer's points.
Parameters Description
Copy "points" : {
"pointsBalance" : 11500 ,
"pointsValue" : 115 ,
"currency" : "USD" ,
"pointsName" : "Points"
}
Referral Object
The referral object is returned in the configurations API response body. It describes the referral program configurations.
Copy {
"referralMethod" : "PlayerAndFriend" ,
"eventName" : "" ,
"eventMetaData" : null ,
"playerReward" :{
"extraReward" : {
"rewardEvery" : 5 ,
"rewardType" : null ,
"score" : 2 ,
"point" : 1 ,
"voucher" : null
} ,
"rewardType" : "Vouchers" ,
"score" : 0 ,
"point" : 0 ,
"voucher" : {
"voucherType" : "Free Shipping" ,
"productId" : "" ,
"productName" : "" ,
"value" : 0
}
} ,
"friendReward" :{
"rewardType" : "Vouchers" ,
"score" : 0 ,
"point" : 0 ,
"voucher" : {
"voucherType" : "Free Product" ,
"productId" : "6161866621123" ,
"productName" : "Antique Drawers" ,
"value" : 250
}
}
}
Transaction object
Describes any transaction made in your system.
Copy {
"transactionId" : "trx123" ,
"gameballTransactionId" : "gbtrx123" ,
"transactionTime" : "2019-09-21T16:53:28.190Z" ,
"type" : "Cash Back" ,
"direction" : "+" ,
"playerUniqueId" : "1234" ,
"points" : 500 ,
"amount" : 10 ,
"merchantName" : "merchant" ,
"branchName" : "branch"
}