Your product ids and nutrition figures
Map your own SKUs to the restaurant's dishes, sizes and options so cart lines and webhooks name your products, and send nutrition figures for the dishes Tamr has none for.
When the restaurant's dishes carry your ids, every cart line and webhook names your products directly. And when your catalog has nutrition figures the restaurant never typed into Tamr, you can send them so the waiter can answer calorie and protein questions. Both need a secret key with the catalog:sdk permission.
Your ids
Set them in the dashboard (Settings > External ids, by hand or with the CSV it downloads), or from your backend with Set your product ids, up to 500 at a time:
{
"refs": [
{
"kind": "dish",
"tamrId": "dish_kafta",
"externalId": "SKU-1042"
},
{
"kind": "variant",
"tamrId": "var_large",
"externalId": "BOWL-L",
"branch": "achrafieh"
},
{
"kind": "option",
"tamrId": "opt_rice",
"externalId": null
}
]
}kindisdish,variant(a size) oroption.externalId: nullremoves a mapping.branchmakes the id apply at that branch only, over the chain-wide one, for chains whose products differ per branch.- Tamr's ids are in the CSV the External ids page downloads, and in Get the menu. Tamr keeps them stable through renames and re-imports.
- An unmapped dish is still recommended and proposed, with
externalId: null. Your app decides what to do with it. - The call is all or nothing: a refused call is a 400 whose
data.rowsgives each bad row'sindexandreason.
Your nutrition figures
Set nutrition figures fills the figures the restaurant left empty in Tamr, per serving: calories (0 to 10,000), and proteinGrams, carbsGrams and fatGrams (0 to 2,000 each), by Tamr's dishId or your externalId.
{
"dishes": [
{
"externalId": "SKU-1042",
"calories": 640,
"proteinGrams": 42
},
{
"dishId": "cmdish0001",
"carbsGrams": 18,
"fatGrams": null
}
]
}- A field left out is unchanged, and
nullremoves your figure. - Up to 500 rows, all or nothing: a refused call is a 400 whose
data.rowsgives each bad row'sreason(unknown_dish,unknown_external_id,out_of_range,duplicate). - The answer,
{ "updated": n }, counts the dishes that changed, so a repeat answers 0. - Your figures only fill gaps. A figure the restaurant typed in Tamr always wins, and Tamr never estimates one. Once set, they read like the restaurant's own everywhere: the waiter, the QR menu, the menu route and the cards.
- On a dish whose options carry their own figures, yours are the dish's part without choices, as the restaurant's own would be.