Location Services

Our location services features allows the chatbot to validate and save a user’s address as well as calculating the distance between two addresses.

Here is an example chatbot flow diagram showing how the Address box can be used:

As seen in the screenshot above, we prompt the user to enter their address. If a valid address can be extracted by our AI module then the flow follows the verified path. In the sidebar on the left, there are multiple fields, where we can save extracted values from the address if it is verified. These extracted fields are:

  • Address: complete well-formatted address (e.g. 900 University Ave., Suite 100, Riverside, CA 92521)

  • Street Address (e.g. 900 University Ave)

  • Unit Type (e.g. Suite)

  • Unit Number (e.g. 100)

  • City (e.g. Riverside)

  • Zip/Postal Code (e.g. 92521)

  • State (e.g. California)

  • Country (e.g. USA)

As mentioned earlier, we also have an Address Distance box to calculate the distance between two addresses. The screenshot below shows an example of how we can set up the box to calculate the distance between a user’s address and a pre-defined address.

Here we set Address 1 to user_address (which we collected using the Address box) and calculate the distance to the address specified in Address 2. The calculated distance will be stored in the user_distance field, which we can use in subsequent boxes, if the calculation is successful. The value stored in the user_distance is a number of miles, e.g. 10.

If the distance between the addresses is more than 400 km, the box will set the user_distance field to 10000.

The below diagram shows how we can combine the Address and the Address Distance boxes with a Field Condition box to build a conditional flow based on the computed distance stored in user_distance.

In the screenshot above, we added the two Field Condition boxes to check if the distance is greater/equal or less than 30 miles and follow a path accordingly. (If user_distance does not show in the field condition dropdown, you can create the variable using the Save Field box)