Skip to main content
All CollectionsCustomer_and_staff_account
How to avoid customer duplication
How to avoid customer duplication
Updated over a week ago

The FlexyBox system will automatically attempt to recognize a customer if they try to sign up again.

On all systems where the customer does not need to log in to make a purchase or booking, the system will attempt to look up the customer.

The customer number will be reused if the following are identical.

  • Phone number and first name

  • Email and first name

If a match occurs, the system will automatically update all other information with the information provided by the customer.

Note: for employees, it is required that the full name, email, and phone number are identical for a profile to be reused. This is done to ensure that employee profiles are not inadvertently changed.

API integrations are encouraged to follow the same logic.

With an API integration, you take full control over when customers should be created. A call to an API that creates a new customer will therefore ALWAYS create a new customer.

To achieve the same logic as the FlexyBox system uses internally, the first call one must make is to https://crm.flexybox.com/api/v2/index.html#tag/Customers/paths/~1v2~1customers/get

For this call, phone number and email must be sent. You will then receive a list of all customers with that email and/or phone number.
Then the best match must be found.

  1. Match where all information matches

  2. Match where email and phone match and first name matches

  3. Match where email and first name match

  4. Match where phone number and first name match.

Once the match is found, the customer should be updated with a call to this endpoint: https://crm.flexybox.com/api/v2/index.html#tag/Customers/paths/~1v2~1customers~1%7BcustomerId%7D/put

If no match is found, the customer is simply created with a call to the same API.

Did this answer your question?