SAT product and unit keys on your invoices
This applies only to organizations in Mexico: every item on a CFDI 4.0 carries a Product or service key (c_ClaveProdServ catalog, 8 digits) and a Unit key (c_ClaveUnidad catalog, such as H87, E48 or HUR) from the SAT.
Which key each item is stamped with
Cord picks the keys of each line in this order, field by field:
- The line’s own key. If you chose it in the editor (or sent it through the API), it wins.
- The product’s key. If the line comes from a catalog product that has SAT keys, those are used. Without a unit key, Cord derives it from the unit you wrote on the product (“hour” is
HUR, “service” isE48); if the unit isn’t recognized,H87(“Piece”). - The SAT generic keys. Without any of the above (a product without a key, or a free line typed by hand with no key of its own), the item goes out as
01010101(“Not in the catalog”) with unitH87(“Piece”).
Generic keys are valid for the SAT and don’t block stamping, but they don’t describe your business: your client can’t classify the expense precisely. If your accountant asks for specific keys, assign them to your products or to the line.
Keys are saved on the invoice and in the CFDI: changing the product’s key later doesn’t alter an invoice already issued.
Assign the keys to a product
- In Products, open the product (or create a new one).
- Under E-invoicing (SAT, Mexico), type a word that describes what you sell in SAT product or service key (for example “software” or “consulting”) and pick the key from the list. If you already know the key, type its 8 digits.
- The SAT unit key fills itself from the product’s Unit: “hour” is stamped as
HUR, “month” asMON, “kg” asKGM, “service” asE48. If you need a different one, type it and it stays fixed (for exampleACTfor an activity). - Save the product.
From then on, every quote or invoice that includes the product is stamped with its keys, except on lines that carry their own. You can also import them in your products CSV with the columns clave_sat and clave_unidad_sat; the catalog export includes them.
Set the key on a line
In the invoice and quote editors, each item shows its SAT key right below it. Tap the key to change it: you search the same SAT catalog, pick the unit and apply. It’s mainly for free lines (“Freight”, “March consulting”) that don’t come from a product.
If a line would be stamped with the generic 01010101, the editor flags it on the line itself and, before issuing the invoice, tells you how many items would go out that way.
Through the API
Each item of POST /v1/facturas and POST /v1/cotizaciones accepts clave_sat and clave_unidad_sat. A key with an invalid format is rejected when saving, naming the item, instead of failing at stamping time.
If the search doesn’t respond, type the key’s 8 digits directly. Cord checks that it has the catalog’s shape before saving and before stamping. When you duplicate an invoice, the copy keeps the SAT keys each item was stamped with.