Track station ticket printing
On this page
Use this topic when you need to audit station ticket printing: which dockets printed, when, and from which register. Everything is recorded on the ticket’s Shipment record, so no extra object or log needs to be enabled.
A station ticket is a fulfillment, stored as a Shipment (s_c__Shipment__c) record. Printing writes to five fields on that record, and routing writes one more.
The fields
| Field | API name | Written when |
|---|---|---|
| Fulfillment Station | s_c__Fulfillment_Station_Id__c |
The order is fulfilled and the item is routed. Not a print field, but it is what makes the record a station ticket |
| Auto Printed At | s_c__Auto_Printed_At__c |
The ticket is printed automatically, once and once only |
| First Printed At | s_c__First_Printed_At__c |
The first print of any kind, automatic or manual. Not changed by later prints from the same device |
| First Printed Register | s_c__First_Printed_Register_Id__c |
Alongside First Printed At, recording which register made that print |
| Last Printed At | s_c__Last_Printed_At__c |
Every print of any kind, so this moves each time |
| Last Printed Register | s_c__Last_Printed_Register_Id__c |
Alongside Last Printed At |
The two register fields always travel with their own timestamp, so a print is never attributed to a register that did not make it.
Which fields each kind of print sets
| Auto Printed At | First Printed At and Register | Last Printed At and Register | |
|---|---|---|---|
| First automatic print | Set | Set | Set |
| Manual reprint from the ticket detail | Not touched | Set if not already set | Set |
| Second automatic print | Never happens. See below | — | — |
| Run test print from Settings | Nothing. The sample ticket is not a real fulfillment | — | — |
Auto Printed At is the only field the automatic cycle checks. That is why a manual reprint deliberately leaves it alone: a spare copy taped to a table must not suppress the genuine delivery to the station.
Auto-print happens exactly once
A device auto-prints a given ticket at most once. Once Auto Printed At is set, the automatic cycle skips that ticket forever, so a printer reconnect, a template change, or a printer being assigned to a different station does not reprint the backlog.
That record syncs to the other devices at the outlet, including a device covering the station with auto-print switched on, so normally only one docket is produced across the whole outlet.
Two consequences are worth knowing before you audit the data.
- A brief sync window can still produce two dockets. If two devices that both auto-print the ticket reach it in the same moment, each can print. An occasional second docket is possible.
- Moving a ticket does not clear the field. A ticket moved to another station does not auto-print there, because Auto Printed At is not reset by a move. Staff take a deliberate manual reprint at the new station.
What “printed” actually means
The timestamp means the docket was sent to the printer without an error. A USB connection error, an error from a Star or Epson printer in the Android app, and a print that times out all stop the stamp. It does not prove paper physically emerged. These cases are stamped as printed with no docket produced:
- A browser POS printer that runs out of paper.
- A USB printer that stalls on the data it is sent rather than returning an error.
- A device whose fulfillment template is a
documenttemplate, which prints nothing for real station tickets.
Two related rules follow from how the marks are written.
- Nothing is stamped when the print fails. If no copy could be dispatched, no field is written and the ticket stays eligible, so the automatic cycle retries it on its next run. A print that has not finished after about two minutes counts as failed too, so a very slow printer can produce a docket that the fields say was never printed, and then a second one when the cycle retries.
- One copy is enough. When a station is assigned several printers and only some are reachable, the ticket is marked printed as soon as one copy goes out. The offline printer’s copy is dropped rather than held, so a single offline printer does not force the healthy ones to reprint. Reprint manually if that copy is needed.
Offline behavior
The register stamps the fields locally the moment a ticket prints, then queues the update to Salesforce. Three details matter when you are reading the data.
- The time is the device’s clock at the moment of printing, not the time the update reached Salesforce. A device that prints offline and syncs an hour later still reports the original print time.
- On the device, print marks advance and never regress. Once a device has recorded a print, no incoming sync can clear it there. Auto Printed At and First Printed At never move once set, and Last Printed At only ever moves forward.
- In Salesforce, the last write wins. The server accepts each device’s update as it arrives, with no such guard. Two devices that print within the same sync window can both write First Printed At and Auto Printed At, and the later write is kept. A device that syncs late after being offline can move Last Printed At backwards. Allow for both when you report on these fields.
The report to keep running
A station ticket that never printed is invisible on the POS. Nothing flashes, and the ticket looks the same as one that printed. One report catches every ticket that was never stamped, which covers an offline printer, a timeout, and a station no device prints for. It cannot catch the stamped-but-not-printed cases above:
Shipment where Fulfillment Station is not blank and First Printed At is blank.
Give it to whoever runs service and have them check it during and after each shift. It catches a printer switched off, a printer assignment pointing at hardware that has gone, a template deselected, a device that never came back, and a ticket held during an outage that was completed before it printed. Treat it as part of the shift routine rather than a diagnostic, because by the time someone asks why a station is quiet the order is already late.
Reporting on station tickets
Because everything sits on the Shipment record, ordinary Salesforce reports cover it. Useful filters:
| Question | Filter |
|---|---|
| Which tickets never printed? | Fulfillment Station is not blank and First Printed At is blank |
| Which tickets were reprinted? | Last Printed At is not equal to First Printed At |
| Which tickets printed but not through auto-print? | First Printed At is not blank and Auto Printed At is blank |
| How long did a station take to start a ticket? | First Printed At compared with the record’s Created Date |
| Which items were routed nowhere? | Fulfillment Station is blank on a fulfillment from a POS order |
To find tickets printed by a register other than their station’s own, add a checkbox formula field to Shipment, such as s_c__Last_Printed_Register_Id__c <> s_c__Fulfillment_Station_Id__r.s_c__Register_Id__c, then filter on it being true. A standard report filter cannot do this, because it compares fields on two different objects, and field-to-field filters only support number, currency, and date fields.
For prep progress rather than printing, use Status (s_c__State__c) and State Changed At (s_c__State_Changed_At__c) on the same record. Those track the ticket through requested, preparing, ready_for_pickup, and complete.
A ticket that printed correctly has Fulfillment Station, Auto Printed At, First Printed At, and Last Printed At all populated, with both register lookups pointing at the register that runs that station.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.