You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Abandoned Cart automation in DotDigital runs every 5 minutes to check for abandoned carts across all stores, including both customer and guest carts. This automation is configured with the Enrol Abandoned Cart After option set to 15 minutes.
Currently, the query responsible for loading potentially abandoned carts does not check whether the cart is empty. This leads to unexpected behavior:
When a new account is created, an empty cart is also created.
Approximately 20 minutes later (based on the described settings), a new contact is created on the DotDigital side, even if no automation is enrolling this contact.
Steps to Reproduce
Configure the Enrol Abandoned Cart After option to 15 minutes.
Register a new account on the store.
Wait for approximately 20 minutes.
Check DotDigital contacts – a new contact will be created, even though the cart is empty and not eligible for Abandoned Cart automation.
Expected Behavior
A new contact should only be created if the cart is eligible for Abandoned Cart automation enrollment. Specifically:
Only non-empty carts should be classified as abandoned and trigger automation enrollment.
Actual Behavior
Empty carts are treated as abandoned, causing unnecessary contact creation on the DotDigital side in the enrollment process.
Update the loading abandoned carts query to include a check for non-empty carts.
The text was updated successfully, but these errors were encountered:
bohdan-harniuk
changed the title
The Abandoned Cart Automation triggers contact creation in DotDigital when it is not expected
[Bug] The Abandoned Cart Automation triggers contact creation in DotDigital when it is not expected
Jan 27, 2025
I tried to create a PR with a fix, but I don't have the necessary permissions to do so. Could you please grant me the required permissions or provide instructions on how to contribute here?
Just to pre-empt your PR a bit, the problem we have here potentially is that we need to send cart insight:
for contacts with active quotes containing items
for contacts with active quotes that did initially contain items, but have been intentionally emptied
In order to send cart insight, we need a contact to be present. A contact with cart insight is not automatically enrolled - that only happens if their quote has items, and we save them into email_automation (from where a separate cron picks them up and enrols them).
Description
The Abandoned Cart automation in DotDigital runs every 5 minutes to check for abandoned carts across all stores, including both customer and guest carts. This automation is configured with the Enrol Abandoned Cart After option set to 15 minutes.
Currently, the query responsible for loading potentially abandoned carts does not check whether the cart is empty. This leads to unexpected behavior:
Steps to Reproduce
Expected Behavior
A new contact should only be created if the cart is eligible for Abandoned Cart automation enrollment. Specifically:
Actual Behavior
Empty carts are treated as abandoned, causing unnecessary contact creation on the DotDigital side in the enrollment process.
Technical Details
The issue stems from the following call chain:
\Dotdigitalgroup\Email\Model\AbandonedCart\ProgramEnrolment\Enroller::processAbandonedCartsProgramEnrolmentAutomation
\Dotdigitalgroup\Email\Model\AbandonedCart\ProgramEnrolment\Enroller::getStoreQuotesForGuestsAndCustomers
\Dotdigitalgroup\Email\Model\ResourceModel\Order\Collection::getStoreQuotesForAutomationEnrollmentGuestsAndCustomers
\Dotdigitalgroup\Email\Model\Apiconnector\V3\Contact\Patcher::getOrCreateContactByEmail
Proposed Solution
The text was updated successfully, but these errors were encountered: