Core Catalog Events
List of Catalogs
| Catalog | Description |
|---|---|
| User Catalog | Catalog representing values for primary users of the app. |
| Site Catalog | Catalog representing values for Sites int he app, such as a facility, community, pharmacy, org, etc. |
"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.
User Catalog
Below are the User Catalog values.
Overview
| Param | Usability | Format | Description |
|---|---|---|---|
| name | OPTIONAL | STRING | Name of the user, provided by the partner. |
| country | OPTIONAL | STRING | Country in which the user is registered. As a full name. |
| region_state | OPTIONAL | STRING | Region/State in which the user is registered. |
| city | OPTIONAL | STRING | City in which the user is registered. |
| workplace | OPTIONAL | STRING | Workplace for the user. |
| profession | OPTIONAL | STRING | Profession of the user in the platform. |
| zipcode | OPTIONAL | STRING | ZipCode for the user. |
| language | OPTIONAL | STRING | Language user is speaking/using in the app. As a full name. |
| experience | OPTIONAL | STRING | Experience of the user as provided by the partner |
| education_level | OPTIONAL | STRING | Educational Level of the user based on pre-defined values. |
| timezone | REQUIRED | STRING | Timezone for which the user is currently in. (Auto Tracked) |
| organization_id | OPTIONAL | STRING | Id for the organization user is associated with. |
| organization_name | OPTIONAL | STRING | Name for the organization user is associated with. |
| account_type | OPTIONAL | STRING | type of the user account, basic, classic, advanced, admin, other. |
| birth_year | OPTIONAL | INT | birth year of the user, in format of YYYY. |
| gender | OPTIONAL | STRING | type of the user gender: male, female, other |
| marital_status | OPTIONAL | STRING | user's marital status: single, married, widowed, divorced, separated, other, undisclosed |
| family_members | OPTIONAL | STRING | user's family members count: none, 1, 2, 3, 4, 5_or_more, undisclosed |
| children_under_five | OPTIONAL | STRING | user's children under five count: none, 1, 2, 3, 4, 5_or_more, undisclosed |
| referral_code | OPTIONAL | STRING | user's own referral code |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
val userCatalogModel = UserCatalogModel(
name = "User Catalog",
country = CountryCode.SouthAfrica.toString(),
regionState = "Barcelona",
city = "Barcelona",
workplace = "facility",
profession = "HCW",
zipcode = "08008",
language = LanguageCode.English.name,
experience = "4 Years",
educationLevel = EducationalLevel.Bachelors.toString(),
organizationId = "organizationID",
organizationName = "Causal Foundry",
accountType = "basic",
referralCode = "QWERTY"
)
CFCoreEvent.logCatalog(
coreCatalogType = CoreCatalogType.User,
Common.testUserId,
catalogModel = userCatalogModel
)
let userCatalog = UserCatalogModel(
name: username,
country: "South Africa",
regionState: "Barcelona",
city: "Barcelona",
workplace: "Planet Earth",
profession: "SSE",
zipcode: "08008",
language: LanguageCode.Abkhaz.rawValue,
experience: "4 Years",
educationLevel: EducationalLevel.Primary.rawValue,
organizationId: "1244",
organizationName: "Causal Foundry",
accountType: "user",
birthYear: 1972,
familyMembers: MembersCount.Two.rawValue
)
CFCoreEvent.shared.logCatalog(coreCatalogType: CoreCatalogType.User, subjectId: username, catalogModel: userCatalog)
const userProperties = {
name: 'John Doe',
organization_id: 'cf',
organization_name: 'Causal Foundry',
experience: '1 Year',
region_state: 'Barcelona',
city: 'Barcelona',
workplace: 'causalfoundry',
profession: 'SDK User',
zipcode: '08008',
country: Country.Spain,
language: Language.Spanish,
education_level: EducationalLevel.Bachelors,
account_type: UserAccountType.Basic,
birth_year: 1980,
gender: UserGender.Male,
marital_status: MaritalStatus.Single,
family_members: MembersCount.Two,
children_under_five: MembersCount.None,
};
CFCore.logCatalogEvent(
'UserDoeTEST4',
CoreCatalogType.User,
userProperties,
);
const userDetail = {
name: "Test User Name",
experience: "1 year",
region_state: "Barcelona",
city: "Barcelona",
workplace: "Benshi",
profession: "Software Engineer",
zipcode: "08008",
country: Country.Spain,
language: Language.English,
education_level: EducationalLevel.Primary,
organization_id: "testPharmacyId",
organization_name: "testPharmacyName",
account_type: UserAccountType.Other,
birth_year: 1929,
gender: UserGender.Male,
marital_status: MaritalStatus.Single,
family_members: MembersCount.FiveOrMore,
};
Navigation.logCatalogEvent("TestUserId", CoreCatalogType.User, userDetail);
"data": [
{
"id":"UserDoeTEST4",
"kv":{
"account_type":"basic",
"city":"Barcelona",
"country":"South Africa",
"education_level":"bachelors",
"experience":"4 Years",
"language":"English",
"hello":"world",
"name":"User Catalog",
"organization_id":"organizationID",
"organization_name":"Causal Foundry",
"profession":"HCW",
"referral_code":"QWERTY",
"region_state":"Barcelona",
"timezone":"+01:00",
"workplace":"facility",
"zipcode":"08008"
},
"type":"user"
},
]
Site Catalog
Below are the Site Catalog values.
Format
| Param | Usability | Format | Description |
|---|---|---|---|
| name | REQUIRED | STRING | Name of the site, provided by the partner. |
| type | REQUIRED | STRING (ENUM) [pharmacy, clinic, community] | Type of the site, provided by the partner based on the enum. |
| country | OPTIONAL | STRING | Country in which the site is at. |
| region_state | OPTIONAL | STRING | Region or State in which the site is at. |
| city | OPTIONAL | STRING | City in which the site is at. |
| street_address | OPTIONAL | STRING | Address of the site. |
| zipcode | OPTIONAL | STRING | Zipcode in which the site is at. |
| level | OPTIONAL | STRING | Level of the site. |
| is_active | OPTIONAL | BOOLEAN | If the Site is currently active. |
| latitude | OPTIONAL | DOUBLE | Latitude where the site is at. |
| longitude | OPTIONAL | DOUBLE | Longitude where the site is at. |
| culture | OPTIONAL | STRING | Culture of the site (if any). |
| parent_id | OPTIONAL | STRING | Id of the parent site (if any). |
| sub_type | OPTIONAL | STRING | sub_type of the site. |
| priority | OPTIONAL | STRING | priority of the site. |
| is_private | OPTIONAL | BOOLEAN | If the site is private. |
| district | OPTIONAL | STRING | district of the site. |
| sub_district | OPTIONAL | STRING | sub_district of the site. |
| landmark | OPTIONAL | STRING | landmark of the site. |
| attributes | OPTIONAL | JSON OBJECT | attributes of the site, such as bed_number, insurance_plan_lst |
| service_list | OPTIONAL | ARRAY (STRING) | Array of the services provided at that facility. |
Usage
- Android (Java/Kotlin)
- iOS (Swift)
- React Native (JS/TS)
- Web Application (JS/TS)
- JSON
val hcwSiteCatalogModel = SiteCatalogModel(
name = "test",
type = SiteCatalogType.Community.toString(),
country = "South Africa",
regionState = "test region_state",
city = "test city",
zipcode = "test zipcode",
level = "test level",
isActive = "false",
latitude = "41.63",
longitude = "2.404",
serviceList = listOf("item1", "item1")
)
CFCoreEvent.logCatalog(
coreCatalogType = CoreCatalogType.Site,
"sampleSiteID",
catalogModel = hcwSiteCatalogModel
)
let hcwSiteCatalogModel = SiteCatalogModel(
name: "test",
type: SiteCatalogType.Clinic.rawValue,
country: CountryCode.UnitedArabEmirates.rawValue,
regionState: "test region_state",
city: "test city",
zipcode: "test zipcode",
level: "test level",
category: "test category",
isActive: false,
latitude: 41.385063,
longitude: 2.173404,
culture: "test culture"
)
CFCoreEvent.shared.logCatalog(coreCatalogType: CoreCatalogType.Site, subjectId: "RandomSITEID1", catalogModel: hcwSiteCatalogModel)
let siteCatalogModel = {
id: "JohnDoeTEST",
name: "test",
type: SiteCatalogType.Clinic,
country: Country.Spain,
region_state: "test region_state",
city: "test city",
zipcode: "test zipcode",
level: "test level",
is_active: false,
street_address: "test address",
latitude: 41.390205,
longitude: 2.154007,
culture: "test culture",
parent_id: "testID123",
};
CfCore.logCatalogEvent(CoreCatalogEventType.Site, siteCatalogModel);
const siteCatalogModel = {
name: 'test',
type: SiteCatalogType.Clinic,
country: Country.Spain,
region_state: 'test region_state',
city: 'test city',
zipcode: 'test zipcode',
level: 'test level',
is_active: false,
street_address: 'test address',
latitude: 41.390205,
longitude: 2.154007,
culture: 'test culture',
parent_id: 'testID123',
};
CFCore.logCatalogEvent(
'SiteDoeTEST4',
CoreCatalogType.Site,
siteCatalogModel,
);
"data": [
{
"id":"sampleSiteID",
"kv":{
"city":"test city",
"country":"South Africa",
"is_active":"false",
"latitude":"41.63",
"level":"test level",
"longitude":"2.404",
"hello":"world",
"name":"test",
"region_state":"test region_state",
"service_list":"item1, item1",
"type":"community",
"zipcode":"test zipcode"
},
"type":"site"
}
]