GLS
Integration with GLS for shipment booking in Omnium.
Omnium integrates with GLS for shipment booking, return handling, and parcel shop services. The current implementation focuses on the Danish market.
Configuration Steps
- Navigate to: Configuration > Settings > Orders > Shipping Providers > Add New
Required Settings
| Field | Description | Example |
|---|---|---|
| Name | Internal provider name | GLS |
| Display Name | Name shown to users | GLS |
| Shipping Provider | Select provider type | Gls |
| Base URL | GLS API endpoint | https://ws.gls.dk/ |
| Tracking URL | Tracking URL base | https://track.gls.dk/track?bid= |
Store Configuration
GLS requires store-level authentication via External IDs:
| Provider Name | Description | Required |
|---|---|---|
GlsUsername | GLS API username | Yes |
GlsCode | GLS API password/code | Yes |
GlsContactId | GLS contact ID | Yes |
Important
Shipment Options
Adding shipment options for each market
Configure shipping options under each market:
| Field | Description |
|---|---|
| Shipping Provider | Set to Gls |
| Delivery Type | Delivery (home delivery) or Pickup (parcel shop) |
| Display Name | User-friendly name |
| Shipping Method | Internal name for mapping |
| Shipment Product | GLS product code |
Parcel Shops (Pickup Points)
Lookup
GLS uses a SOAP-based Shop Finder service for parcel shop lookup. The service accepts address, postal code, country code, and the number of results to return.
Response Data
Parcel shops include:
- Shop number (ServicePointId)
- Company name
- Address details
- Opening hours per weekday
- Latitude/longitude
- Distance from search location
Note
Booking Process
API Endpoint
Authentication
- Basic authentication using GlsUsername and GlsCode from store External IDs
- Customer ID from GlsContactId
Request Structure
Booking Response
Successful bookings return:
- ConsignmentId (tracking number)
- PDF label (base64 encoded)
- Parcel numbers for each package
Return Shipments
Configuration
Return shipments reverse the addresses:
- Customer location becomes Pickup address
- Store location becomes Delivery address
ShopReturnservice flag is set to"Y"
Booking
Return bookings use the same API endpoint with modified address mapping.
Label Management
Label Generation
Labels are returned as base64-encoded PDF in the booking response.
Label Storage
Labels are uploaded to Azure Blob Storage:
- Container:
shippinglabels - Filename:
{ConsignmentId}.pdf
Tracking
Tracking URL Format
Example:
Services
Shop Delivery
For parcel shop deliveries, set the ShopDelivery service with the service point ID:
Notification Email
Customer notification emails can be configured:
Error Handling
Error Keys
| Error Key | Description |
|---|---|
GlsBookingError | Standard booking failure |
GlsReturnBookingError | Return booking failure |
Error Response
Failed bookings return error messages in the response body, which are stored on the Order entity.
Supported Features
| Feature | Supported |
|---|---|
| Outbound shipment booking | Yes |
| Return shipment booking | Yes |
| Label generation (PDF) | Yes |
| Parcel shop lookup | Yes |
| Tracking URL | Yes |
| Shop delivery | Yes |
| Direct printing | No |
| Label download | No |
| Shipment status | No |
| Multi-parcel | Partial (weight hardcoded) |
Limitations
- Country Support: Currently optimized for Denmark (DK)
- Weight: Package weight is currently hardcoded to 1 kg
- Country Code: ISO numeric code is hardcoded to "208" (Denmark)
- Single Pickup Point Lookup: Individual pickup point lookup is not implemented
Troubleshooting
Common Issues
-
Missing store credentials: Ensure all three External IDs (GlsUsername, GlsCode, GlsContactId) are configured on the store.
-
Authentication failed: Verify the GLS credentials are correct and the account is active.
-
No parcel shops found: The SOAP service may be limited to Danish addresses.
-
Label not generated: Check the API response for error messages stored in the order errors.
