You can use webhooks to send requests to web applications every time the event "new order received" and the event "new quotation received" occurs.
You can use webhooks for countless purposes. For example, send an email to your customers or to the warehouse manager once a customized product is ordered, automate the printing process or modify the output files and send them to someone automatically, etc...
The use of webhooks requires minimum knowledge of computer systems, HTTP protocol, and programming languages.
This tool is only available for the Grow and Scale plan.
Summary
1. Setting up endpoints
Enabling a Zakeke webhook is very simple: just open the Integration menu and select Webhooks in your Zakeke back-office.
On the Webhooks page, you have the list of events that you can capture. Just enter the URL of the endpoint of your website and press "Save Settings" at the top right of the page.
If you need it, you can press the "Test" button next to the text field: it will make an HTTP POST call to your endpoint with test data so you can develop the webhook.
IMPORTANT
The parameters of the POST call are passed as "application/JSON" so make sure that your webserver/framework supports this encoding for requests.
IMPORTANT 2
We can't ensure that the request will be called only one time. So pay attention and manage the case where the request is made several times. If you are editing an order's design, the webhook is triggered again with the "detailDesignLastUpdate" property updated so you will know if the specific design has changed.
2. Json data sent to endpoints
1. Order received event
This is an example of what you will receive in your POST data.
You can retrieve informations about order details, producted files and items of designs: that's elements that make up the design (es. text, images and so on).
{ "eventType":"OrderGenerated", "data":{ "sellerID": 1234,
"currencyCode": "EUR",
"orderID": 1234567,
"orderCode": "12345",
"orderEcommerceNumber": "WEXXXX123456",
"orderAmount": 123.0000,
"orderDate": "2022-02-15T16:32:57.96",
"orderDetails": [
{
"detailOrderDetailCode": "12345",
"detailQuantity": 200,
"detailPrice": 160.0000,
"detailModelName": "xxxxx xxxxxxx xxxxx xxx xxxxx",
"detailModelCode": "product_sku_38856",
"detailZipUrl": "https://zakeke-download.azureedge.net/.../WEFRXXXX_XXX_XXX_2-15-2022.zip",
"detailDesignLastUpdate": "2022-02-15T16:32:57.82",
"detailDesignDocId": "000-accsdcsdcsdcsdcs7Q",
"detailCustomerId": 0,
"detailCustomerCode": "",
"detailVisitorId": 1234567,
"detailVisitorCode": "MmHguhIMNhuytvfDIA",
"detailPreviewUrl": "https://zakeke.blob.core.windows.net/.../qwertyqwertyqwert.png",
"detailFiles": [
{
"variantName": "Red",
"sideName": "Front",
"areaID": 1,
"format": "svg",
"fileUrl": "https://zakeke.blob.core.windows.net/.../WEFRXXXX_XXX_XXX.svg"
},
{
"variantName": "Blue",
"sideName": "Back",
"areaID": 1,
"format": "png",
"fileUrl": "https://zakeke.blob.core.windows.net/.../WEFRXXXX_XXX_XXX.png"
},
...
],
"detailTemplateID": 123456,
"TemplateCode": "123",
"items": [
{
"sideName": "Front",
"areaName": "",
"text": "Example of text",
"previewImageUrl": "",
"sourceImageUrl": "",
"imageName": "",
"coordinates":{
"x": 12.3456789,
"y": 98.765431,
"unit": "mm"
},
"dimensions": {
"width": 265.94,
"height": 118.29
},
"itemColors": [
{
"RGBCode": "#287fb9",
"PantoneCode": ""
}
],
"customOptions": null,
"printMethod": "ExamplePrintMethod",
"fontFamily": "20210120"
}
]
}
] }
}
2. Quotation received event (Product Customizer)
This is an example of what you will receive in your POST data for a quotation sent from customizer 2D tool:
{ "context": "Customizer 2D", "quoteID": 341, "productSKU": "523", "productName": "All-Over Print Basic Pillow Case", "urlDesignComposition": "https://portal.zakeke.com/customizer/index.html?ecommerce=design&isDesignEditor=1&culture=en&tokenOwin=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiU2VsbGVyIiwiUGVybUJpdHMiOiIwMTAwMTExMDAxMTAwMTExMTExMTAxIiwidW5pcXVlX25hbWUiOiJuaWNvbGV0dG8iLCJVc2VySUQiOiIyNCIsIlVzZXJOYW1lIjoibmljb2xldHRvIiwiZW1haWwiOiJuLmJpenpvY2FAZnV0dXJlbmV4dC5pdCIsIlVzZXJUeXBlSUQiOiIzIiwiY2xpZW50SUQiOiIyNjM0Iiwic2FsZXNDaGFubmVsSUQiOiIxIiwidmlzaXRvcmNvZGUiOiI2MWpyZEtwRUphTDFHZjFrSVkzeFprZnh1UEtWQlk3NyIsImFjY2Vzc1R5cGUiOiJTMlMiLCJuYmYiOjE2NDI2NzczNzgsImV4cCI6MTY0Mjc2Mzc3OCwiaWF0IjoxNjQyNjc3Mzc4LCJpc3MiOiJ3d3cuemFrZWtlLmNvbSIsImF1ZCI6Imh0dHBzOi8vd3d3Lnpha2VrZS5jb20ifQ.GhFHE7oC3wARTU3ZpgFdEAF1ramKZmhP--KgFv2MfZM&modelCode=523&qty=1&isClientPreviewsEnabled=1&designdocid=Testing-la6d5RnwYE6sFXmaxoSHUg&forceAdminSave=0", "designID": "Testing-la6d5RnwYE6sFXmaxoSHUg", "compositionItems": null, "formQuoteCustomer": [ { "readOnly": false, "removable": true, "typeField": "text", "label": "Cognome", "required": true, "name": "field_surname", "class": "", "tipText": "", "placeholder": "Surname", "value": "Rossi", "min_value": "", "max_value": "", "step": "", "sufix": "", "hideExtraField": true, "type": "text", "min_length": "", "max_length": "" }, { "readOnly": false, "removable": true, "typeField": "text", "label": "Nome", "required": true, "name": "field_name", "class": "", "tipText": "", "placeholder": "Name", "value": "Antonio", "min_value": "", "max_value": "", "step": "", "sufix": "", "hideExtraField": true, "type": "text", "min_length": "", "max_length": "" }, { "readOnly": true, "removable": false, "typeField": "text", "label": "Email", "type": "email", "required": true, "name": "field_email", "class": "", "tipText": "", "placeholder": "Email", "value": "test@zakeke.com", "min_value": "", "max_value": "", "step": "", "sufix": "", "min_length": "", "max_length": "" }, { "typeField": "text", "label": "Date", "required": false, "name": "field_5_1638355703545", "class": "", "tipText": "", "placeholder": "", "value": "2022-01-20", "type": "date", "min_length": "", "max_length": "", "sufix": "" } ] }
3. Quotation received event (3D Product Configurator)
This is an example of what you will receive in your POST data for a quotation sent from configurator 3D tool:
{ "context": "Configurator 3D", "quoteID": abc, "productSKU": "abc", "productName": "ACTION Junior", "urlDesignComposition": "https://portal.zakeke.com/configurator/index.html?name=ACTION++Junior&modelCode=1323&ecommerce=preview&qty=1&culture=it&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiU2VsbGVyIiwiUGVybUJpdHMiOiIwMTAwMTExMDAxMTAwMTExMTExMTAxIiwidW5pcXVlX25hbWUiOiJpbmZvQHJlY29yZG1vdG8uY29tIiwiVXNlcklEIjoiNjQ2MjciLCJVc2VyTmFtZSI6ImluZm9AcmVjb3JkbW90by5jb20iLCJlbWFpbCI6ImluZm9AcmVjb3JkbW90by5jb20iLCJVc2VyVHlwZUlEIjoiMyIsImNsaWVudElEIjoiNjMxNDkiLCJ2aXNpdG9yY29kZSI6IkFhdzNobzd4ZVU3V1paWENZcWZUU2dxT1Rja0xndUxpIiwiYWNjZXNzVHlwZSI6IlMyUyIsIm5iZiI6MTY0MjU4MjE5MSwiZXhwIjoxNjQyNjY4NTkxLCJpYXQiOjE2NDI1ODIxOTEsImlzcyI6Ind3dy56YWtla2UuY29tIiwiYXVkIjoiaHR0cHM6Ly93d3cuemFrZWtlLmNvbSJ9.Ki_RcSQVRHx_yqvgpIDq9iJuA2vGiINTfXh2ACqT_yg&editorMode=1¤cy=EUR&fromUrl=1&buttonText=save&compositionId=000-1mh6AEeqx0iHc57t7el39g", "designID": "", "compositionItems": [ { "option": "Colore zona 1", "value": "Rosso Ducati", "code": "Rosso Ducati" }, { "option": "Colore zona 2", "value": "Nero", "code": "Nero" }, { "option": "Colore zona 3", "value": "Nero", "code": "Nero" }, { "option": "Kevlar maniche", "value": "Kevlar maniche standard", "code": "Kevlar maniche standard" }, { "option": "Logo Protezioni", "value": "Resina Rossa", "code": "Resina Rossa" }, { "option": "Colore Protezioni spalle", "value": "Nero", "code": "Nero" }, { "option": "Colore Protezioni ginocchia", "value": "Nero", "code": "Nero" }, { "option": "Slider gomito", "value": "Nero", "code": "Nero" } ], "formQuoteCustomer": [ { "typeField": "header", "headertext": "Preventivo personalizzato Record Moto", "headerlevel": "h1", "class": "" }, { "readOnly": false, "removable": true, "typeField": "text", "label": "Nome", "required": true, "name": "field_name", "class": "", "tipText": "", "placeholder": "Name", "value": "Antonio", "min_value": "", "max_value": "", "step": "", "sufix": "", "hideExtraField": true, "type": "text", "min_length": "", "max_length": "" }, { "readOnly": false, "removable": true, "typeField": "text", "label": "Cognome", "required": true, "name": "field_surname", "class": "", "tipText": "", "placeholder": "Surname", "value": "Rossi", "min_value": "", "max_value": "", "step": "", "sufix": "", "hideExtraField": true, "type": "text", "min_length": "", "max_length": "" }, { "typeField": "text", "label": "Numero di cellulare", "required": true, "name": "field_w_1639248239180", "class": "", "tipText": "", "placeholder": "", "value": "+00000000000", "type": "text", "min_length": "", "max_length": "", "sufix": "" }, { "readOnly": true, "removable": false, "typeField": "text", "label": "Email", "type": "email", "required": true, "name": "field_email", "class": "", "tipText": "", "placeholder": "Email", "value": "test@zakeke.com", "min_value": "", "max_value": "", "step": "", "sufix": "", "min_length": "", "max_length": "" }, { "typeField": "inputRadio", "label": "Taglia", "required": true, "options": [ { "pos": 1, "label": "Su misura", "value": "" }, { "pos": 2, "label": "Taglia standard", "value": "" } ], "name": "field_87_1639752775038", "class": "", "tipText": "", "placeholder": "", "value": "" }, { "typeField": "inputRadio", "label": "Stampe personalizzate (nome, numero. loghi, ecc.)", "required": true, "options": [ { "pos": 1, "label": "Si", "value": "" }, { "pos": 2, "label": "No", "value": "" } ], "name": "field_3m_1639248656443", "class": "", "tipText": "", "placeholder": "", "value": "" }, { "typeField": "textArea", "label": "Note aggiuntive", "required": false, "name": "field_hi_1639248529532", "class": "", "tipText": "", "placeholder": "", "value": "numero 12\nnome NEJO\n\nPelle di Canguro!\nPELLE TRAFORATA (preforated leather on chest)", "min_length": "", "max_length": "", "cols": "30", "rows": "10" }, { "typeField": "inputRadio", "label": "Come vuoi essere contattato?", "required": true, "options": [ { "pos": 1, "label": "Whatsapp", "value": "" }, { "pos": 2, "label": "Email", "value": "" }, { "pos": 4, "label": "Telefono", "value": "" } ], "name": "field_j_1639245649444", "class": "", "tipText": "", "placeholder": "", "value": "" }, { "typeField": "paragraph", "content": "I tuoi dati personali verranno utilizzati per elaborare il tuo preventivo, per altri scopi descritti nella nostra privacy policy.", "class": "" }, { "typeField": "inputCheckbox", "label": "Ho letto e accetto termini e condizioni del sito web.", "required": true, "name": "field_18_1639248371313", "class": "", "tipText": "", "placeholder": "", "value": "false", "defaultSelected": false }, { "typeField": "header", "headertext": "Ti risponderemo il prima possibile ??????", "headerlevel": "h3", "class": "" } ] }
3. Status of webhooks and fails
On the same page, it is possible to visualize in the table below the events all the webhooks executed or to be executed (excluding the test ones) and their status.
All events prior to saving the settings are considered as completed as no action has been performed for them.
If a webhook fails, Zakeke will try to re-run it up to a maximum of 5 times, extending the time more and more. After 5 attempts the webhook is considered "Aborted" and no action will be performed for it.
You can press the "Retry all failed" button to try these webhooks again.