Order Cancellation Webhook

In this article, you will learn how to set up the order cancellation webhook and enable email notifications to notify salespeople if there is an error during the synchronization process with an external system so they can cancel the orders again once the issue is solved.

User Roles: Admin.


Step one: Create the Order cancellation Webhook in Your System

When creating the endpoint in your system, it is important to consider the following details:

Request

URL: https://theexternalsystem.com

Content-Type: application/JSON

Method: POST


Header

authenticationToken (string:50)

Komet Sales Company Token. You can use this optional parameter to identify yourself when integrating with external systems or extract it from the token. The method chosen will depend on your specific operation.

Body

orderId (long)

Komet Sales internal order ID.


companyId (long)

Komet Sales internal Company ID.

Request Example

{ "companyId":6316, "orderId":6908 }

Back to top


Response

Content-Type: application/JSON


Body

status (boolean)

Result of the request.

Valid values: 0 = Error | 1 = Success


message (string)

This parameter allows you to enter a customized message describing the status. The message will be reflected in Komet Sales.


Response Example

{ "status":"1", "message":"<<Custom Success Message>>" }

Back to top


Step two: Set up the Order cancellation Webhook

Once you have created the endpoint in your system, you need to add it to your Komet Sales account. To add your endpoint, do the following instructions:

  1. Go to Setup and select Settings.

  2. Click on Order Cancellation Webhook from the Integrations group of settings.

  3. Check the box to enable the webhook.

  4. Enter the URL that Komet Sales will call when orders are canceled.

  5. Enter your token.

  6. Enter the email addresses that the system will notify when an error occurs in the external system in the Error Notification field. You can enter up to 5 email addresses.

  7. Click on Save.

This URL is the one you created from your external system in step one.

cancellationwebhook.gif

Back to top


Notification sample

This is an example of the email notification the users will receive.

image-20240731-162414.png

 

Back to top


Related Articles



Peacock