Your Magento orders, turned into a test backlog.
Magento keeps every order in your own database. Export it as a Shopify-shaped CSV with one query, drop it into Affinsy, and get the products your customers buy together, segments by purchase behavior, and ranked experiments to run. No extension to install.
No credit card · First report in minutes
How your Magento data gets in
Magento (Adobe Commerce and Open Source) has no one-click order export at line-item granularity, so you shape the data yourself. The trick: export it with Shopify's column names, and Affinsy reads it as a native Shopify order file.
- Run the query below against your Magento database (read replica is fine). It reads sales_order joined to sales_order_item, one row per line item.
- Keep the parent_item_id IS NULL filter: configurable and bundle products write both a parent and child row, so without it every such line item is counted twice.
- Save the result as UTF-8 CSV using the aliased column names as headers. Those are Shopify's column names, so Affinsy detects the layout and maps it automatically.
SELECT
o.increment_id AS "Name",
o.customer_email AS "Email",
o.status AS "Financial Status",
o.order_currency_code AS "Currency",
o.subtotal AS "Subtotal",
o.shipping_amount AS "Shipping",
o.tax_amount AS "Taxes",
o.grand_total AS "Total",
i.qty_ordered AS "Lineitem quantity",
i.name AS "Lineitem name",
i.price AS "Lineitem price",
i.sku AS "Lineitem sku",
o.created_at AS "Created at"
FROM sales_order o
JOIN sales_order_item i ON i.order_id = o.entity_id
WHERE i.parent_item_id IS NULL
ORDER BY o.entity_id, i.item_id;- Copy your signed webhook URL from the Affinsy dashboard.
- Add a sales_order_place_after observer (Open Source) or an Adobe Commerce webhook that POSTs the new order to your URL.
- New orders stream in automatically from then on, no scheduled export to remember.
- Create a dataset and authenticate with your API key.
- POST orders to /api/v1/data/orders from your pipeline, one by one or in batches.
- Trigger runs and pull results over /api/v1/reports, or get a webhook when a run finishes.
Two reports and a plan, from one order history.
Association rules over your real orders: which products pull each other into the cart, how often, and what each pairing is worth. Ranked by revenue impact, not just statistical lift.
Every customer scored on recency, frequency, and monetary value, then grouped into segments like Champions, Loyal, At risk, and Hibernating, each with counts and revenue share.
Each finding comes with a hypothesis you can act on: the bundle to offer, the segment to target, the cross-sell to test, ranked so you know where to start.
Magento specifics
Magento has no built-in order export at line-item granularity, and Market Basket Analysis needs one row per product in each order. A single query against sales_order and sales_order_item gives you exactly that. If your team already exports orders another way, any CSV with an order ID, order date, and product name works too.
Affinsy already recognizes Shopify's order export layout and maps it automatically. By exporting your Magento data with the same column headers (Name, Email, Lineitem name, and so on), you skip manual column matching. It is a labeling convenience, not a Shopify dependency.
Configurable and bundle products in Magento write two rows into sales_order_item: a parent and its child. Filtering to parent_item_id IS NULL keeps one row per real line item, so quantities and co-purchase counts are not inflated.
RFM segmentation works from your first upload. Market Basket Analysis gets stronger with more co-purchase history: the more orders you include, the more reliable the bought-together rules become, so export the widest date range you can.
Affinsy only needs a stable per-customer identifier for segmentation. You can use a customer number or a hashed email instead of a raw address if you prefer to keep PII out. If you plan to export segments to an email tool later, keep real email addresses in the data.
Your next bundle is already in your order history.
Export your Magento orders and see the first report in minutes.
Order data from: Affinsy for Shopify · Affinsy for WooCommerce · Affinsy for Shoper
Segments out to: Affinsy for Klaviyo · Affinsy for MailerLite · Affinsy for Omnisend