Get Recs

Get Recs is how you access our taste preference-based recommendations for customers.

Get Recs calls are based on a specific Collection. The collection defaults to your primary inventory.

Use Preferabli.main.getRecs(product_category:product_type:collection_id:price_min:price_max:style_ids:food_ids:include_merchant_links:onCompletion:onFailure:) to get personalized, taste preference-based recommendations for a Customer.

Here is an example:

Preferabli.main.getRecs(product_category: ProductCategory.WINE, product_type: ProductType.RED) { (message, products) in
	// Do what you like with the message & products returned.
} onFailure: { error in
	// Call failed.
}
📘

You can narrow down a Get Recs requests by passing in foods and styles.

To narrow the results to products that pair well with a given Food, call Preferabli.main.getFoods(force_refresh:onCompletion:onFailure:) to get a list of available foods and then pass an array of ids to the Get Recs call.

To narrow results to products of a specific Style, first call Preferabli.main.getProfile(force_refresh:onCompletion:onFailure:) to get a customer's Profile. The profile object returned contains an array of their Profile Styles. Pass an array of ProfileStyle.style_id to limit results to ones that apply to the styles passed.