Frequently bought together products
How to use the Metrics API to get the products that have been most frequently bought together with other ones
The problem
You want to get the list of products that, over your order history, have been added as line items to the same orders as two specific other products (SKUs or bundles).
The solution
Filter
You need to perform an FBT query setting the required filter on the line items field to specify the array containing the IDs of the two products with which you're searching the correlation:
Attribute
Operator
item_ids
"in": [ "BmDzSVkXAW", "ZrxeSRgOmB" ]
Example
The following request uses the Metrics API to get the list of products that have been most frequently bought together with the items identified by the IDs "BmDzSVkXAW" and "ZrxeSRgOmB":
Last updated