Couriers

Section: Operations
URL: /admin/couriers
Page title: Couriers Settings

Overview

The Couriers module integrates CRMConnect with two Romanian courier providers — Cargus and FanCourier — enabling staff to generate AWB (Air Waybill) shipping labels directly from orders or deliveries, track shipment statuses, and keep a full audit log of every API call made to the courier services.

The module is optional and must be activated in the Modules panel before it becomes accessible. Once enabled, it loads two API libraries (Cargus_api and Fancourier_api) and a dedicated logger (Couriers_logger), so all courier activity is recorded independently from the main application log.

Business value

Generating AWBs manually in a courier portal and then copying tracking numbers back into the CRM is error-prone and time-consuming. This module automates the entire handoff: an AWB is created in-app, the courier's response (including the tracking number) is stored against the shipment, and labels can be printed without leaving CRMConnect.

Typical use cases:

Accessing this module

/admin/couriers — redirects automatically to /admin/couriers/settings.

The module must be active in Settings → Modules. Access to the settings page requires either administrator rights or the couriers_settings view permission.

Key concepts

Concept Description
AWB (Air Waybill) The shipping document and tracking number issued by the courier for a parcel.
Pickup point A physical location registered with the courier from which parcels are collected. Configured per provider.
Workpoint (FanCourier) FanCourier's term for a registered sender location retrieved live from the API.
Subscription key (Cargus) API authentication credential required alongside username/password for Cargus calls.
Client ID (FanCourier) Additional FanCourier API identifier used together with username and password.
Favorite provider The globally preferred courier used by default when creating a new AWB.
Favorite warehouse The default warehouse/pickup location pre-selected when creating AWBs.
Courier logger Internal audit trail that records every API request and response for both providers.
Sync Process that refreshes pickup points and workpoints from the courier's API into the local database.

Common actions

  1. Configure Cargus credentials — Go to /admin/couriers/settings?tab=cargus, enter the base URL, subscription key, username, and password, then save. The module validates and stores these values.
  2. Configure FanCourier credentials — Go to /admin/couriers/settings?tab=fancourier, enter the base URL, reports URL, username, password, and client ID. On save the module immediately attempts to fetch your registered workpoints to confirm connectivity.
  3. Set the default (favorite) provider and warehouse — On the General tab of Settings, choose the preferred courier and the warehouse whose pickup point will be pre-selected on AWB creation.
  4. Generate an AWB — Open a delivery or order, click the courier action, select the provider and pickup point, confirm the parcel details, and submit. The AWB number is stored and a printable label is available immediately.
  5. Print a shipping label — From the AWB list or the AWB detail view, use the label action to open the print-ready label view.
  6. Track a shipment — Open an existing AWB record; the module calls the courier API in real time to return the current delivery status.
  7. Sync pickup points — Trigger a sync from the Settings page to pull the latest pickup point list from the courier's API into the local database.
  8. Review API logs — Navigate to the Logs view to inspect every API call: timestamp, endpoint, request payload, HTTP status, and response body. Useful for diagnosing failed AWB generations or tracking errors.

Source: crm-connect-main/app/modules/couriers