Skip to main content

ChronoPost Integration

ChronoPost handles express parcel delivery across France and Europe. The integration generates shipping labels via the ChronoPost SOAP API and synchronizes tracking data back into Logidav.

Components

ComponentFileRole
ChronoPostApisrc/CoreBundle/Api/ChronoPostApi.phpSOAP API client
ChronopostServicesrc/CoreBundle/Services/ChronopostService.phpShipment business logic

Configuration

Required parameters in parameters.yml:

chronopost:
account_number: "..."
password: "..."
wsdl_url: "https://ws.chronopost.fr/shipping-cxf/ShippingServiceWS?wsdl"

:::info SOAP-based integration Unlike DPD which uses REST, ChronoPost uses a SOAP API. The ChronoPostApi client wraps the WSDL service and provides a simplified interface for label generation and tracking. :::

Data Flow

Label Generation

  1. ChronopostService collects order and address data from the selected SaleProduct records
  2. ChronoPostApi builds the SOAP request with sender, recipient, and parcel details
  3. The API returns a PDF label and a tracking number
  4. The label is saved to disk and the tracking number is stored on the SaleProduct

Error Handling

ScenarioBehavior
API timeoutRetry with exponential backoff
Invalid addressShipment skipped; system alert raised
Authentication failureCheck credentials in parameters.yml
WSDL unavailableLog error; retry on next attempt

:::warning Address validation ChronoPost is strict about address formatting. Ensure recipient addresses include a valid postal code and country code before submitting. Invalid addresses will cause the SOAP call to fail. :::

Troubleshooting

SOAP connection errors

  1. Verify the WSDL URL is reachable: curl -s <wsdl_url> | head
  2. Check that PHP SOAP extension is enabled: php -m | grep soap
  3. Clear Symfony cache: php bin/console cache:clear

Missing labels

  1. Check that the PDF storage directory is writable
  2. Verify the ChronopostService logs for API response errors
  3. Confirm the SaleProduct has valid shipping address data