AI Cart Recovery Assistant for Magento 2
- Compatibility
- 2.4.9, 2.4.8, 2.4.7, 2.4.6, 2.4.5, 2.4.4, 2.4.3, 2.4.2, 2.4.1, 2.4.0, 2.3.7, 2.3.6, 2.3.5, 2.3.4
Description / AI Cart Recovery Assistant for Magento 2
MAGENTO 2 · ABANDONED CARTS · EMAIL · AI ASSISTANT
Help customers return to unfinished purchases.
Kowal AI Cart Recovery Assistant
Detect inactive carts, evaluate their context, and send a tailored message with a return link. Combine AI or heuristic scoring with an optional discount and an assistant conversation.
Scoring and fallback · Limited coupons · Contact history
HOW IT WORKS IN PRACTICE
01 · Detect inactivity
Cron saves carts after the configured time without updates.
02 · Choose the communication
Scoring, the intent threshold, and settings control the message.
03 · The customer returns to the cart
The link enables the return, and the assistant answers questions.
What does your store gain?
Explore the module features, use cases, and settings.
Intelligent abandoned cart recovery
AI Cart Recovery Assistant for Magento 2 helps stores recover unfinished orders more effectively without manually handling follow-up campaigns. The module automatically detects active carts that have not been updated for the period defined in the configuration, then saves them as potentially abandoned.
The next step is evaluating the customer purchase intent. The module can analyze the cart using OpenAI or, if AI integration is not enabled, use a local heuristic mechanism. It considers, among other factors, cart value, number of products, checkout stage, and basic customer context. Based on this, an intent score is calculated, meaning an estimated assessment of purchase intent rather than a confirmed probability of completing the purchase, along with the abandonment reason, such as price sensitivity, checkout friction, or offer comparison.
Personalized emails that recover sales
After the minimum intent threshold is exceeded, the module generates cart recovery emails. The content can be prepared by AI based on the cart contents and the detected abandonment reason, or by a fallback mechanism based on ready-made messages. The message includes a secure cart restore link and, optionally, a link to the AI assistant, which can answer customer questions and help them complete the purchase.
The module records sending logs, supports a failed attempt counter, and lets you control the maximum number of errors. As a result, the process is automated while remaining predictable and easy for the store team to monitor.
Dynamic discount coupons
For carts with lower purchase intent and a suitable order value, the module can automatically generate a one-time discount code. The discount amount is calculated based on the cart value and intent score, while the maximum discount limit remains fully under the administrator control. This helps better protect margins and trigger a discount only when the cart meets the configured business criteria.
AI assistant for customers
One of the module key differentiators is the built-in AI assistant connected to the abandoned cart. The customer can open a dedicated link and ask a question about products, variant selection, or purchase benefits. The module passes the cart context, product information, and even data about related, upsell, and cross-sell products to the AI model. Conversations are saved in the admin panel, giving the team insight into real customer purchase objections.
Dashboard, analytics, and technical integration
In the Magento panel, the administrator gets access to the Dashboard, Recovery Analytics, Conversations, and Email Logs sections. The module marks carts as recovered after an order is placed and presents basic metrics, such as the number of abandoned carts, number of recovered carts, recovered revenue, number of emails sent, and coupon usage.
For more advanced implementations, CLI commands and REST API endpoints are available. The module runs cron jobs for cart detection, scoring, and email sending, making it a good fit for the standard Magento 2 automation architecture.
Key benefits
- automatic abandoned cart detection
- cart scoring using AI or heuristic logic
- personalized sales recovery emails
- secure one-click cart restoration
- optional generation of one-time discount coupons
- AI assistant that helps customers complete purchases
- dashboard, analytics, email logs, and conversation history
- REST API and CLI for integration with store processes
- per-store configuration and Magento 2 compatibility
Process configuration and default values
Stores → Configuration → Kowal → AI Abandoned Cart provides the analysis provider, intent threshold, coupons, error limits, email template, and prompts. By default, inactivity is 30 minutes, the provider is heuristic, the minimum score is 0.45, the maximum discount is 5%, and the sending error limit is 3.
The default batch includes 100 records, and the conversation expiration time is 1440 minutes. Before launch, adjust these values to your purchase cycle and store message configuration.
Scoring is a guide for action
The intent score and suggested abandonment reason are an assessment by the model or heuristic. They do not confirm the actual reason for the customer behavior or guarantee a return to purchase.
Remote mode requires an API key and sends cart context to the AI service. The fallback lets you base scoring and messages on local logic; the quality of assistant responses depends on the available product data.
Cart return and monitoring
Restoration checks the token and the association between the email address and the cart. The link should be treated as access to the assigned cart and should not be shared with other people.
Marketing → AI Abandoned Cart includes Dashboard, Recovery Analytics, Conversations, and Email Logs. Detection, scoring, and sending require a working cron and mail transport. The history helps control attempts, errors, and the effect of orders.
Installation with Composer
Package kowal/module-ai-abandoned-cart, module Kowal_AiAbandonedCart. After configuring access to the Kowal repository, install the package, enable the module, update Magento, and clear the cache. In production, include compilation and static content deployment according to the store process.
From configuration to results
1. Detect inactivity
Cron saves carts after the configured time without updates.
2. Choose the communication
Scoring, the intent threshold, and settings control the message.
3. The customer returns to the cart
The link enables the return, and the assistant answers questions.
A customer returns with a product question
The customer left the cart and wants to compare variants. The message reminds them about the products and may include a link to the assistant using the cart context.
If the configuration and conditions qualify the cart for a discount, the module adds a one-time coupon. You can track the recovery result in the panel.
Organize communication after cart abandonment
Want to tailor the module to your store? Ask about implementing Kowal AI Cart Recovery Assistant and discuss the configuration or required extensions.
More Information
| Theme compatibility | Luma / Blank, KOWAL |
|---|
Questions and Answers
Does the module work only with OpenAI?
How does the module identify an abandoned cart?
Can the customer return to their cart with one click?
Can the module create discount coupons?
Can you control when emails are sent?
What does the AI assistant provide in this module?
Does the module have a reporting panel in Magento Admin?
Is the solution suitable for integration with other processes?
Does the module support multilingual and multistore shops?
Change Log
Module Installation Instructions
Magento 2 module for abandoned cart recovery with features for:
- detecting abandoned carts
- cart scoring using AI or heuristics
- generating cart recovery email messages
- optional coupon generation
- conversations with an AI shopping assistant
- admin panel and analytics
- REST API endpoints and CLI commands
Overview
The module helps recover abandoned carts in Magento 2 by detecting inactive carts, evaluating purchase intent, and sending email messages with a secure cart restore link. Depending on the configuration, it can work in two modes:
heuristicmode, without external AIOpenAImode, with AI analysis, email content generation, and assistant conversations
Typical workflow:
- The customer adds products to the cart.
- The customer leaves the store without placing an order.
- After the configured inactivity time has passed, the cart is marked as abandoned.
- The module assigns a score to the cart.
- If the score is high enough, a recovery email is sent.
- The email may include a discount coupon and a link to the AI assistant page.
- If the customer returns and places an order, the cart is marked as recovered.
Requirements
Before installation, make sure the store meets the following requirements:
- Magento 2 with CLI access
- properly working Magento cron
- transactional email sending configured in Magento
- HTTPS enabled on the storefront
- if AI mode is used: OpenAI API account with active billing and an API key
Operational recommendations:
- production mode for a live store
- tested email template and correctly configured sender
- privacy policy that covers the use of AI services if OpenAI mode is enabled
Installation
* = in production, use the --keep-generated option
Type: Composer
Add the Composer repository to the configuration:
You will receive Composer repository access credentials, meaning the customer email address and license token, by email after purchase. They are also available in the customer panel after logging in at kowal.store. Replace
TWOJ_EMAIL_KLIENTAwith your account email address andTWOJ_TOKENwith the token you received. Run the commands in the Magento root directory.composer config repositories.kowal composer https://repo.kowal.storeConfigure access to the Kowal Composer repository:
composer config http-basic.repo.kowal.store 'TWOJ_EMAIL_KLIENTA' 'TWOJ_TOKEN'Install the module with Composer:
composer require kowal/module-ai-abandoned-cart
Then run:
bin/magento module:enable Kowal_AiAbandonedCartbin/magento setup:upgradebin/magento setup:di:compilebin/magento cache:flushPost-installation checklist
After installation, check:
- whether the module is enabled in Magento
- whether the database schema was installed by
setup:upgrade - whether Magento cron is working correctly
- whether the store sends transactional emails
- whether the storefront uses correct HTTPS addresses
Useful verification commands:
bin/magento module:status Kowal_AiAbandonedCartbin/magento cron:runbin/magento cache:flushConfiguration
Magento Admin:
Stores -> Configuration -> Kowal -> AI Abandoned Cart
Admin pages:
Marketing -> AI Abandoned Cart
Configuration fields
Key settings:
Enable ModuleEnables or disables the entire module.Cart Inactivity Threshold (minutes)Defines after how many minutes of inactivity an active cart should be considered abandoned.AI ProviderAvailable values:Heuristic FallbackOpenAI
OpenAI API KeyRequired only whenAI Provideris set toOpenAI.Minimum Intent ScoreOnly carts with a score equal to or higher than this value qualify for sending a recovery email.Enable Dynamic CouponsEnables generation of one-time coupons for selected abandoned carts.Maximum Coupon DiscountDefines the upper limit for the automatically generated percentage discount.Maximum Failed Email AttemptsDefines how many failed sending attempts are allowed before the module stops retrying.Email Address for Message CopiesOptional BCC recipient for recovery messages.Enable AI Assistant LinkIf this option is enabled, the recovery email will include a secure link to the AI assistant page.Conversation Expiration Time (minutes)Defines how long the AI assistant link remains valid.Batch SizeDefines how many carts are processed in one detection, scoring, and email sending run.Cart Analysis PromptUsed when AI scoring is active.Email Generation PromptUsed to generate email message content in AI mode.Conversation PromptUsed by the AI assistant during the conversation with the customer.
Recommended initial configuration
A safe starter set of settings is:
Enable Module:YesCart Inactivity Threshold (minutes):30AI Provider:Heuristic FallbackorOpenAIMinimum Intent Score:0.45Enable Dynamic Coupons:YesMaximum Coupon Discount:5Maximum Failed Email Attempts:3Enable AI Assistant Link:YesConversation Expiration Time (minutes):1440Batch Size:100
Heuristic mode vs OpenAI mode
Heuristic mode
Use this mode if you want to start without integration with external AI.
In this mode, the module:
- detects abandoned carts
- calculates the intent score based on built-in business rules
- sends recovery emails
- can generate coupons
- can still provide the assistant page, but the responses will be based on built-in logic instead of OpenAI
OpenAI mode
Use this mode if you need greater personalization.
In this mode, the module can additionally:
- analyze cart context using OpenAI
- generate more personalized email content
- handle AI assistant conversations about products in the cart
- use product descriptions, related products, up-sell, and cross-sell products in responses
OpenAI configuration
To enable OpenAI mode:
- Create an API key in your OpenAI Platform account.
- In Magento Admin, go to
Stores -> Configuration -> Kowal -> AI Abandoned Cart. - Set
AI ProvidertoOpenAI. - Paste the key into the
OpenAI API Keyfield. - Save the configuration.
- Clear the Magento cache.
Important information:
- ChatGPT subscriptions and API billing are separate things
- API usage is billed independently by OpenAI
- in AI mode, the prompt and cart context are sent to OpenAI
Cron Jobs
The module uses Magento crons for automatic processing.
Configured cron jobs:
kowal_ai_abandoned_cart_detectkowal_ai_abandoned_cart_scorekowal_ai_abandoned_cart_email
What they do:
detect: searches for inactive carts that qualify as abandonedscore: calculates the intent score and reason codeemail: sends recovery emails and saves logs
If Magento cron is not working, the module will not process carts automatically.
First test after configuration
After installation and configuration, perform a full end-to-end test:
- Open the storefront as a guest customer.
- Add one or more products to the cart.
- Start checkout and enter an email address.
- Leave checkout without placing an order.
- Wait until the configured inactivity threshold has passed.
- Run cron or CLI commands manually.
- Confirm that the cart appeared in the admin panel.
- Confirm that the recovery email was sent.
- Open the cart restore link from the message.
- If the option is enabled, open the AI assistant link and send a test message.
Manual CLI sequence:
bin/magento kowal:ai:cart:detectbin/magento kowal:ai:cart:scorebin/magento kowal:ai:cart:send-emailsAdmin pages
The module adds dedicated admin pages under:
Marketing -> AI Abandoned Cart
Available sections:
DashboardOverview of detected and recovered carts.Recovery AnalyticsRecovery effectiveness statistics and operational metrics.ConversationsHistory of conversations with the AI assistant linked to abandoned carts.Email LogsLog of sent and failed recovery messages.
These pages are especially useful during implementation because they let you check whether detection, scoring, email sending, and recovered cart tracking work correctly.
Email content and customer experience
Each recovery email may include:
- personalized subject line
- custom message content
- summary of products in the cart
- cart value
- secure cart restore link
- optional one-time discount coupon
- optional AI assistant link
Customer path:
- The customer receives an email.
- The customer clicks the restore link and returns to the saved cart.
- The customer can optionally open the assistant page from the message.
- The assistant can answer product questions, compare options, and direct the customer back to checkout.
How coupons work
If dynamic coupons are enabled, the module can generate a coupon when:
- the cart value is high enough
- the intent score suggests that a discount may help
- the calculated discount does not exceed the configured maximum
Current built-in rules:
- carts below 100 units of the store currency do not receive a coupon
- carts with a high intent score do not receive a coupon
- carts with lower intent may receive a discount, usually 3% or 5%, limited by configuration
Generated coupons are:
- one-time use
- limited per customer
- linked to a shared Magento cart rule for the given discount level and store
CLI
You can run the module manually from CLI, especially during testing and diagnostics.
bin/magento kowal:ai:cart:detectbin/magento kowal:ai:cart:scorebin/magento kowal:ai:cart:send-emailsCommand meanings:
kowal:ai:cart:detectDetects abandoned carts.kowal:ai:cart:scoreAssigns scoring and reason code to carts.kowal:ai:cart:send-emailsSends recovery messages for qualifying carts.
Security
Cart restore and assistant links use signed tokens.
The token payload contains:
quote_idemailstore_idexpires_at
The token is validated by:
- signature verification
- expiration date check
- cart ownership verification
This gives the customer a secure link associated with a specific cart and limited in time.
Troubleshooting
Carts are not detected
Check:
- whether the quote is still active
- whether the cart contains products
- whether the quote does not have a related completed order
- whether the customer email address was captured
- whether the inactivity threshold has passed
- whether Magento cron is running
Carts are detected, but emails are not sent
Check:
- whether
Enable Moduleis enabled - whether
Minimum Intent Scoreis not set too high - whether email sending works in Magento
- whether the
Maximum Failed Email Attemptslimit has not been reached - whether the email address assigned to the cart is correct
OpenAI mode is enabled, but the AI result is not used
Check:
- whether
AI Provideris set toOpenAI - whether
OpenAI API Keyis filled in correctly - whether the server allows outgoing connections to the OpenAI API
- whether the OpenAI account has active billing
If the OpenAI call fails, the module will switch to the built-in heuristic behavior.
The AI assistant link opens, but responses are generic
Check:
- whether OpenAI mode is active
- whether the conversation prompt is configured correctly
- whether the link is still valid and has not expired
Production usage notes
Before launching in production, it is worth:
- checking email content and branding
- testing the coupon policy with real business rules
- verifying privacy and compliance requirements
- testing AI prompts on the store catalog and communication tone
- monitoring the first days of operation in
Dashboard,Conversations, andEmail Logs
Information needed for a support request
When reporting an issue, prepare:
- Magento version
- PHP version
- store mode: developer or production
- information on whether cron is running
- information on whether the issue occurs in
heuristicorOpenAImode - sample quote ID or customer email address related to the issue
- relevant entries from Magento exception logs or system logs
At Toursport.pl, customers often abandon their cart when they hesitate between size, product use, or season: a trekking jacket, shoes for a longer route, or a backpack with the right capacity. The decision requires confidence that the product will perform well in specific conditions.
Installing Kowal AI Abandoned Cart helps recover this moment of hesitation. The module sends a personalized email, restores the cart with a single link, and directs customers to an AI assistant that helps compare variants and reduces the risk of postponing the purchase.
Tandembaits.com sells specialist accessories and bait for carp anglers, so an abandoned cart often does not mean a lack of interest, but simply a moment spent comparing a setup. The customer may be checking boilie flavors, hook sizes, or compatibility with their existing gear.
After installing the Kowal AI Abandoned Cart module, the store can automatically detect such carts, assess purchase intent, and send a message with a return link. The AI assistant helps refine the choice, and a coupon can help complete the purchase without an aggressive discount.
At PCHB.pl, carts are usually high-value, and the purchase decision takes longer. The customer may abandon the order because they return to the bathroom design, consult the tile format with the contractor, or compare Italian and Spanish collections from the premium segment.
After installation, Kowal AI Abandoned Cart works like a discreet reminder from the seller. The module identifies the cart, assigns it a score, and sends an elegant message with a secure return link. The AI assistant can help with questions about application, style, and alternative collections.
At Hobbycenter24.pl, an abandoned cart often results from the need to match the replica, magazines, battery, charger, or eye protection. The customer is interested in making a purchase, but wants to avoid an incomplete set or components that do not fit the selected model.
After implementing Kowal AI Abandoned Cart, the store can automatically remind customers about their cart and encourage them to return to the purchase. The recovery message leads to the cart and the AI assistant, which helps resolve technical doubts, and the discount can be triggered only for carts with a high score.
At Bikechill.pl, customers most often abandon their cart when comparing the type of bicycle, frame size, components, or additional accessories. The purchase is technical and seasonal, so a moment of hesitation may result from the need to confirm whether the selected model suits the route, height, and riding style.
Kowal AI Abandoned Cart helps bring them back to that decision without pressure. The module detects an abandoned cart, sends a message with a return link, and can direct the customer to an AI assistant that answers questions about fit, variants, and set components.