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:
- Create a new event or edit an existing one (See Events to learn more about how to create events in Yespo).
- Enable the Validate parameters slide button.
- Click + Add parameter.

- Enter the parameter name in the corresponding field and select the Required parameter checkbox if the parameter is required.
- Add other parameters as necessary, then click Done.

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

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 requirements
eventTypeKey
Parameter | Type | Required/Optional | Description | Requirements |
---|---|---|---|---|
eventTypeKey | String | Required |
| 1. All characters are allowed except < ; ’ \ / | " ` ' ^ ? ! , >
|
eventParams
eventParams contain two types of information:
- Contact Identifiers (Required). An example:
- {
"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 |
|
|
Additional event-specific parameters | Array of objects | Optional | An array of objects — lists with key-value pairs containing event-specific parameters. |
|
Updated about 10 hours ago