Skip to content

Webhooks: Use Webhooks to Import & Update Orders

Webhooks allow you to send order information to Postsale when an event occurs in your sales channel, such as when a new order is placed or when an order is u...

Updated January 12, 20266 min readOrders

Webhooks allow you to send order information to Postsale when an event occurs in your sales channel, such as when a new order is placed or when an order is updated.

This article will guide you through how to add webhooks in Postsale. See our Webhooks: Manage Your Webhooks help article for information on how to edit your existing webhooks.

Before We Begin

  • Adding Webhooks is a premium feature requiring the Soar billing plan. Learn more about managing your Postsale account in our Frequently Asked Questions.
  • This article assumes that you have a general knowledge of using webhooks. It also assumes that:
    • Your sales channel supports the ability to create webhooks.
    • Order information from your sales channel can be sent as JSON when a new order is created or when an order is updated. 
       
  • You can create as many webhooks as you need. For example, you may create one webhook to send newly created orders to Postsale, and a second to send order updates. 
     
  • Webhooks can be used to send information to Postsale only. They cannot be configured to send information from Postsale back to your sales channel.

General Guide

This article uses a general example of adding a webhook to send order information to Postsale so that you can become familiar with the process. Creating webhooks in your specific sales channel may differ from the examples shown below.

Add Webhooks to Postsale

Real World Example

We would like to use webhooks to send new order data to Postsale when a new order is placed in our sales channel. 

1 - Send a Test Webhook

  1.  Go to Settings.

    Settings gear icon in the main navigation
     

  2. Select Store Settings.

    Store settings is being clicked in the main menu.

  3. Select Webhook

     
     

  4. Select the type of webhook security used by your sales channel from the Security drop-down menu. Then, enter the correct values for the type of security selected. 

    Select from:

  • Basic Auth: Specify the Username and Password to authenticate the request.

  • Header Value: Specify the header and header value used to authenticate the request.

  • HMAC: Specify the HMAC Header and HMAC Secret Key used to authenticate the request.

  • IP White List: List of IP addresses from which requests are allowed. 

    Security has been selected and the values entered.

  1. Click the Copy to Clipboard button to copy the Postsale webhook URL. 

    Copy to Clipboard button next to the webhook URL
     

  2. Open your sales channel admin in a new web browser window and create a new webhook. 
    The steps to create and the options available when creating a webhook will be specific to your sales channel.  However, be sure to:

    • Specify whether the event that triggers the request is when a new order is created or when an order is updated. 

    • Select JSON as the webhook format.

    • Paste the URL you copied in step 5 into the new webhook. 

       

  3. Follow the steps for your sales channel to send a test to Postsale for the webhook you just created. 

     

  4. Switch back to Postsale. After a few moments a sample web request will display in the webhook window. 

     

  5. Click Next to begin mapping. 

2 - Map the Request to Postsale

The next step is to map the information in the webhook request to the fields the data should be imported to in Postsale.

We recommend mapping at least one field before continuing to the next step. While it is possible to edit the map after saving the webhook, mapping the fields now ensures that the connection will be saved successfully.

Helpful Tips

Before you begin, here are a few tips that may prove helpful during the mapping process:

  • The mapping screen breaks the data down into separate categories (Order, Address, Items, Charges, and so on). When you expand a category, only the fields in Postsale that relate to that category are shown. This helps to organize and simplify the mapping process.      
     

  • The categories of the mapping screen are broken into two columns:

    • The fields in Postsale
    • The elements included in the webhook request, selectable from the drop-down menu   
         
      The Postsale fields and webhook objects are shown in the mapping screen. 
       
  • The currently selected field name is highlighted to help you keep track of which field is currently being mapped.   
       
    The source mapping is shown.
     

  • The elements in the request that have been mapped and the elements that have not yet been mapped are clearly identified for you.      

    Mapped and unmapped field indicators in the mapping screen

Map The Request

Expand and map each of the following sections. 

Once all sections have been mapped, click the Next button to save your mapping and finish your setup.

3 - Automation, Name Your Store, Add a Logo, Store Address

  1. Verify that you wish for Postsale to perform the following actions automatically. Then, click Next.
     
  • When an order is first imported
    • Set the order's status to [select the status from the drop-down menu]

      Enable this option to specify what the local status of the order should be set to when order's are imported for the first time. With this option disabled, the order's local status will be blank when imported.

      Set order status dropdown for when an order is first imported
       

  • When a shipment is processed
    • Set the order's status to ‘Shipped’

      With this option enabled, Postsale will set the order's status to ‘Shipped’ when a label is created for the order.

      Checkbox to set order status to Shipped when a shipment is processed
       

  • When a shipment is voided
    • Set the order's status to ‘Voided’

      With this option enabled, Postsale will set the order's status to ‘Voided’ when a shipment is voided for the order.

      Checkbox to set order status to Voided when a shipment is voided

  1. Enter a name for this webhook connection into the Store Name field. 

    A name has been entered into the Store Name field. 
     

  2. (Optional) Click the Logo tile. Then, select an image file (png or jpg) from your computer. 

    • Postsale supports JPEG and PNG files with a recommended size of 3 MB or less.
    • Larger image files will be reduced to the maximum file size of 3 megabytes when uploaded.
    • The image will be uploaded and become the logo for your webhook connection. 
    • The logo will automatically display in Postsale templates that include a logo, such as the Invoice with Logo template. 
    • Learn about editing an image in Postsale 

A logo has been added and is displayed.

  1. (Optional)  Click Add Store Address to add a unique Ship From address from this store.
    Learn how to configure your Default Shipment settings so that the Store Address is automatically selected as the Ship From address for your shipments.

    Add Store Address button in the webhook store setup

    Once added, the Store Address is displayed.

    Store address displayed after being added to the webhook store
     

  2. Click Finish to save your webhook as a store connection in Postsale. 

    Finish button to save the webhook store connection

The store is added to Postsale and is displayed in the list of stores in the Store Settings menu.

Webhook store displayed in the Store Settings menu list

Information to Know

  • The order source and order number are used together to identify unique orders in Postsale. 
    • When creating a webhook to update existing orders, be sure that the order source and order number fields are mapped correctly. 
  • The webhook map can be edited at any time. This is useful when the data sent to Postsale in the webhook request has changed and needs to be mapped to fields in Postsale.

Webhooks are available on the Soar plan. See the integrations page for all import methods, or visit pricing for plan details.