Reputation: 1
We've created a Mailchimp customer journey for abandoned carts, with help of the Mailchimp API v3.0 and the PHP library DrewM\MailChimp
. During abandoning of the ticket sale, a cart is being created in the Mailchimp flow and after an hour, the customer is getting the first email of the customer journey. When clicking on the email or creating an order through API with the same customer_id, Mailchimp doesn't show the created order in the customer journey report. If I check the carts API, it does say (for that customer) 'order_count' => 2. I'm quite lost on where to look and Mailchimp help is not really helping at all, stating things that don't make sense at all, like: people don't buy products, that's why they don't show up or emails don't arrive because the customer journey is paused (while it isn't and emails ARE sending fine).
Next to the complete implementation, I tried to make a test cart with:
$result = $mailchimp->post('ecommerce/stores/{$storeId}/carts', [
'id' => 'test_cart',
'customer' => ['id' => 'testcustomer'],
'currency_code' => 'EUR',
'order_total' => 49.5,
'tax_total' => 8.59,
'lines' => [
[
'id' => 'line1',
'product_id' => 'test_product',
'product_variant_id' => 'test_product_variant',
'quantity' => 1,
'price' => 49.5
]
],
'checkout_url' => 'url-here'
];
Then, after an hour, I receive an email (first step from the abandoned cart flow) and I create, by API, an order:
$result = $mailchimp->post('ecommerce/stores/{$storeId}/orders', [
'id' => 'test_order',
'customer' => ['id' => 'testcustomer'],
'currency_code' => 'EUR',
'order_total' => 49.5,
'tax_total' => 8.59,
'lines' => [
[
'id' => 'line1',
'product_id' => 'test_product',
'product_variant_id' => 'test_product_variant',
'quantity' => 1,
'price' => 49.5
]
],
'financial_status' => 'paid',
'fulfillment_status' => 'fulfilled',
'processed_at_foreign' => date('c'),
'updated_at_foreign' => date('c')
];
Both return a successful request. If I then do a GET request to carts
, it returns for that cart:
[orders_count] => 2
[total_spent] => 99
Then I check the abandoned cart flow and it says nothing about the e-commerce data. No orders, no revenue, nothing. If I look up the customer itself and check the details, it does say 'Order placed xxx' in the same store as where the abandoned cart is connected to.
Anybody have any idea what I'm missing? I can't seem to solve it.
Upvotes: 0
Views: 46