Transmission
A Transmission is the database entity that represents a complete punchout shopping session. It is created at login, populated with the cart payload on transfer, and can automatically create a Shopware order in Auto mode.
Entity fields
The ConnectorTransmissionEntity has the following fields:
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Primary key |
transmissionNumber | string | Unique transmission number |
systemType | ConnectorSystemType | OCI or CXML |
systemId | string (UUID) | ID of the OCI or cXML system |
status | ConnectorTransmissionStatus | Current status (see below) |
hookUrl | string|null | Hook URL from the login request |
additionalFields | array|null | Additional fields from the login request |
cartPayload | string|null | JSON-serialised cart at transfer time |
cartRuleIds | array | Active cart rule IDs at transfer time |
orderId | string|null (UUID) | ID of the created Shopware order |
order | OrderEntity|null | Loaded Shopware order (association) |
transmittedAt | DateTimeInterface|null | Timestamp of the transfer |
transmissionCustomers | Collection|null | Associated customers |
Status lifecycle
Open
│
├── (buyer continues shopping)
│
├── logout?transferred=1 ──► Transferred ──► [Auto mode] ──► OrderCreated
│
├── logout?transferred=0 ──► Closed
│
└── (manual) ──► Cancelled
| Status | Enum value | Description |
|---|---|---|
Open | open | Transmission created, shopping is active |
Transferred | transferred | Cart was submitted to the procurement system |
Closed | closed | Logout without transfer (buyer cancelled) |
Cancelled | cancelled | Manually cancelled |
OrderCreated | order_created | Shopware order was automatically created (Auto mode) |
TransmissionSubscriber
The TransmissionSubscriber manages transmissions automatically based on Connector events:
| Event | Method | Action |
|---|---|---|
ConnectorSessionLoginEvent / OciSessionLoginEvent / CxmlSessionLoginEvent | onLogin() | Create new transmission or reopen existing one (if transmissionId is already in the session) |
ConnectorTransferEvent | onTransfer() | Save cart payload to cartPayload |
ConnectorSessionLogoutEvent (transferred=true) | onLogout() | Status → Transferred; in Auto mode: create order |
ConnectorSessionLogoutEvent (transferred=false) | onLogout() | Status → Closed |
Auto mode
When an OCI/cXML system is configured with TransmissionMode::Auto and a transfer occurs:
TransmissionSubscriber.onLogout()detectsisTransferred() === trueTransmissionOrderService::createOrderFromCart()is called- The cart is reconstructed from
cartPayload— for each line item,ConnectorCartLineItemResolveEventis fired - A Shopware order is created from the reconstructed cart
- Transmission status →
OrderCreated,orderIdis set
note
For custom (plugin) line item types, a listener on ConnectorCartLineItemResolveEvent can handle reconstruction. See Transmission Events.