FD1 Client Protocol

custdisp.sale.* Schema

These messages are sent from a live checkout to a customer display which has opened a firehose to receive Customer Display messages.

The "sc" field contains a range of possible values, and shows what changed and why you received this packet. Regardless of the reason in "sc", the contents are all the same

  • cust.sale.lines. [ add | edit | delete | status ] A saleline has been added, edited, deleted. Or this is a periodic status message
  • cust.sale.payments. [ add | edit | delete | status ] A payment has been added, edited, deleted. Or this is a periodic status message
  • cust.sale. [ add | edit | delete | status ] Something about the sale generally has been added, edited, deleted. Or this is a periodic status message
  • cust.sale.NNN. [ add | edit | delete | status ] A unique field has has been added, edited, deleted, status. But the name is unavailable. You should not see these messages.
FieldDescription
Frequently Used
salephyskey Unique key identifying this sale. This key is like a UUID and is not really intended for customers to see. It does uniquely identify this exact sale over all checkouts.
source{}A subobject identifying where this message originated. These are mostly technical identifiers.
datetimelocalTime on the local PC. This value "stops" when the sale is completed and becomes the sale completion time.
saletotalCurrent total of the sale.
lines[] Array of items being purchased
payments[]Array of payments recorded against this sale.
Less Commonly Used
cash_item_nameIf the item being sold is a generic "cash item" or "misc" for stock purposes, this field may contain a more descriptive, user entered, product name.

The lines array contains objects with this structure

FieldDescription
seqnce Integer giving the line position. This value is allocated when the item is first added, and remains constant even if previous items are removed from the sale
pid
qtyQuantity of an item being sold. This is an integer. A sale of 3.452 kg is sent as 3452 gm
totalprice
product{}
product.description
product.qty_uomThe unit of measure id for this product when referring to Quantity. Products measure as "each" or "item" are id=1, and id=1 is not sent as it is the default. This field will only be present where the product is not an each based measurement
product.qty_uom_abbrevThe standard abbreviation for qty_uom. Values such as kg, gm, L, ml, cm, ft, yd, min are typically seen. Being the abbreviations for 20=kilogram, 21=gram, 40=litre, 41=millilitre, 31=centimetre, 111=foot, 112=yard, 202=minute

Example

{
    "sc": "custdisp.sale.lines.add",
    "v": {
        "salephyskey": "KAKSKSKSKSKSKSKSKSKSKSBDE",
        "source": {
            "faid": 3283,
            "plevel": 2502,
            ...
        },
        "datetimelocal": "2025-01-03 14:23:30",
        "saletotal": 97.5,
        "lines": [
            {
                "seqnce": 1,
                "pid": 82931,
                "qty": 1,
                "totalprice": 95.5,
                "product": {
                    "description": "Gold leaf locket",
                    "sku": "AAAGL23"
                }
            }
        ]
    }
}