> For the complete documentation index, see [llms.txt](https://support.ordereazi.com/central/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.ordereazi.com/central/order-management/settings/workflow-manager/custom-validations.md).

# Custom Validations

Ask another system to check a project before a workflow step can be completed.

Some checks live outside OrderEazi, such as whether a client's licence is valid or a credit vetting has passed. A custom validation in OrderEazi asks another system, such as an automation tool, to check the project before a workflow step can be completed. If the other system says no, the step stays open, and the reason goes in the project's history.

### Before you start

You'll need the **Workflow Manager** permission, in the **Settings** permission group, and a web address (an endpoint) in the other system that can receive the check. A custom validation only takes effect once its endpoint has been verified. Speak to your OrderEazi representative to have an endpoint verified.

### How to add a custom validation to a step

1. In the main menu, go to **Settings** > **Workflow Manager**.
2. Select **Edit workflow** on the workflow, and double-click the step.
3. Select the **Custom Validation** tab.
4. Select **Add Custom Validation**.
5. Enter the endpoint address in **Enter Endpoint**, and tick **Required**.
6. Select **Save**, then **Save** in the editor's toolbar.

Any extra information the other system needs can be captured on the step's **Data Fields** tab. It's sent with the project.

### What the other system receives and returns

When someone completes the step, OrderEazi sends the endpoint the project's details, the step, and the information captured on it, as JSON.

* **To let the step complete:** Return a success response.
* **To stop it:** Return an error response, with a JSON body naming the check and saying why:

```json
{
  "Name": "TV License Validator",
  "Message": "No valid TV licence found for this client",
  "Success": false
}
```

The **Name** and **Message** are written to the project's history, so the user can see why the step was stopped.

**Example:** Before **Order Approval**, your automation tool checks that the client has a valid TV licence. For a client without one, it returns an error with "No valid TV licence found for this client". The user sees that the step can't be completed, and the reason is in the project's history.

### When a step can't be completed

* **"Custom validation failed for endpoint ...":** The other system said no. Check the reason in the project's history.
* **"Custom validation endpoint ... is unreachable.":** OrderEazi couldn't reach the endpoint. Check that the other system is running and the address is right.

### Related pages

* [Configuring a step](/central/order-management/settings/workflow-manager/configuring-a-step.md): the other tabs on a step
* [Webhooks](/central/developers/webhooks.md): send project changes to other systems
