post https://{host}/v2/events
Lets you create a new behavioral event.
Request Body Parameters
Parameter | Type | Description |
---|---|---|
eventName* | string | Name of the event. |
actions* | enum | Destination of the event. Values: EMFConsumer for EMF related events: Loyalty, DVS, and Communication, EIConsumer for Essential Insights. |
description | string | Short description for the event. |
fields | obj | Configure fields for the current event with attributes: name , type , and value . The various attributes available are:- addCustomerIfNotExists - Adds the customer if the customer does not exist.- isRequired - Marks the attribute as mandatory- isUniqueKeyField - Includes the attribute, to the unique key. Once defined as a unique key field, this attribute becomes mandatory and needs to be marked as isRequired . By default, customer identifier and event name are already part of the unique key.- isPsiData - Mark the field as Protected Sensitive Information. For more information refer to, Classify Potentially Sensitive Information (PSI). Note - You cannot enable isPsiData for the mandatory customer identifier field. |
name | string | Specify the name of the field. |
type | enum | Specify the type of the attribute. Values: tillCode , couponCode , customer , productSku , productBrand , productCategory , string , double . |
addCustomerIfNotExists | obj | Set this value to true to allow registering new customers into the loyalty program automatically |
valueType | enum | Data-type of the attribute. For example, Boolean , Enum , String . |
value | string | Value of the attribute based on its valueType .For example, if valueType is Boolean, value could be either true or false . |
identifierType | Object | Specify the identifier type and its value |
value | String | Supported values: userId, mobile, email, externalId, wechat, martjackId, cuid, fbid, unionId, fcmToken, line, cardnumber, cardExternalId |
valueType | String | Value for the identifier type |
For information on event uniqueness check, see Event uniqueness check.