Skip to content

GLS Integration ​

GLS provides parcel shipping services. The integration generates shipping labels and retrieves tracking information through the GLS API.

Components ​

ComponentFileRole
GlsApisrc/CoreBundle/Api/GlsApi.phpAPI client for GLS
GlsServicesrc/CoreBundle/Services/GlsService.phpShipment business logic

Configuration ​

The source snapshot defines a gls parameter group. The names below describe the configuration shape; active values and credentials are environment-owned.

yaml
gls:
  user: "..."
  password: "..."
  urlShipment: "https://..."
  ContactID: "..."
  ContactStQuentin: "..."
  urlParcelDetails: "https://..."
  label_width_mm: 102
  label_height_mm: 125
  label_margin_mm: 0

This shape is from app/config/parameters.yml.dist at the reviewed source revision. It does not prove that the values are present or active.

Data Flow ​

View diagram source
sequenceDiagram
    participant SVC as GlsService
    participant API as GlsApi
    participant GLS as GLS API
    participant SP as SaleProduct

    SVC->>API: createShipment(orderData)
    API->>GLS: POST shipment request
    GLS-->>API: Label PDF + tracking number
    API-->>SVC: Parsed response
    SVC->>SVC: Save label PDF
    SVC->>SP: Update carrier, tracking, shipment info

Diagram

Label Generation ​

  1. GlsService prepares shipment data from SaleProduct records
  2. GlsApi sends the request to the GLS API
  3. The response includes a PDF label and tracking number
  4. The label is stored locally and the tracking number is saved on the SaleProduct

Error Handling ​

ScenarioBehavior
API timeout or exceptionThe ticket command records a ticket error and synchronizes an error tracking row. A retry policy is not established by the reviewed command.
Invalid addressProvider response handling is delegated to GlsService; a general “logged and skipped” rule is not established by the reviewed command.
Authentication failureCheck the environment-owned gls configuration and the provider response. Credentials are not documented here.
Service unavailableThe command records the provider error; backoff or automatic retry is not established by the reviewed source.

Tracking synchronization

The ticket command can reuse an existing local ticket and tracking links. The separate tracking synchronizer stores normalized status and status history; the reviewed source does not establish a polling schedule or successful provider readback. See carrier shipment operations.

Internal developer documentation for Menzzo systems.