Acquia CDP

Closest store and distance-to-store computation

Closest store calculation

The closest store calculation is done on the primary address of each customer by computing the orthodromic distance, that is, “as crow flies” on a sphere between the geographic center of the ZIP Code where the customer lives and the geographic center of the ZIP Code where the stores are located.

The following are the calculations for closest store:

  • The computation relies on getting accurate ZIP Code data. Therefore, the first step is for CDP to standardize the customer and organization addresses, including the ZIP Code for the supported countries.

  • CDP assigns the latitude and longitude to each store of the centroid of the store’s postal code.

  • For all ZIP Codes having an eligible physical store, CDP computes the distance to all ZIP Codes within the same country. To compute the distance between the two ZIP centroids on the sphere, CDP applies the Haversine formula. For each ZIP Code, CDP keeps the top 20 stores within the maximum miles radius with the default value of 40 miles, and ranks them from closest to farthest.

  • For each master customer, CDP takes the ZIP Code and country of the primary address and looks for the store closest to that ZIP Code.

To change the default value from 40 miles to any other value, contact Acquia Support.

If the value of Closest Store Name is Unknown, there is no eligible store within the default 40 miles.

You can use the name, ID, or distance of the Closest Store to run campaigns or build reports. For instance:

  • Personalize your ink-jet messaging on your catalogs or your emails by including your customers’ nearest store’s information.

  • When there is an event at a store, inform the customers close to the store.

  • Understand the purchasing behavior of your customers by comparing the Primary Store where your customers shop with their closest store.

  • Find more case studies on How to drive foot traffic to brick and mortar.

Distance-to-store calculation

Distance-to-store calculation is done on the primary address of each customer by computing the distance “as crow flies” between the geographic center of the ZIP Code where the customer lives and the geographic center of the ZIP Code where the stores are located.

This relies on getting accurate ZIP Code data from your data feeds on both:

  • Organization and Customer/ Address objects

  • Third-party ZIP Code data that Acquia gets from its vendors

    For example, zip-codes.com is the vendor for the US and postcodeList.co.uk is the vendor for the UK.

Distance-to-store calculation is technically not part of the validation or standardization process, but is done as part of the summaries calculations. Therefore, it is done after completion of the validation, standardization, and deduping processes. CDP does not support all the countries.

The following are the supported countries:

  • US

  • UK/GB

  • CA

The following is the default behavior with respect to the country details:

  • If the customer address or the organization address does not have the country details, CDP defaults to US and computes the distance-to-store accordingly.

  • If the customer address or the organization address has the country details but the the specified country is not supported, CDP does not compute distance-to-store.

Reset

A calculation reset is required when you change the store zip codes, or the status from open to closed or closed to open, or the ExcludeAsClosestStore parameter.

For more information on whether a calculation reset is required on your data, contact the CDP Support team, create a Support ticket. If your account is not yet configured, see documentation page or reach out to your CVM. Support can help with your issues, questions, and access requests.