Skip to content

Auto-Create & Auto-Send

Overview

The Cargonizer Connector creates and dispatches transport orders automatically when you post a shipment in Business Central. When all three automation switches are on, shipping staff take no manual action. The complete flow from order posting to label printing runs in a single step.


The Three Automation Switches

Automation is controlled by three global switches in Consignment Management Setup:

Setting Effect
Automatically create Transport Orders when Orders are Shipped Creates a transport order when a shipment is posted
Automatically Send Transport Orders when Orders are Shipped Dispatches the transport order to Cargonizer after it is created
Automatically Print Labels Prints the shipping label to the assigned printer after dispatch

The switches build on each other: Auto Send only takes effect when Auto Create is on, and Auto Print only takes effect when Auto Send is on. You can enable just the first one to auto-create transport orders for review, then send them manually.


Configuring the Switches

  1. Open Consignment Management Setup.
  2. Set Automatically create Transport Orders when Orders are Shipped, Automatically Send Transport Orders when Orders are Shipped, and Automatically Print Labels as required.

These are organisation-wide settings. Business Central evaluates them at posting time. A change takes effect immediately for every shipment posted after the change.


Full Automated Flow

When all three flags are enabled, posting a shipment triggers this sequence in Business Central:

User posts sales shipment
        │
        ▼
OnAfterPostSalesDoc event raised
        │
        ▼
Auto Create → TransportOrderMgt.PopulateTransportOrder()
        │
        ▼
Auto Send  → CargonizerMgt.SendConsignmentRequest()
             (Cargonizer returns: Consignment ID, Label URL, Tracking URL)
        │
        ▼
Auto Print → PrintLabelsForTransportOrder()
             (label sent to DirectPrint printer)

The same chain runs for Transfer Orders (via OnAfterTransferOrderPostShipment).


Source Documents Supported

Automatic creation on posting is driven by two posting events: Sales-Post.OnAfterPostSalesDoc and TransferOrder-Post Shipment.OnAfterTransferOrderPostShipment.

Source Auto-Create on Posting Notes
Sales Order Yes Full auto-create, auto-send, auto-print on shipment posting
Transfer Order Yes Same event chain on transfer shipment posting
Service Order Manual Transport orders are created from the service order / posted service shipment on demand (no shipment-posting auto-create event)
Sales Quote Manual / blocked send A transport order can be created from a quote but is blocked from sending until the quote is converted to an order. See Sales Quote Support.

Troubleshooting

Transport order was not created after posting: - Check that Automatically create Transport Orders when Orders are Shipped is enabled in Consignment Management Setup. - Verify the DYP CA Carg User permission set is assigned to the posting user. - Confirm the shipping agent/service on the order is linked to Cargonizer.

Transport order was created but not sent: - Check that Automatically Send Transport Orders when Orders are Shipped is enabled. - Check for errors on the transport order card — a failed send attempt records an error message.

Label was not printed: - Confirm Automatically Print Labels is enabled. - Verify a printer is configured at the user, location, or product level. See Label Printing.