Loyalty Catalog Events
List of Catalogs
Catalog | Description |
---|---|
Survey Catalog | Catalog representing values for Surveys in an app. |
Reward Catalog | Catalog representing values for Rewards in an app. |
Required Catalog Fields
Some catalog fields can be marked as optional below but may be required for your app. Please refer to your integration notes to verify which fields are required for your use-case.
Survey Catalog
Below is the Survey Catalog values.
Format
Param | Usability | Format | Description |
---|---|---|---|
id | REQUIRED | STRING | Unique id for a survey, provided by the partner. |
name | REQUIRED | STRING | Name of the survey, provided by the partner. |
description | OPTIONAL | STRING | Description of the survey, provided by the partner. |
duration | OPTIONAL | INT | Duration of the survey, provided by the partner. (in Seconds) |
type | REQUIRED | STRING | Type of the survey, provided by the partner. |
reward_id | REQUIRED | STRING | Reward Id for the survey, provided by the partner. |
questions_list | REQUIRED | ARRAY(STRING) | List of Questions for the survey, provided by the partner. |
creation_date | OPTIONAL | STRING | Creation Date of the survey, provided by the partner. (ISO 8601 format) |
expiry_date | OPTIONAL | STRING | Expiry Date of the survey, provided by the partner. (ISO 8601 format) |
organization_id | OPTIONAL | STRING | Organization Id of the survey, provided by the partner. |
organization_name | OPTIONAL | STRING | Organization Name of the survey, provided by the partner. |
Usage
val surveyCatalogModel = SurveyCatalogModel(
name = "Kerri Salazar",
duration = 940,
type = "natoque",
reward_id = "consul",
questions_list = arrayListOf("testQ1", "testQ2"),
description = "dolor",
creation_date = 1680703107424,
expiry_date = 1680703107424,
organization_id = "feugiat",
organization_name = "Jules Baxter"
)
CfLoyaltyCatalog.updateSurveyCatalog("surveyId", surveyCatalogModel)
let surveyProps = {
name : "Kerri Salazar",
duration : 940,
type : "natoque",
reward_id : "consul",
questions_list : ["testQ1", "testQ2"],
description : "dolor",
creation_date : 1680703107424,
expiry_date : 1680703107424,
organization_id : "feugiat",
organization_name : "Jules Baxter"
}
CfLoyalty.updateSurveyCatalog("surveyId", surveyProps)
let surveyProps = {
name : "Kerri Salazar",
duration : 940,
type : "natoque",
reward_id : "consul",
questions_list : ["testQ1", "testQ2"],
description : "dolor",
creation_date : 1680703107424,
expiry_date : 1680703107424,
organization_id : "feugiat",
organization_name : "Jules Baxter"
}
Loyalty.logSurveyCatalog("surveyId", surveyProps)
[
{
"id": "surveyId",
"name": "Kerri Salazar",
"description": "test Description",
"type": "Survey Type",
"duration": 940,
"organization_id": "OrgId",
"organization_name": "Jules Baxter",
"questions_list": [
"testQ1",
"testQ2"
],
"reward_id": "rewardId",
"creation_date": "2023-04-05T15:58:27.424+02:00",
"expiry_date": "2024-04-05T15:58:27.424+02:00"
}
]
Reward Catalog
Below is the Reward Catalog values.
Format
Param | Usability | Format | Description |
---|---|---|---|
id | REQUIRED | STRING | Unique id for a reward, provided by the partner. |
name | REQUIRED | STRING | Name of the reward, provided by the partner. |
description | OPTIONAL | STRING | Description of the reward, provided by the partner. |
type | REQUIRED | STRING | Type of the reward, provided by the partner. |
required_points | REQUIRED | FLOAT | Required Points for the reward, provided by the partner. |
creation_date | OPTIONAL | STRING | Creation Date of the reward, provided by the partner. (ISO 8601 format) |
expiry_date | OPTIONAL | STRING | Expiry Date of the reward, provided by the partner. (ISO 8601 format) |
organization_id | OPTIONAL | STRING | Organization Id of the reward, provided by the partner. |
organization_name | OPTIONAL | STRING | Organization Name of the reward, provided by the partner. |
Usage
val rewardCatalogModel = RewardCatalogModel(
name = "Florine Kane",
description = "nostrum",
type = "consetetur",
required_points = 4.5f,
creation_date = 1680703107424,
expiry_date = 1680703107424,
organization_id = "legimus",
organization_name = "Helen Vega"
)
CfLoyaltyCatalog.updateRewardCatalog("rewardId", rewardCatalogModel)