Affinsy for Magento

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

01 · Getting data in

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.

Export orders as a Shopify-shaped CSV
FREE & UP
  1. 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.
  2. 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.
  3. 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.
Line-item export with Shopify column names
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;
Magento folds payment and fulfillment into one status field, so map its statuses (pending, processing, complete, canceled) to Financial Status yourself. Only Name, Created at, and the Lineitem columns are required for a first run.
Stream new orders to a webhook
PRO & UP
  1. Copy your signed webhook URL from the Affinsy dashboard.
  2. Add a sales_order_place_after observer (Open Source) or an Adobe Commerce webhook that POSTs the new order to your URL.
  3. New orders stream in automatically from then on, no scheduled export to remember.
Uses Magento's own event system, so nothing runs inside Affinsy and no store credentials are shared.
Push over the API
AGENCY
  1. Create a dataset and authenticate with your API key.
  2. POST orders to /api/v1/data/orders from your pipeline, one by one or in batches.
  3. Trigger runs and pull results over /api/v1/reports, or get a webhook when a run finishes.
Built for agencies that plug Affinsy into an existing data pipeline.Read the API docs
02 · What you get

Two reports and a plan, from one order history.

01 · Market Basket Analysis
What sells together

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.

02 · RFM Segmentation
Who your customers are

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.

03 · Test backlog
What to do about it

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.

Browse the live sample report →Segment exports come as formatted CSVs ready for Klaviyo, Omnisend, MailerLite, Mailchimp, HubSpot.
03 · Questions

Magento specifics

Why do I need a SQL query instead of a normal export?

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.

Why alias the columns to Shopify names?

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.

What is the parent_item_id filter for?

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.

How many orders do I need for useful results?

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.

What about customer privacy?

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.

Affinsy for Magento

Your next bundle is already in your order history.

Export your Magento orders and see the first report in minutes.