- First, within the automation structure, we ask the customer to send the abbreviation corresponding to the state they live in. For example: Send “SP” for those who live in São Paulo.

- Next, we save the customer’s response in the variable
payload.state
.

- In Execute JavaScript, we use the variable
payload.state
to run the code that checks the delivery time based on the region provided by the client.

- Finally, the result of the code will be saved in the variable
payload.deadline
, which is sent to the client in the last message indicating the delivery time according to the informed region.