Skip to main content

Cross-sell relations from order history

Once a month this workflow finds products that different companies buy together in one order and proposes them as products to offer together. When you trust the proposals, you let it add the relations itself.

To get proposals for one product, with AI judging what fits, use the Cross-sell and up-sell assistant.

In short
Where you use itIn the background. The result shows in the Action Hub
StartsBy itself, on the first of the month at 06:00
Changes in PropellerCreates one action. In the mode create it also adds relations between products
Uses AINo. The counts decide
TextsEnglish and Dutch
Runs in n8n1 a month
DifficultyMedium. You check the order statuses and who gets the action

What you get​

One action with the proposed pairs: the two SKUs, the number of companies that bought both and the share of the orders with the first product that also had the second.

A cross-sell action in the Action Hub, opened to show the proposed pairs with the number of companies and a percentage per pair

The action is a list to read. It has no yes or no per pair. You add the pairs you want on the Storefront tab of the product, or you switch the workflow to the mode create.

What you need​

  • An n8n account with the credential Propeller API key. See Set up n8n.
  • An API key with Viewer access on Order Data and Product Data and Owner access on User management. Owner access on User management is what lets the workflow create actions. For the mode create the key needs Owner access on Product Data as well.

How it works​

The workflow reads the orders of the last 180 days. Product A gets a relation to product B when both are true:

  • at least 3 different companies bought A and B in one order
  • at least 20% of the orders with A also had B

Each product gets at most 5 new relations, the strongest first. Left out are pairs that already have a relation, variants of the same cluster and products that can no longer be ordered.

Good to know

The workflows and agents in the Agent Hub are free to use and adapt. They are examples, not supported product features. Test them in a test environment and check the results before you use them on real customers.

Install it​

Install a workflow from the library explains each step.

  1. Import the file into n8n.
  2. Check that the seven nodes that talk to Propeller use the credential Propeller API key.
  3. Open the Settings node and check PURCHASE_STATUSES. See Fill in order status codes.
  4. Set ASSIGN_TO_ADMIN_USER_ID to the colleague who gets the action. The number is in the Id column under Admin > Backoffice Users.
  5. Click Execute workflow to run it once.
  6. Read the action in the Action Hub.
  7. Click Publish.

After a run you find one new action. With the mode propose a test run changes nothing else. If nothing appears, no pair of products met the rule.

Make it yours​

SettingDefaultWhat it does
MODE'propose''propose' lists the pairs in an action. 'create' adds the relations and lists what was added
HISTORY_DAYS180The period of orders that is read
MIN_COMPANIES3The number of different companies that must have bought both products in one order
MIN_CONFIDENCE0.2The share of the orders with the first product that must also have the second
RELATION_TYPE'RELATED'The kind of relation that is added: ACCESSORIES, ALTERNATIVES, OPTIONS, PARTS or RELATED
ASSIGN_TO_ADMIN_USER_IDnullThe colleague who gets the action. With null it goes to nobody
PURCHASE_STATUSESNEW, CONFIRMED, VALIDATED, ARCHIVEDThe statuses that count as an order

Limits​

  • In the mode create a run adds at most 500 relations. The action lists the strongest 30, so more relations can be added than you see in the action.
  • The workflow reads the newest 20,000 orders of the period. Orders with more than 30 lines are left out.