Shoppie now supports integration with webhooks.
In the Catalog setup modal, you are can now able to add a Webhook URL. Once you do thisconfigured, any changes made in the Order panel Panel will be sent to the specified URL. Every Each change includes the new updated order data , and the changelog in the request body. The issue key is sent included in the query , you can access it in and can be accessed via the issue property. The request method used is POST.
Data sent
The data sent in the request body is an object that contains containing the property data
.
The data
object
...
includes two properties: changelog
and cart
...
.
cart
is represents the new updated value of the order, which is matches the same value stored in the issue properties.changelog
contains information about what was changed with the update of the order.changelog
is an object that containsprovides details about the changes made during the order update.
The changelog
itself is an object containing two properties: cart
and items
, both of
...
which are arrays.
Example of data being sent in request body
Code Block | ||
---|---|---|
| ||
{ "data": { "changelog": { "cart": [ { "status": { "change": "{old_cart_status} → ${new_cart_status}", "old_cart_status": "{status}", "new_cart_status": "{status}" }, "totalPrice": { "change": "decrease" OR "increase", "old_cart_status": "{status}", "new_cart_status": "{status}", } } ], "items": { "status": { [itemId]: { "change": "{old_status} → ${new_status}", "old_status": "{status}", "new_status": "{status}" } }, "quantity": { change: "number of items", old_number_of_items: "{number_of_items_before}", new_number_of_items: "{number_of_items_now}", new_items: [ [itemId]: { change: "added", item_added: { "assetId": "1", "categoryId": "f2e42251-788e-4d27-8d18-827ac9b3a081", "id": "c431983f-872a-4b62-bed8-98a21649e7ac", "status": "none", "name": "PC", "price": 0 } }, ] } } }, "cart": { "id": "f58c2baf-22cf-4a1b-9d68-7784f7d4735f", "catalogId": "04fd2fdc-1668-432e-9bc7-8630bafdacb4", "timestamp": 1734433418325, "items": [ { "assetId": "6", "categoryId": "ecc4e257-7112-4798-88f8-ed413c5a7b30", "id": "0d52b943-1208-4461-a798-4b992f43745f", "status": "completed", "name": "Dell", "price": "1999.0" }, { "assetId": "20", "categoryId": "f2e42251-788e-4d27-8d18-827ac9b3a081", "id": "c431983f-872a-4b62-bed8-98a21649e7ac", "status": "completed", "name": "PC", "price": 0 }, { "assetId": "20", "categoryId": "f2e42251-788e-4d27-8d18-827ac9b3a081", "id": "19e913af-026a-445f-b5b6-7cab26b1c509", "status": "completed", "name": "PC", "price": 0 } ], "currency": "€", "totalPrice": 1999, "status": "completed" } } } |
Example: Automation for Jira
In this example we will make an automation which Approves the request once the order of Shoppie is completed.
Create a new rule , and select the "Incoming webhook Webhook" as a the trigger.
...
Add a condition by clicking Add component. Select Component and selecting {{smart values}}.
...
Add an action by clicking Add component
SelectComponent and selecting Add an
action componentAction.
In the Jira Service Management section, select “ApproveApprove/Decline request”Request.
Save the rule by clicking the Turn on rule On Rule button.
...
Integrate the rule with Shoppie
In the rule, click on Incoming webhookWeb.
Copy the URL provided.
...
Add the URL in the Catalog setup in Shoppie and click on Save.
...
The setup is now complete, when . When the Shoppie order is completed, the request will be automatically be Approvedapproved.