Skip to content

ESP Integration Guide for Hello Retail Product Agents

This document describes the requirements for Email Service Providers (ESPs) to integrate with Hello Retail's Product Agents messaging system.

Overview

Hello Retail's Product Agents generate personalized marketing messages for e-commerce customers. When a message is ready to send, we push it to your platform via HTTP API. Your platform is responsible for rendering the message content into an email template and delivering it to the recipient.

Customer Setup Flow

  1. Your customer (the merchant) generates an API key in your platform
  2. The merchant adds this API key to their Hello Retail account configuration
  3. Hello Retail uses this API key when making requests to your platform on behalf of that merchant

Integration Requirements

You need to provide two API endpoints:

1. Send Message API

Receives message content from Hello Retail and delivers it to the recipient.

Method: POST

Headers:

Content-Type: application/json
Authorization: <your-auth-scheme> <api-key>

Request Body: See Message Payload Format below.

Expected Response:

{
  "success": true
}
{
  "success": false,
  "error": "Description of what went wrong"
}

2. Permission Check API

Verifies whether we are allowed to send messages to a specific recipient. This check happens before we generate the message content, saving computational resources if the recipient cannot receive messages.

Method: GET or POST

Parameters:

  • email - The recipient's email address

Headers:

Authorization: <your-auth-scheme> <api-key>

Expected Response:

{
  "canSend": true
}
{
  "canSend": false,
  "reason": "not_subscribed"
}

Configuration

Please provide Hello Retail with:

Setting Description
sendMessageUrl Full URL for the Send Message API
permissionCheckUrl Full URL for the Permission Check API
authScheme How to send the API key in the Authorization header

Message Payload Format

The payload contains AI-generated email content and product data. All fields should be made available in your template rendering context.

Full payload structure
{
  "subject": "...",
  "previewText": "...",
  "headline": "...",
  "body": "...",
  "callToAction": "...",
  "otherProductsTitle": "...",
  "otherProductsText": "...",
  "otherProductsCallToAction": "...",
  "messageType": "REPLENISHMENT_REMINDER",
  "recipient": {
    "email": "customer@example.com"
  },
  "language": "ENGLISH",
  "website": "shop.example.com",
  "inputProduct": { ... },
  "primaryProducts": [ ... ],
  "otherProducts": [ ... ]
}

Content Fields

Field Type Description
subject string Email subject line
previewText string Email preview text (shown in inbox)
headline string Main headline inside the email
body string Main email body (may contain simple HTML: <b>, <em>, <ul>, <li>)
callToAction string Text for the primary CTA button
otherProductsTitle string Header for the recommended products section
otherProductsText string Description for the recommended products section
otherProductsCallToAction string Text for the secondary CTA

Metadata Fields

Field Type Description
messageType string One of: REPLENISHMENT_REMINDER, SIMILAR_PRODUCT_RECOMMENDATIONS, ACCESSORY_RELATED_PRODUCT_UPSELL, PRICE_DROP_VIEWED_PRODUCT, PRICE_DROP_PURCHASED_REPLENISHMENT, PRICE_DROP_ALTERNATIVE_PRODUCT
recipient object Contains email field with recipient's email address
language string Full language name in uppercase English (e.g., "ENGLISH", "DANISH", "GERMAN")
website string The merchant's website hostname (e.g., "shop.example.com")

Product Fields

inputProduct is the product that triggered this message — the item the customer previously bought or viewed. You can reference it in your email template to give the message context, for example to remind the customer what they purchased before recommending a replenishment or alternative.

primaryProducts is an array containing the featured product(s) — the main recommendation(s) in the email.

otherProducts is an array of secondary recommended products (0–6 products).

Each product object contains:

Field Type Description
title string Product name
description string Product description
imgUrl string Direct URL to product image
image.url string Direct URL to product image
image.scalableUrl string Hello Retail CDN URL supporting dynamic resize via query params
url string Product page URL with tracking fragment appended
originalUrl string Original product page URL without tracking
trackingCode string Tracking identifier for the product in this message
productNumber string The product's number/SKU as defined in the product catalog
price number Current price
oldPrice number | null Previous price if on sale
discountPercentage number Discount percentage (0 if not on sale)
currency string Currency code (e.g., "EUR", "USD")
onSale boolean Whether the product is on sale
brand string | null Brand name
inStock boolean Whether the product is in stock
priceExVat number | null Current price excluding VAT
oldPriceExVat number | null Previous price excluding VAT
keywords string Product keywords
ean string | null EAN/barcode