Webhook Schema

Schema of the payloads of various webhooks supported by CustomerGlu

Reward Webhook Schema

{
		"campaignId": "c666f62e-66b9-4ef7-9191-cc70ff4a3as",
		"type": "spinthewheel",
		"rewardType": "points",
		"userId": "281d08d8-34c0-4ed2-9400-20149c15fg",
		"rewardId": "be1f951c-e9e2-49b9-806b-bf3a6573bas",
		"status": "redeemable-seen",
		"rewardName": "25 coins",
		"rewardAmount": 25,
		"body": "You have won 25 coins",
		"tnc": ["NA"],
		"code": "CODE123",//optional
		"details": {//optional
		            "userBName": "testuser2", //in case of a reward for a referral
		            "userBId": "testuser2"//in case of a reward for a referral
		            "userAName": "testuser0", //in case of a reward for a referral
		            "userAId": "testuser0"//in case of a reward for a referral
		            "rewardCategory": "RM",//custom attribute
		            "currency":"USD"//custom attribute,
			    "campaignName": "Daily Reward"
        }
//details object can also contain any logic/business specific custom attributes 
//which can be configured as a campaign input
}

Nudge Webhook Schema

{
        "client": "84acf2ac-b2e0-4927-8653-cba2b83816xa",
        "campaignId": "e90eb605-c99f-47fd-9241-73802b58qsx",
        "userId": "testUser-8-aug-10",
        "notificationType": "in-app",
        "pageType": "full-default",
        "content": {
            "title": "Played a game 1 times!",
            "body": "You are doing great! Just play 6 more Games to Win Big!",
            "clickAction": "https://xyz.com/game",
            "image": "",
            "button": {
                "text": "Go to Challenge",
                "action": "https://xyz.com/game"
            }
        },
        "timeRemaning": "",
        "expiry": "",
        "webhookType": "nudge"
    }

Check out all schemas of Raw Event Webhook here

Last updated