This article shares a possible use case your site could support, as well as an example flow that could support the use case. You're certainly not limited to this use case, but it may be a helpful jumping-off point as you plan your app's implementation.
To send emails to customers with item recommendations based on their most recent purchases from your Wix store, follow this basic flow:
catalogItemId
from the first lineItem
.listAvailableAlgorithms()
in the Recommendations API to get the algorithmId
of the "Frequently bought together" algorithm.getRecommendation()
in the Recommendations API with the catalogItemId
from step 2 and the algorithmId
from step 3. Use the Wix Stores app ID (215238eb-22a5-4c36-9e7b-e7c08025e04e
) in the algorithm object.getRecommendation()
, call getProduct()
in the Wix Stores Products API using the recommended item’s catalogItemId
.getProduct()
, generate an email with the relevant information from each item and send it to the customer.