Product Intelligence API¶
Free beta
Product Intelligence is in beta, and free while it's in beta. Expect it to move: fields can be renamed, added or removed, and we may start charging for access once the API leaves beta. We'll announce changes before they take effect, but don't build anything business-critical on it without a fallback.
The Product Intelligence API analyzes your product catalog with AI and returns insight per product: what it's worth over its lifetime, how its demand moves, when it sells. Use it to decide which products to keep in inventory, and when and where to spend your marketing budget.
The API exposes two GraphQL queries, each documented on its own page:
productInsightaccepts a specific product and returns data insights about it: lifetime value, recurrence patterns, typical discount levels, buyer retention and seasonal sales patterns.topProductsanswers the inverse question: which of your products best match a criterion? It returns a ranked product list for campaign targeting, discount optimization and time-based promotions.
How the analysis works¶
The model draws on a substantial dataset, but it won't produce insights for every product: data quantity and quality vary from one product to the next. Where there isn't enough data to answer accurately, the API returns an empty response rather than a guess.
Before insights can be generated for a product, it must first be created in Hello Retail. Most often this happens through your product feed. Additionally, we require your product to have a description and a valid image before we will be able to analyze it. There is also a delay when creating new products until this analysis has happened.
We are continuously updating and improving the model.
Accessing and Authenticating GraphQL API¶
The data is made available in a GraphQL API that is available from the URL:
https://core.helloretail.com/pi/graphql
This page also has a GraphiQL test interface for running queries, and a "Docs" panel containing the full schema with all available fields.
To interact with the API, you will need to authenticate. Both methods require a Hello Retail account. If you don't yet have an account, you can create a new one on my.helloretail.com. There are two primary mechanisms for authentication:
-
User Session Authentication: If you are already logged into my.helloretail.com and try to access the API in your browser, you will be automatically authenticated. This method is primarily useful for testing.
-
API-key Authentication: Please, see details here: Authentication Guide
Regardless of the authentication method, you can only request data for websites that you have access to.
Purchase next¶
For the purchase next API-endpoint you have to use our Unmanaged Recommendations API, using the BOUGHT_NEXT source type.
Below is an example in JavaScript:
async function loadRecoms() {
var data = {
websiteUuid: '{website id}',
trackingUserId: '{tracking user}',
requests:[{
trackingKey: 'testing',
count: 8,
sources: [
{
type: "BOUGHT_NEXT"
}
],
fields: ["title", "url",]
}]
};
var options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
}
const response = await fetch('https://core.helloretail.com/serve/recoms', options);
return await response.json();
}
loadRecoms().then((resp) => {
console.log(resp);
})