To integrate LateShipment with your WooCommerce store and set up webhooks for shipment updates, follow the detailed steps below:
Step 1: Log in to Your LateShipment Account:
- Visit the LateShipment website and log in with your account credentials.
Step 2: Access the Settings Menu:
- Once logged in, on the homepage of your LateShipment account, look to the left side of the screen.
- Click on Settings to open the settings menu.
Step 3: Connect Your Store:
- In the Settings menu, click on Connect Store.
- In the drop-down menu, select WooCommerce to link your WooCommerce store with LateShipment.
Step 4: Set Up a Webhook in WooCommerce:
- Now that your store is connected to LateShipment, you need to configure a webhook to trigger shipment updates.
- Log in to your WooCommerce dashboard.
- From the left-hand menu, navigate to Settings > Advanced > Webhooks.
- If this is your first time creating a webhook, click Create a new webhook. If you've created webhooks before, click Add Webhook to create a new one.
Step 5: Configure Webhook Data:
- In the Webhook Data section, you need to configure the following fields:
- Name: Change the default name to something meaningful, such as "LateShipment Webhook".
- Status: Set the status to Active so that the webhook is immediately functional.
- Topic: Choose the events that will trigger the webhook. Select Shipment created/Order created to receive updates when a shipment is created.
- Copy code from your LateShipment account
- Delivery URL: Paste the following URL in the Delivery URL field:
Step 6: Save the Webhook:
- After filling out the necessary fields, click Save Webhook to save your settings.
Step 7: Create Another Webhook:
- Repeat the previous steps to create a new webhook. For this webhook, paste the same URL you copied from LateShipment.com. Set the webhook to trigger on the Order Updated/Shipment Updated event.
Important Notes:
The first time you save your webhook with an Active status, it will automatically send a "ping" to the Delivery URL to ensure the integration is working.
Retries: Webhooks are disabled after 5 failed attempts by default. This happens if the Delivery URL returns an unsuccessful status code, such as 404 or 5xx. However, a successful response code includes 2xx, 301, or 302.
What Happens Next?
After setting up the webhook, you will start receiving real-time shipment updates from LateShipment directly into your WooCommerce store. These updates will include important shipment information, such as status changes, tracking numbers, and more.