Webhook subscriptions
Última actualización
Última actualización
This method involves subscribing one of your endpoints to our webhook. This way, every time there's a change of state within the platform, we'll call that endpoint to inform you of the change. Within this endpoint, you need to interpret the payload sent by us and update the state within your system.
For this step, you should have your table ready with the equivalent states of Shippify in your platform. If you don't have it yet, access this link to create it. For each state that you need to update in your platform, you'll have to create a separate webhook following the given steps:
In your Shippify account, go to the left menu, select the Automations section, look for Send Webhook
in the left sidebar menu, or enter directly through this link and press the button CREATE AUTOMATION +
.
Choose the rules for executing your automation. You need to select the scope in which the automation will work, the event that will trigger the automation, and any additional conditions if needed.
For our case, the entity we will choose is a delivery
, and the event is the state you want the update to be sent. In case your table defines a delivery issue reason or an additional label, you should add this data as conditions.
In this step, you need to add the information of the endpoint where the notifications will be sent and configure if you want to send extra data.
Define the parameters you need for your Webhook Automation.
After configuring it, click on "create", optionally, you can give it a name. From that moment on, each time the events and conditions are met, we will call your endpoint to notify the event.
The payload sent to the webhook is extensive and contains a lot of information. Here's the meaning of each property:
Once the automation is created, you can proceed to test it. If you do not yet have an endpoint ready to receive updates, you can use a test endpoint to test the webhook configuration and see the payload. For this example, we will configure the webhook automation to send the update when the delivery changes to "Completed" status.
Create a delivery in Dash (if you have already created one you can skip this step).
Change the status as appropriate for the automation, in this case, we will change the status to Completed because that is how we configured our test automation.
Observe the payload sent to the webhook, in this case we used a test webhook so we can see the payload sent, in case you already have an endpoint configured to receive notifications you can place a log to identify that the call was made.
Within the automation, you can see the failed and successful executions of the automation along with the identifier of the associated delivery. In this case, we have a successful execution for delivery t-pruaas-5104.
Once the webhook is successfully configured, error subscriptions can be activated. Here you can register one or more emails in which alerts will be sent whenever a notification fails to be sent or the endpoint responds with an error.
If you need to use the webhook but require receiving a different payload than the previous one, you must request it by email, attaching the payload you want to receive for each state, and send it to integrations@shippify.co with the following table corresponding to Shippify's statuses.
Parameter | Description | Mandatory |
---|---|---|
Propiedad | Detalle |
---|---|