Skip to main content

E-Commerce Event Objects

Every Content Block have some respective event objects that are required by the events to be used. These event objects can be referred to as item properties for that event or model/data classes that are required for that event. These objects provide a detailed context to the event about the element they are associated with.

List of Objects

Here's a list of objects that are required in core module events.

Object NameUsabilityDescription
Item ObjectitemsTrack the items associated to e-commerce.


Item Object

Before looking into the events that we have below, here is the following item object that will be used repeatedly in our events below.

Format

ParamUsabilityFormatEnum ValuesDescription
<type>_idREQUIREDSTRINGtype:: drug, blood, oxygen, medical_equipment, grocery, facility, subscription, item_verification, item_report, reward, survey, otherId of the Item in the event.
quantityREQUIREDFLOAT---Quantity of the item.
priceREQUIREDFLOAT---Unit Price of the item.
currencyREQUIREDSTRING---ISO provided currency code for the price and item.
stock_statusOPTIONALSTRINGin_stock, low_stock, out_of_stockCurrent stock status of the item.
promo_idOPTIONALSTRING---Promo Id if any assigned to the item.
discountOPTIONALFLOAT---Discount percentage for the item i.e. 0.15 for 15%
facility_idOPTIONALSTRING---facility Id if any available for the item.

Usage

     val itemModel = ItemModel(
id = "testItemId",
quantity = 10,
price = 1900F,
currency = CurrencyCode.USD.name,
type = ItemType.drug.name,
facility_id: "testFacilityId",
)