Custom order actions involving 3rd party systems - with Order Webhooks


Overview


Benefits of custom actions via order webhooks

Managers may need to perform order related actions involving 3rd party systems either right when a new order is placed or at some point after placement. Here are some examples:

  • A manager wants to import external fees on a rental order from 3rd party systems
  • A manager wants to send order content to an external system
  • A manager wants a specific action to be performed on order placement, which is not part of the standard Sharefox order flow but is achievable via API

There are two types of such custom actions:

  • Automatic: triggered during order placement
  • On-demand: initiated by the order manager at any time from Admin Order page

Important: The setup is dependent on the external systems supporting REST API and specific flows. Configuring custom actions requires enabling the Order Webhooks feature (see more details below).


Automatic custom actions on order placement

When an order is placed in Sharefox, it is possible to trigger an API call to a custom URL from any external system supporting REST API, signalling that a new order was created, to be used in further processing.

What does the manager see?

An activity note will be placed on the Sharefox order, under Order PageInformationActivity. The custom action name and timstamp will be included in the note

How is the action triggered?

This flow is setup by using Order Webhooks: a webhook of type "order-action-on-placement" needs to be configured - see more information in section Order Webhooks: How do they work and how to set up.


Custom actions triggered on-demand by the manager

At anytime during the order lifecycle, the manager can trigger a custom action, if it has been pre-configured, by selecting Admin Order PageActions menu ▸ Trigger action.

Once the action has been triggered, an activity note will be logged on the Order Page ▸ Information ▸ Activity panel, just like in the automatic action case.

How to set up custom on-demand actions?

This flow is setup by using Order Webhooks: a webhook of type "order-action-on-demand" needs to be configured - see more information in section Order Webhooks: How do they work and how to set up.


Order Webhooks: How do they work and how to set up?

Order Webhooks can initiate sending of order information to external systems which support REST API communication. They are very flexible and customisable within the characteristics below:

Triggers:

  • A webhook of type "order-action-on-placement" is triggered when an order is placed in Shop or Admin, on order confirmation event (when the standard confirmation email is sent to the user)
  • A webhook of type "order-action-on-demand" is triggered by the manager in Admin Order page

Content:

  • The following order parameters are sent automatically: orderId, orderReference
  • Any additional order content should be requested via Sharefox API (see documentation here)
  • If the external system does not have such flexibility, a middleware such as Zapier can be used to pull the additional order content and post it to the external system

Technical parameters

  • HTTP method: Can be specified, usually set to POST method
  • Headers. Any number of custom header parameters can be added to the call
  • Body parameters. The following parameters will be sent: orderId (integer), orderReference (string)
  • Additional order content can be requested subsequently via one GET API call by using the public Sharefox API (see API documentation here).

How to set up Order Webhooks?

Order Webhooks is an advanced feature which may already be covered in your Sharefox subscription - feel free to contact us to confirm. For enabling it, please write an email to support@sharefox.no, including the following information:

  • Webhook type: order-action-on-placement / order-action-on-demand
  • Action name: A custom display name, which will be visible on the Admin Order Page
  • Action description (optional): A custom description explaining to the user what the action will do
  • HTTP method: Custom, as required by external system
  • URL: Custom, as required by external system
  • Headers: Custom, as required by external system



Keywords: Autopass, toll fees, bompenger

Still need help? Contact Us Contact Us