Tracking
Gluey offers customers the ability to receive tracking updates via webhooks, sFTP or polling our API endpoints. For most use cases it is recommended utilizing the tracking webhooks from Gluey to ensure scalability in data transfer, and achieving the best data freshness.
How Gluey works with Tracking
Gluey integrates with various carriers to track shipments and provide updates to its customers. This process involves several steps to ensure that tracking information is collected and communicated efficiently. First, Gluey can receive tracking events from carriers through three different methods:
- Webhook: The carrier sends tracking events directly to Gluey Event Service via a webhook.
- sFTP: Gluey Event Service fetches tracking events from the carrier via sFTP, typically every minute.
- API Polling: Gluey Event Service frequently polls the carrier's API (typically every 5-15 minutes) to get tracking events.
Once the tracking events are received, Gluey's Event Service processes these events and harmonizes the tracking event codes. The processed tracking data is then posted to Gluey AI.
Next, Gluey AI notifies the customer about the tracking updates through one of three methods:
- Webhook: Gluey AI generates a payload and sends the tracking events to the customer via a webhook.
- Endpoint: POST - Tracking Event Webhook
- sFTP: Gluey AI generates an EDI file with the tracking events and transfers it to the customer via sFTP using SSH.
- API: The customer polls Gluey AI to get the tracking events by initiating a POST request to Gluey to check for tracking events.
- Endpoint: POST - Batch Track Shipments
This system ensures that customers receive timely and accurate tracking information, whether through automated webhooks, scheduled file transfers, or API queries.
How to build the integration
Below is the integration pattern for getting tracking from Gluey, including the relevant endpoints to use, and a step-by-step explanation.
Explanation of steps
- Receiving Tracking Events - Gluey can receive tracking events from the carrier through three different methods:
- Step 1a: Webhook - The carrier sends tracking events directly to Gluey Event Service via a webhook.
- Step 1b: sFTP - Gluey Event Service fetches tracking events from the carrier via sFTP. Typically every 1 minute.
- Step 1b.1: Dequeue tracking check - Gluey Event Service dequeues a tracking check.
- Step 1b.2: Fetch EDI via sFTP - Gluey Event Service uses SSH to fetch tracking events from the carrier.
- Step 1c: Poll API - Gluey Event Service polls the carrier's API on a frequent basis to get tracking events. Typically every ~5-15 minutes.
- Step 1c.1: Dequeue tracking check - Gluey Event Service dequeues a tracking check.
- Step 1c.2: Poll from Carrier API - Gluey Event Service sends a GET request to the carrier's API to fetch tracking events.
- Process Tracking Event - Gluey Event Service processes the received tracking events and executes harmonization of tracking event codes.
- Post Tracking - Gluey Event Service posts the processed tracking data to Gluey AI.
- Notify Customer - There are three options for notifying the customer about the tracking events:
- Step 4a: Webhook - Gluey AI notifies the customer via a webhook.
- Step 4a.1: Generate payload - Gluey AI generates the payload for the webhook.
- Step 4a.2: POST(Webhook): /webhook/shipment - Gluey AI sends the tracking events to the customer via a webhook.
- Endpoint: POST - Tracking Event Webhook
- Step 4b: sFTP - Gluey AI transfers the tracking events to the customer via sFTP.
- Step 4b.1: Generate EDI file - Gluey AI generates the EDI file with the tracking events.
- Step 4b.2: SSH: tracking_events - Gluey AI uses SSH to transfer the tracking events file to the customer.
- Step 4c: API - The customer polls Gluey AI to get the tracking events.
- Step 4c.1: Customer Poll Gluey - The customer initiates a POST request to Gluey to check for tracking events.
- Endpoint: POST - Batch Track Shipments
- Step 4c.2: Batch retrieval - Gluey AI retrieves the batch of tracking events.
- Step 4c.3: Response: tracking_events - Gluey AI responds to the customer with the tracking events.
- Step 4c.1: Customer Poll Gluey - The customer initiates a POST request to Gluey to check for tracking events.
- Step 4a: Webhook - Gluey AI notifies the customer via a webhook.