# Exercise: Customer Information

## Requirements

* A validation will be defined for the API “UserName\_Acc\_AddCustomer”.&#x20;
* When the API is executed and attempted to create or update an entity record, this validation will be called.
* Two (2) validations need to be applied through the Validation Steps:&#x20;
  * The first Validation Step checks if the mandatory fields of First Name, Last Name, Email, and Phone fields contain values.&#x20;
  * The second Validation Step checks if the Phone number digits count entered is between 7 and 10.
* An API gateway will be created, which uses this Validation pipeline.&#x20;
* The target entity is “UserName\_Acc\_customers”.&#x20;
* If the information entered is correct, a record will be created in the target entity.&#x20;
* If the information is missing or is not updated correctly, the record will not be created in the target entity and the error response will be responded back to the API.

## Solution

This exercise comprises the following steps:&#x20;

* Step 1: Create a Validation pipeline.&#x20;
* Step 2: Create an API gateway and define the Validation pipeline in the Entities tab.


---

# 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://docs.langstack.com/welcome/get-started/learn-langstack/validation-pipeline/exercise-customer-information.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.
