# Custom Validations

## Third-Party Workflow Requirements

### Validation Logic

* Implement a **switch case** statement to inspect the **OrderEazi payload**.
* If the payload field `"Validate"` is populated, return a **webhook plain text response:**

```
"Verified"
```

### Webhook Response Format

All webhook responses must follow the JSON format below:

```json
{
  "Message": Success Message or Error Message,
  "Name": Name of Automation Workflow,
  "Success": true or false
}
```

Example:

```json
{
    "Message": "Valid TV License",
    "Name": "TV License Validator",
    "Success": true
}
```

## Insert Custom Validations

### Steps

1. In **My Dashboard**, go to **Settings → Workflow Manager**.
2. Select the **Workflow** tab.
3. Click the **plus (+) icon** to expand a *Workflow Step*.
4. Use the **dropdown arrow** next to the action you want to configure.
5. Open the **Custom Validation** tab.
6. Add a new **Custom Validation Endpoint**.
7. **Save Changes**.

### Notes

* Endpoints are validated **each time you save** the workflow process.
* Only **Required** and **Verified** custom validations will be active in workflows.
* Any **additional action information** can be captured in the **Data Field** tab in the workflow step that included the custom validation. This will be included in the payload sent to the third-party workflow.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.ordereazi.com/sales-features/settings/workflow-manager/custom-validations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
