Duplicate e-commerce customers created

I am using the ecomCustomers endpoint to create e-commerce customers via the API. Every time I create an e-commerce customer, a duplicate e-commerce customer with the same email, but with connectionid and externalid set to 0 is also created. Here is an example of a request I use:
post https://:account.api-us1.com/api/3/ecomCustomers Content-Type: "application/json" {"ecomCustomer":{"connectionid":"1","externalid":"123","email":"test@gmail.com"}}

And the two customers created:
normal:
{“connectionid”=>“1”,
“externalid”=>“123”,
“email”=>“test@gmail.com”,
“totalRevenue”=>“0”,
“totalOrders”=>“0”,
“totalProducts”=>“0”,
“avgRevenuePerOrder”=>“0”,
“avgProductCategory”=>“”,
“tstamp”=>“2019-07-01T17:43:12-05:00”,
“acceptsMarketing”=>“0”,
“links”=>{…},
“id”=>“3”,
“connection”=>“1”}

duplicate:
{“connectionid”=>“0”,
“externalid”=>“0”,
“email”=>“test@gmail.com”,
“totalRevenue”=>“0”,
“totalOrders”=>“0”,
“totalProducts”=>“0”,
“avgRevenuePerOrder”=>“0”,
“avgProductCategory”=>“”,
“tstamp”=>“2019-07-01T17:43:12-05:00”,
“acceptsMarketing”=>“0”,
“links”=>{…},
“id”=>“4”,
“connection”=>nil}

Is there any way to make it so only one customer is created?

It would be great to get some response on this as we are having the same issue.

Thanks!

Hi there,

This is intentional as it is not a duplicate. The customer record is a contact related record that is used to log Order data related to a specific contact and store.

You’ll notice one of the customers is related to connectionid = 0 and one is related to the connectionid of the store you are logging the order to. Any contact can have 2+ customer records to log the store-specific orders.

connectionid = 0 is simply an aggregate record of all of the orders that are logged for a given contact (and their corresponding customer records).

Cheers,