A custom app can have triggers created that send data to a defined endpoint when a schedule moves into a particular status.
These triggers live in the Schedule Exports tab inside the custom app.
This tab will list any triggers that have been defined for this custom app already.
Edit existing triggers by tapping on them or create a new trigger by using the Add Trigger button.
The schedule export trigger tab of the custom app
Creating a Schedule Export Trigger
Export trigger
An export trigger requires the following information:
- Schedule Status
- The status that you wish the trigger to execute in
- Partner (optional)
- Target the export for consignments for the selected Client Partner only by selecting an item from this list
- Always trigger webhook when consignment enters this status
- If you wish the trigger to execute whenever the consignment moves into this status, select this checkbox
- If the checkbox is deselected, then an export will only fire if the consignment hasn't yet been exported by this or another trigger
- Enable consignment updates to trigger webhook while in this status
- If you wish the trigger to execute when a consignment's data is changed, select this checkbox
- If selected, updates to the consignment while in this status will be delivered to the webhook endpoint defined
Webhook Endpoint
The final piece of the trigger requires an endpoint to be provided with which to POST the data to.
Enter the URL, and optionally enter a signing key in the Signing Key 1 or Signing Key 2 field.
Signing Key 1 will be referenced as x-consignly-signature-1 and Signing Key 2 will be referenced as x-consignly-signature-2.
Payload Definition
The Schedule Export triggers will push a payload to the defined endpoint.
- OrganisationId: The identifier for your organisation (uuid)
- PartnerId: The identifier of the Client Partner for this consignment (uuid)
- PartnerScheduleId: The identifier of the Client Partner's schedule that triggered the export (uuid)
- Status: The current status of the schedule (integer)
The shape of the payload is a JSON object, based on the below:
{ "organisationId": "00000000-0000-0000-0000-000000000001", "partnerId": "00000000-0000-0000-0000-000000000002", "partnerScheduleId": "00000000-0000-0000-0000-000000000003", "status": 2 }
Removing a Trigger
To remove an existing trigger, tap into the trigger and using the action menu, choose Remove Trigger.
The remove trigger action menu