Skip to content

Recipe: batch-anonymize invoices

When you have many documents of the same shape, you don’t anonymize them one at a time — you set up a template and a dictionary once, then run the folder. Invoices are the textbook case: same layout, your company as a constant, suppliers and amounts that vary.

Goal: anonymize a folder of supplier invoices consistently and quickly, keeping your own company name and making repeat suppliers stable.

Pick a representative invoice. Run it synthetic, then open it in the editor and get it exactly right:

  • Keep your companyturn off the entry for your own organization (you’re the buyer on every invoice).
  • Synthesize the supplier ORG, contact NAME/EMAIL/ADDRESS.
  • Decide amounts via the profile’s numeric setting — preserve if totals matter downstream, randomize if not.

Save as template: Factura proveedor. It records keep “your company”, synthesize supplier fields, … as reusable rules.

3. Set up a dictionary for repeat suppliers

Section titled “3. Set up a dictionary for repeat suppliers”

So Acme Ibérica SL is the same fake supplier every month, attach a dictionary to the profile with both reuse switches on (see team consistency). The first run records each supplier’s fake; later runs reuse it.

Back in the main window, drop the whole folder in. Every supported file queues. Process with your invoice profile.

  • Apply the template as you review each (or set the profile up to match it).
  • The dictionary keeps repeat suppliers consistent automatically.

If these are becoming test fixtures, use batch output copies: set Copies to, say, 3, and each invoice yields three variants with different fake casts — factura__001-1.pdf, -2, -3. Leave dictionary reuse off when you want the variants to differ.

A template handles categories; a few things stay per-file:

A quick Instant-redact sweep per invoice catches stragglers.

Save each to output. Filenames follow your naming scheme (factura__003), and the names themselves are anonymized. The folder of safe copies keeps your company visible, suppliers consistently faked, and amounts handled to policy.

For recurring, hands-off batches, the same logic runs from the command line — point piixie anonymize at the folder with your profile. Good for CI fixtures or a scheduled export.