Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In this article, you will learn how to set up the AWB Reconciliation webhook and enable email notifications to notify salespeople if there is an error during the synchronization process with an external system so they take appropriate action.

Valid Tokens: Admin and Setup.

The link to download invoices will only be active for six hours.

Table of Contents


Step one: Create the AWB Reconciliation Webhook in Your System

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

URL: https://theexternalsystem.com

Content-Type: application/JSON

Method: POST


id (integer)

Purchase Order ID.


awb (string)

AWB number.


shipDate (date)

Shipping date.

Date format: YYYY-MM-DD


arrivalDate (date)

Arrival date.

Date format: YYYY-MM-DD


fbe (number)

Full Box Equivalent (FBE).


crossDockTotalBoxes (integer)

Total boxes with cross-dock as a shipping method.


warehouseTotalBoxes (integer)

Total boxes with ship-via warehouse as a shipping method.


growerTotalBoxes (integer)

Total boxes with ship-via grower as a shipping method.


totalBoxes (integer)

Total boxes in the Purchase Order.


totalFreight (number)

Total freight cost.


totalCost (number)

Total Purchase Order cost.


location (array)

An array containing location details.


locationName (string)

Location name.


locationId (integer)

Location ID.


locationCode (integer)

Location code.


origin (array)

An array containing place of origin details.


code (string)

Origin code.


id (integer)

Origin ID.


vendorInvoices (array)

An array containing vendor invoices of the purchase order.


invoiceNumber (integer)

Invoice number ID.


invoiceAmount (number)

Total invoiced amount.


file (url)

URL to download the invoice PDF.


invoiceDate (date)

Invoice date.

Date format: YYYY-MM-DD


approvedOn (date)

Invoice approval date.

Date format: YYYY-MM-DD


vendor (array)

An array containing the invoice’s vendor information.


vendorType (string)

Vendor type.


vendorId (integer)

Vendor ID.


vendorName (string)

Vendor name.


vendorAccountingCode (string)

Vendor accounting code.


vendorCode (string)

Vendor code.


details (array)

An array containing invoice details.


amount (number)

Total invoice amount.


description (string)

Invoice description.


type (array)

An array containing invoice-type details and comments.


typeName (string)

Invoice type name.


typeCode (string)

Invoice type code.


component (array)

An array containing component details.


costComponentId (integer)

Cost component ID.


costComponentName (string)

Cost component name.


{
   "id":21124,
   "awb":"000-0099-9999",
   "shipDate":"2024-08-02",
   "arrivalDate":"2024-08-02",
   "fbe":10.0,
   "crossDockTotalBoxes":0,
   "warehouseTotalBoxes":20,
   "growerTotalBoxes":0,
   "totalBoxes":20,
   "totalFreight":60.0,
   "totalCost":60.0,
   "location":{
      "locationName":"Austin",
      "locationId":9,
      "locationCode":"08"
   },
   "origin":{
      "code":"BOG",
      "id":642
   },
   "vendorInvoices":[
      {
         "invoiceNumber":"98987",
         "invoiceAmount":60.0,
         "file":"http://kometsales-app-dev.s3.amazonaws.com/7030/awb-bills/21124/ai_1722647103845.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240803T015357Z&X-Amz-SignedHeaders=host&X-Amz-Expires=604799&X-Amz-Credential=AKIAUYFGZJ2AJCTMF75N%2F20240803%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=66ff58fa8e5aab90211c873f73a002ad8e5ecf53602afe6c187c627f03e0fbab",
         "invoiceDate":"2024-08-02",
         "approvedOn":"2024-08-02",
         "vendor":{
            "vendorType":"Freight / Handling",
            "vendorId":25216,
            "vendorName":"Apex Floral Inc.",
            "vendorAccountingCode":null,
            "vendorCode":"A630"
         },
         "details":[
            {
               "amount":60.0,
               "description":"Freight",
               "type":{
                  "typeName":"Freight",
                  "typeCode":"F",
                  "component":{
                     "costComponentId":2,
                     "costComponentName":"Freight"
                  }
               }
            }
         ]
      }
   ]
}

Back to top


Step two: Set up the AWB Reconciliation 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 Webhooks from the Integrations group of settings.

  3. Select AWB Reconciliation Invoices from the dropdown list.

  4. Enter the URL that Komet Sales will call when this webhook is triggered.

  5. Select your authentication type:

    1. Basic. Enter your username and password.

    2. Bearer Token. Enter your authentication 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.

webhook config.gif

Back to top


Notification sample

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

awb-webhook-email.png

  • No labels