question

Rustique avatar image
Rustique asked ·

How do I manually merge customer customer information?

When customers use separate credit/debit cards for repeat purchases, the system creates new "customers" from each transaction. I'd like to merge the separate customer files into a single customer file, including their purchases.

In 2016, it was noted in this question ( https://community.clover.com/questions/660/merge-customers.html) that merging customer data and deleting customers manually was the only solution. The profile information is transferred easily enough, but how can the purchase information be transferred?
Customers
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

zgreathouse avatar image
zgreathouse answered ·
Customers are associated with Payments only through Orders. Payments do not have a Customer field and Customers do not have a Payments field. That said, a Customer can be added or removed from an order, meaning you can modify the association.

If you have Customer A and Customer B and you would like to merge Customer B's order history to Customer A. You can use the following endpoint to fetch all orders associated with customer B:
{baseUrl}/v3/merchants/{merchantId}/orders?filter=customer.id={customerId}

You can then run a script over the fetched orders which adds Customer A and removes Customer B from each order.

After your script finishes you can hit the following endpoint to see that the orders have been added to your customer A's order history:
{baseUrl}/v3/merchants/{merchantId}/customers/{customerId}?expand=orders
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community