Skip to main content
All results

Invoicing a national builders' merchant on its terms

A glazing supplies merchant now invoices one of the UK's largest builders' merchants automatically, in the strict format the merchant insists on.

Client
TRADACOMS EDI Invoicing

The result

Miranda's invoices to Huws Gray are now produced automatically from its sales data, in the exact format Huws Gray requires. Invoices are no longer rebuilt by hand to meet the customer's rules.

The same approach works for any large UK retailer or merchant that will only accept invoices in its own electronic format.

The problem

Miranda, a glazing supplies merchant with a trade counter in Kent, supplies glazing products to Huws Gray, one of the UK's largest builders' merchants, including its Buildbase division. Huws Gray accepts invoices only in a strict electronic format that the UK retail supply chain has used since the 1980s.

The format has no tolerance for mistakes. A wrongly laid-out file is rejected, and a rejected invoice is an invoice that does not get paid.

What we did

We put in place the system that turns Miranda's invoice data into files Huws Gray's systems accept, and sends them through the trading network Huws Gray uses.

For the technical reader:

  • A Go library generates TRADACOMS 0700 INVOICES flat files from structured invoice data, transmitted via the Lobster/TrueCommerce value-added network: Sales data → Go structs → TRADACOMS flat file → Lobster/TrueCommerce → Huws Gray.
  • Segments are written in strict order (22 in all): the STX transmission header with sender and receiver GLNs; supplier and customer identification with names, addresses and VAT numbers; invoice lines with EAN-13 barcodes, quantities, unit costs, VAT bands and MSRPs; settlement terms; per-band VAT summaries at invoice and file level; file totals before and after VAT and settlement discount; and END.
  • Implied decimals. Monetary values are integers with the decimal position set by COBOL-style formats such as 9(10)V9(4). We use exact decimal arithmetic to avoid floating-point errors on invoice amounts.
  • Escaping. The four reserved characters (=, :, +, ') are escaped with a ? prefix, using reflection to walk every string field in the request.
  • Identification. Supplier, customer and delivery locations use GS1 Global Location Numbers; products use EAN-13 barcodes.

TRADACOMS is used across UK retail and builders' merchants, including Tesco, Sainsbury's, B&Q, Travis Perkins and Jewson. We also work with EDIFACT and other standards.

If a customer insists you invoice them electronically in their format, we can set it up.