Omnichannel

Security and Compliance

Validating Event parameters

Events that are sent to Yespo must meet specific requirements. Otherwise, the workflows may not work, you may lose important data, etc. 

The Yespo system allows you to validate events and provide immediate feedback if event parameters contain errors. Also, the system checks that event includes the required parameters.

Setting Required Event Parameters

Set required event parameters so the system accepts an event only if it meets the specified structure.

Steps to set up event’s structure validation:

1. Create a new event or edit an existing one (See Events to learn more about how to create events in Yespo).

2. Enable the Validate parameters slide button.

3. Click + Add parameter.

Add parameters

4. Enter the parameter name in the corresponding field and select the Required parameter checkbox if the parameter is required.

5. Add other parameters as necessary, then click Edit.

Required parameters

Validating Event Parameters

Validate event parameters and structure using Generate event API method. Indicate parameters in the params array.

Generate event

If parameters do not meet the specified structure, you will get the 400 bad request error and the required event structure in the response.

Response example:

The event should have the following params: [
    {
        "name": "EmailAddress",
        "required": true
    },
    {
        "name": "Phone Number",
        "required": false
    },
    {
        "name": "Name",
        "required": false
    }
]

Event types with enabled parameter validation are marked with a check icon.

Event types with enabled parameter validation

Event requirements

eventTypeKey

Parameter Type

Required/Optional

Description Requirements
eventTypeKey String Required Unique identifier for the event type, e.g., PageViewed. After the first request, it will appear in your account, and you can see it in the Automation → Event types section.

1. All characters are allowed except < ; ’ \ / | " ` ' ^ ? ! , >

2. Max. length: 100 characters.

eventParams

eventParams contain two types of information:

{
   "name": "externalCustomerId",
   "value": "a7c9f9b8-d3a2-401c-8b93-7f3d4f91bfa2"
}
  • Additional event-specific parameters (Optional). An example:
{  
  "name": "cartId",  
  "value": "CART12345"  
}
Parameter Type

Required/Optional

Description Requirements
Contact identifiers String Required

eventParams must contain a contact identifier to determine the event's uniqueness. The priority of the parameters is as follows:

- contactId (internal contact ID in our system);
- externalCustomerId (internal contact ID in your system);
- email;
- phone;
- pushToken (web or mobile). 

An event without one of these parameters is not accepted.    

Recommended value: External ID.

1. All characters are allowed except < ; ’ \ / | " ` ' ^ ? ! , >

2. Max. length: 300 characters

Additional event-specific parameters Array of objects Optional An array of objects — lists with key-value pairs containing event-specific parameters.

1. Params array may be empty: []
But if the array is not empty, both name and value fields must be in the array object.

2. The value of the name parameter must be unique.

3. Max. length of the name parameter’s value: 100 characters.

See an example of the AbandonedCart event >

Any Questions?
We’re always happy to help!
Discount services
Schedule a Call
Fill in the form, and our specialists will call you back as soon as possible.
Discount services
Chat Support
We’re waiting for your questions!
Discount services
Email
Contact the support team