Retrieve Email Recommendations

Implementing Boomtrain recommendations in email is done using our campaign recommendations feed endpoint. We'll work with you to setup a single feed with all of the recommendation areas you need in your email, and you can use the endpoint inside your ESP to call the feed once per email recipient.

Setting up the feed endpoint
The syntax for the feed is the following:

https://commerce.boomtrain.com/api/v2/mail_campaigns/run_for_email?api_key={{api_key}}&campaign_hash={{campaign_hash}}&email={{email}}

The parameters are to be set as described in the following table:

ParameterDescription
API KeyYour API key will be given to you by your Boomtrain account team
Campaign HashYour campaign hash will be given to you by your Boomtrain Account team
EmailThe email address of the recipient of the email

Sample Response
The following snippet shows a sample response from the campaigns feed:

[
	null,
	{
		"main": {
			"subject": "On Sale Now!",
			"campaign": {
				"name": "Browse Abandon Campaign",
				"hash": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
			},
			"trk_pixel_url": "http://mtr.pleisty.com/m/px/S_205b82a024e5fe65281f7f70e2180e74/MC_4aa659917fba3581ea6a1a353929f7c4/[email protected]/[email protected]/0.gif",
			"unsubscribe_url": "http://mtr.pleisty.com/m/unsub/S_205b82a024e5fe65281f7f70e2180e74/MC_4aa659917fba3581ea6a1a353929f7c4/[email protected]/[email protected]",
			"trk_send_confirm_pixel_url": "http://mtr.pleisty.com/m/sc/S_205b82a024e5fe65281f7f70e2180e74/MC_4aa659917fba3581ea6a1a353929f7c4/[email protected]/[email protected]/0.gif",
			"external_click_user_match": "pleisty_u=jordan%40boomtrain.com%3AMC_4aa659917fba3581ea6a1a353929f7c4",
			"user": {
				"customer_id": "[email protected]",
				"email": "[email protected]",
				"first_name": "Jordan",
				"last_name": "Boomtrain",
				"has_account": "yes"
			}
		},
		"widgets": [
			{
				"items": [
					{
						"_ih": "I_b6bea14b83830ba1de95bd3dc722917e",
						"available": "true",
						"cat2": "Appliances",
						"description": "<p>Create rich, creamy, perfectly frothed milk for your favorite coffee drinks with this easy-to-use fully automatic frother from Breville. An induction heating system allows it to reach temperature rapidly, efficiently and consistently. Simple dial lets you to set desired temperature and foam quality. Fully automatic for hands-free frothing. Cold stir setting froths milk without heating. Includes two dishwasher-safe attachments for latte and cappuccino. Removable lid has an opening for adding mix-ins like shaved chocolate. On board magnetic disc storage, for one disc. Compact design frees up valuable counter space. Power cord stores in base and attachments store in side of machine. Brushed stainless-steel exterior is easy to clean.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/breville-milk-cafe-electric-frother-c.jpeg",
						"item_pricenum": "129.95",
						"item_pricestring": "129.95",
						"item_title": "Breville Milk Café Electric Frother",
						"item_url": "https://emmyandwalter.com/products/breville-milk-cafe-electric-frother?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_47ad609ad5f9d7728b21b2f785710568.I_b6bea14b83830ba1de95bd3dc722917e"
					},
					{
						"_ih": "I_433ec5bf9864837a59fc28ff29cb7012",
						"available": "true",
						"cat2": "Appliances",
						"description": "<p>A breakthrough in French-press brewing, the ESPRO Press lets you enjoy rich coffee flavor without any residue or grit. The preferred press of fine hotels worldwide, the ESPRO has patent-pending double micro-filters, which are 9 to 12 times as fine as standard French-press filters—coffee flows through while even the finest sediment stays behind. The double-walled stainless-steel carafe keeps your coffee hot and fresh, while the sides stay cool to the touch. Also ideal for brewing loose-leaf tea, straining hot or cold beverages ad cocktails, and making extracts. Fine stainless-steel mesh filters retain grounds, silt and sediment. Filters are BPA, BPS and phthalate free. Double-walled stainless-steel carafe is vacuum insulated for superb heat retention. Made without glass—no breakage or replacements. Lightweight and exceptionally durable.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/espro-french-coffee-press-1-c.jpeg?v=1454900589",
						"item_pricenum": "99.95",
						"item_pricestring": "99.95",
						"item_title": "Espro French Coffee Press",
						"item_url": "https://emmyandwalter.com/products/espro-french-coffee-press?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_47ad609ad5f9d7728b21b2f785710568.I_433ec5bf9864837a59fc28ff29cb7012"
					},
					{
						"_ih": "I_259bfd29c92687480d31b517067b08cf",
						"available": "true",
						"cat2": "Appliances",
						"description": "<p>Bonavita has refined the art of coffee extraction down to this simple, one-touch brewer, a Williams-Sonoma exclusive. A pre-infusion cycle evenly saturates the ground coffee before brewing, an essential step for extracting the finest flavor from the beans. Certified by the Specialty Coffee Association of America, this machine meets the optimal standards of water temperature, contact time and coffee saturation. Makes up to eight 5-oz. cups. One-touch operation with programmable auto-start timer and digital display. Engineered for precise water and ground coffee contact time. Optional pre-infusion cycle for ideal extraction of freshly roasted coffee. Large showerhead facilitates even coffee saturation. Brews into a 50-oz.-cap. double-walled stainless-steel-lined thermal carafe. A Certified Home Brewer by the Specialty Coffee Association of America.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/img66c.jpeg?v=1454900587",
						"item_pricenum": "199.95",
						"item_pricestring": "199.95",
						"item_title": "Bonavita 8-Cup Digital Brewer with Stainless-Steel Carafe",
						"item_url": "https://emmyandwalter.com/products/bonavita-8-cup-digital-brewer-with-stainless-steel-carafe?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_47ad609ad5f9d7728b21b2f785710568.I_259bfd29c92687480d31b517067b08cf"
					}
				],
				"global": {
					"test": "test",
					"ui_params_config": {
						"widgettitle": "Based on Your Browsing History",
						"day1": "365",
						"day2": "0.1666666667",
						"history_start_pos": "1",
						"display_history_item": "1",
						"filter_type": "3",
						"algo_order": "collective_first",
						"profiled_prefilter_1": [
							"item_cat",
							"item_subcat"
						],
						"profiled_title_1": "",
						"show_prefilter2": "1",
						"profiled_prefilter_2": [
							"item_cat"
						],
						"profiled_title_2": "",
						"pro_extra_crit_is_new": "",
						"pro_extra_crit_is_onsale": "",
						"items_count": "3"
					},
					"debug_start_req_no_items": 3,
					"debug_line_count": 495,
					"count_slopeone": 3,
					"title": "Recommended for you in Coffee Makers",
					"reason": "Enough items 3 found / 3 required\n",
					"reason_dev": "Count rec for  SO 1\nCount rec for AA 2\nCount rec for  SO 3\nEnough items 3/3\n"
				},
				"order": 0,
				"_wh": "W_47ad609ad5f9d7728b21b2f785710568"
			},
			{
				"items": [],
				"global": {
					"test": "test",
					"ui_params_config": {
						"widget_title_ui": "Complement your last purchase",
						"day1": "365",
						"day2": "0.1666666667",
						"history_start_pos": "1",
						"display_history_item": "1",
						"filter_type": "2",
						"use_same_variable_items": "1",
						"items_count": "3"
					},
					"price_variable": "item_pricenum",
					"filter_type": "2",
					"history_start_pos": "1",
					"widget_title_ui": "Complement your last purchase",
					"debug_start_req_no_items": 3,
					"debug_line_count": 495,
					"sorted_items": [],
					"reason_dev": ""
				},
				"order": 1,
				"_wh": "W_cb443fa147bbc922123cdbb90bcc6692"
			},
			{
				"items": [
					{
						"_ih": "I_3e2a19be352beb248010cbf4df07807f",
						"available": "true",
						"cat2": "Bowls & Cutting Boards",
						"description": "<p>You can never have too many bowls for prepping or combining ingredients. This set includes a full range of sizes – ten in all – for holding everything from a few strands of saffron to all the ingredients for a cake. Perfectly simple in design, they're useful as serving pieces too.Made in the USA of durable tempered glass.Ten sizes accommodate a range of ingredients.Suitable for hot or cold foods.Microwavable.Simple design lets them pair with any dinnerware for table service.Stackable for compact storage.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/10-piece-glass-bowl-set-c.jpeg?v=1454974559",
						"item_pricenum": "39.95",
						"item_pricestring": "39.95",
						"item_title": "10-Piece Glass Bowl Set",
						"item_url": "https://emmyandwalter.com/products/10-piece-glass-bowl-set?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_1e02bae0478dc3a909081071eaa64c0d.I_3e2a19be352beb248010cbf4df07807f"
					},
					{
						"_ih": "I_20bffd1b9b221997bb17392893516abb",
						"available": "true",
						"cat2": "Grill Accessories",
						"description": "<p>Enjoy peak grilling performance with clean-burning Afire KOKO briquettes, made from sustainable, all-natural coconut shells. Free of chemicals and propellants, they burn hotter and stay hot longer than traditional charcoal—and impart the same classic, smoky grill flavor. Made from sustainable, all-natural coconut shells that are left over from other coconut uses. Free of chemicals, fillers, glues and nitrates. Carbonized shells burn hotter and cleaner than conventional charcoal for efficient grilling and smoking. A central hole in each briquette promotes airflow for superb burning and consistent, lasting heat. Shells burn thoroughly, leaving minimal ash compared to traditional charcoal. Responsibly produced by Afire, a clean-energy partner of Terrapass. 4 lb. 8 oz. Made in USA.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/img31c_2e3fa50d-870b-47d5-bfdc-44a4c3cf44c7.jpeg?v=1456181136",
						"item_pricenum": "9.95",
						"item_pricestring": "9.95",
						"item_title": "Afire Koko Coconut Charcoal",
						"item_url": "https://emmyandwalter.com/products/afire-koko-coconut-charcoal?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_1e02bae0478dc3a909081071eaa64c0d.I_20bffd1b9b221997bb17392893516abb"
					},
					{
						"_ih": "I_ce6496a752626232e488a04b87c4cd33",
						"available": "true",
						"cat2": "Kitchen Tools",
						"description": "<p>Affectionately known as a \"mouli\" in France, the Moulinex food mill is a favorite of accomplished chefs for pureeing cooked fruits and vegetables to a smooth, even consistency. Its robust stainless-steel construction and hand-crank mechanism stand up to the most fibrous foods, from apple chunks to big batches of tomatoes. Manual food mill processes cooked fruits and vegetables to a smooth puree while removing skins and seeds. Excellent for making sauces, soups, purees, baby food, jams and preserves. Made of durable stainless steel with stainless-steel blades. Includes two discs, for a fine and medium puree. Made in France by Moulinex, a leading manufacturer of culinary wares since 1937.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/img31c_54ca262f-a3fb-439b-8cac-3fd8bf6ace80.jpeg?v=1454974602",
						"item_pricenum": "39.95",
						"item_pricestring": "39.95",
						"item_title": "Moulinex Food Mill",
						"item_url": "https://emmyandwalter.com/products/moulinex-food-mill?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_1e02bae0478dc3a909081071eaa64c0d.I_ce6496a752626232e488a04b87c4cd33"
					}
				],
				"global": {
					"subject": "On Sale Now!",
					"title": ""
				},
				"order": 2,
				"_wh": "W_1e02bae0478dc3a909081071eaa64c0d"
			},
			{
				"items": [
					{
						"_ih": "I_55bb98cc44d2387f0c7da5091906e949",
						"available": "true",
						"cat2": "Cutlery",
						"description": "<p>Perfect for breaking down larger cuts of meat, this heavy German cleaver is designed to cut through bone. Its finely honed high-carbon-steel blade works equally well for chopping and mincing tough vegetables. Knife is precision forged from a single piece of sturdy high-carbon steel that resists stains and corrosion. Heavy razor-sharp blade is designed for both heavy-duty and precision cutting. Wüsthof's Precision Edge Technology (PEtec) ensures a 20% sharper blade with twice the edge retention. Full tang is triple riveted to the handle for exceptional durability. Polypropylene handle is contoured for a comfortable grip. 6\"-long blade, 5 1/4\"-long handle; 1 lb. 4 oz. Made in Germany.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/wusthof-classic-cleavers-c.jpeg?v=1454974586",
						"item_pricenum": "99.95",
						"item_pricestring": "99.95",
						"item_title": "Wüsthof Classic Cleavers",
						"item_url": "https://emmyandwalter.com/products/wusthof-classic-cleavers?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_a082c1760d9d7e4a51d60aa56c5a6894.I_55bb98cc44d2387f0c7da5091906e949"
					},
					{
						"_ih": "I_014aadae7d6306adb511c50bf551c2ac",
						"available": "true",
						"cat2": "Appliances",
						"description": "<p>A smaller version of commercial-size models, this versatile stand mixer is designed with enough power and capacity to prepare large batches of cake batter or cookie dough without compromising your kitchen counter space. It's expertly hand assembled in Greenville, Ohio, home of KitchenAid since 1919.Planetary action allows attachments to spin independently while making continual rotations around the bowl for thorough mixing.Ten speeds range from very slow stirring to very high beating.Head tilts for easy removal of work bowl and beaters.Power hub for use with optional attachments.5-qt. stainless-steel bowl locks to base.Includes flat beater, dough hook, wire whip and pouring shield.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/kitchenaid-artisan-stand-mixer-c.jpeg?v=1454898514",
						"item_pricenum": "349.95",
						"item_pricestring": "349.95",
						"item_title": "KitchenAid® Artisan Stand Mixer",
						"item_url": "https://emmyandwalter.com/products/kitchenaid-artisan-stand-mixer?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_a082c1760d9d7e4a51d60aa56c5a6894.I_014aadae7d6306adb511c50bf551c2ac"
					},
					{
						"_ih": "I_b04d268681fd692a194a73307757e5bf",
						"available": "true",
						"cat2": "Appliances",
						"description": "<p>Chuck Williams’ favorite method of brewing coffee, the Chemex coffeemaker is an elegant, one-piece vessel made of high quality, heat-resistant glass. This simple, reliable method of making coffee yields a full-flavored, clean-tasting brew using Chemex unbleached filter squares (sold separately). The Chemex coffee maker has been brewing clear, pure, flavorful coffee without bitterness or sediment for over forty years and remains one of the purest methods of brewing. Coffee can be made at the preferred strength. Simple to use: Place grounds in the cone-shaped filter at the top and pour hot water over them. The polished wood collar and leather tie serves as an insulated handle.</p>",
						"item_img": "https://cdn.shopify.com/s/files/1/1152/0452/products/chemex-glass-coffee-maker-with-wood-collar-c.jpeg?v=1456187452",
						"item_pricenum": "36.95",
						"item_pricestring": "36.95",
						"item_title": "Chemex Glass Coffee Maker with Wood Collar",
						"item_url": "https://emmyandwalter.com/products/chemex-glass-coffee-maker-with-wood-collar?_pm=E-MC_4aa659917fba3581ea6a1a353929f7c4-UIDF_jordan%40boomtrain.com.W_a082c1760d9d7e4a51d60aa56c5a6894.I_b04d268681fd692a194a73307757e5bf"
					}
				],
				"global": {
					"subject": "More Recommendations For You",
					"title": ""
				},
				"order": 3,
				"_wh": "W_a082c1760d9d7e4a51d60aa56c5a6894"
			}
		]
	}
]