Exercise: Customer Information

In this exercise, store validated customer information.

Requirements

  • A validation will be defined for the API “UserName_Acc_AddCustomer”.

  • 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:

    • The first Validation Step checks if the mandatory fields of First Name, Last Name, Email, and Phone fields contain values.

    • 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.

  • The target entity is “UserName_Acc_customers”.

  • If the information entered is correct, a record will be created in the target entity.

  • 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:

  • Step 1: Create a Validation pipeline.

  • Step 2: Create an API gateway and define the Validation pipeline in the Entities tab.

Last updated