Unmerge Customers
POST https://api.chartmogul.com/v1/customers/unmerges
Unmerges customers that were previously merged.
curl -X POST "https://api.chartmogul.com/v1/customers/unmerges" \
-u YOUR_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"customer_uuid": "de305d54-75b4-431b-adb2-eb6b9e546012",
"data_source_uuid": "fef05d54-47b4-431b-aed2-eb6b9e545430",
"external_id": "cus_0001",
"move_to_new_customer": ["tasks", "opportunities", "notes"]
}'
{}
Body parameters
customer_uuid
string required- The ChartMogul UUID of the customer you want to unmerge a data source customer from.
data_source_uuid
string required- The data source UUID of the customer you want to unmerge into their own record.
external_id
string required- The external ID of the customer you want to unmerge into their own record.
move_to_new_customer
array(string)- An array of values defining objects that should be moved to the customer you’re unmerging into their own record. Possible values:
tasks
,opportunities
andnotes
. If you don’t provide any of these values, the tasks, opportunities, notes and call logs will stay with the customer you’re unmerging a data source customer from.
Response
Once the API receives a valid request, it responds with 202 - Accepted
. Then, the unmerge function works asynchronously.
Unmerge customers. You can only unmerge customers that have been previously merged.
The customer you’re unmerging from the existing customer receives a new customer UUID and their own customer record.
The Unmerge Customers endpoint allows you to keep objects like tasks, opportunities, notes and call logs with the existing customer (the one you’re unmerging a customer from). Or, you can move such objects to the new customer (the one you’re unmerging into their own record).
After unmerging, both customers have the same customer attributes such as company name, owner, location, lead created at, trial started at, website and any of the lead statuses.
Custom attributes and tags are moved to the customer they were added to before merging (unless they were overwritten during the merge). Custom attributes and tags added after merging two or more customers stay with the primary customer, that is, the customer that was merged into during the merge.