Fake Company in a Box

Docs

Everything you need to load a fake company into your test accounts and grade an integration against it.

Quick start

  1. Connect test accounts under Accounts (instructions below).
  2. Create a world: business type, size, seed, mess and scenarios.
  3. Your connected accounts are attached to the new world automatically (one per tool). Press Load. Loads are resumable; leaving the page is fine.
  4. Run your integration, then press Check.

Connecting Stripe

  1. In the Stripe Dashboard, create a sandbox just for test data (account menu → Sandboxes), so fake customers don't mix with anything else. Test mode works too.
  2. In that sandbox, open Developers → API keys and copy the secret key (sk_test_…).
  3. Paste it on the Accounts page. Live and publishable keys are refused before any request is made.

Prefer a restricted key (rk_test_…)? Give it write access to Customers, Products, Payment Methods, Subscriptions, Invoices, Credit Notes and Refunds, and read access to Charges.

Stripe can't backdate creation times, so simulated dates travel as the invoice effective_at date and as metadata.fakeco_sim_date. Only the last few months of history (the world's Stripe history setting) go to Stripe; the full history goes to QuickBooks. Subscriptions are created with their next renewal as the billing anchor, so Stripe bills future renewals itself.

Connecting QuickBooks Online

  1. At developer.intuit.com, open Sandboxes and create a sandbox company (up to 10, each lasting two years).
  2. On the Accounts page, press Connect QuickBooks, sign in, and choose the sandbox company.

Every request goes to Intuit's sandbox API host, which production companies can't be reached through. If multicurrency is off in the sandbox (the default), foreign-currency customers are converted to the home currency and the conversion is reported as a warning.

Connecting HubSpot

  1. In your HubSpot developer account, create a developer test account (or use a sandbox).
  2. In the test account: Settings → Integrations → Private Apps (some accounts list these as Legacy Apps) → create an app with scopes for companies, contacts, deals, tickets and products (read and write), and the CRM schema write scopes.
  3. Paste the access token on the Accounts page.

The account type is checked before every load: standard portals are refused. Records carry a unique fakeco_id property, so a retried load can never duplicate them. Developer test accounts expire after 90 days without API calls; live mode's daily activity keeps them alive.

Connecting Square

  1. In the Square Developer Console, open your application → Credentials and switch to Sandbox.
  2. Copy the sandbox access token and paste it on the Accounts page.

Requests only go to Square's sandbox host, where production tokens don't work. Card payments use Square's published test card nonces, including the declined ones; cheque and bank payments are recorded as external payments. Square can't backdate records, so it gets the recent history window, like Stripe.

Connecting Shopify

  1. Create a development store from your Shopify Partner or Dev Dashboard account.
  2. In the Dev Dashboard, create an app with read and write access to products, customers and orders, release a version, and install it on the development store.
  3. Paste the store domain plus the app's client ID and secret. Access tokens renew automatically. A token from an older custom app works too.

The store's plan is checked before every load: only development stores are accepted. Development stores allow five new orders a minute, so loads pace themselves. Orders keep their original dates through processedAt.

Connecting Chargebee

  1. Use your Chargebee test site (its name ends in -test).
  2. Settings → Configure Chargebee → API keys → create a full-access key, then paste the site name and key.

Live sites are refused. Historical invoices are imported with their original dates and payments, so the full history goes to Chargebee.

Connecting Xero

  1. In Xero, open the demo company (or a trial organisation with test, sandbox, demo or dev in its name).
  2. On the Accounts page, press Connect Xero and choose that organisation.

Any other organisation is refused before a single write. Xero allows 60 API calls a minute per organisation, so big worlds take a while. Refunds become credit notes with a refund payment.

Connecting Salesforce

  1. Use a free Developer Edition org (developer.salesforce.com/signup) or a sandbox. Production orgs are refused before a single write.
  2. On the Accounts page, press Connect a Developer Edition org or Connect a sandbox, then sign in as an admin.

The first load adds a Fakeco_Id__c external-id field to accounts, contacts, opportunities, cases and products, plus a Fakeco_Archived__c checkbox on accounts, and a permission set that lets you see them. Every write is an upsert on that id, so a retried load never makes duplicates. Customers become accounts, deals become opportunities with contact roles, and tickets become cases. Salesforce's standard duplicate rules are told to allow the planted duplicates. A Developer Edition org allows 15,000 API calls a day; a small world takes about a dozen.

Load vs. target

Load: we fill the tool with the world. Target: your integration fills it (for example from Stripe into QuickBooks), and Check grades the result against the world and its answer key. A typical setup: Stripe and HubSpot on load, QuickBooks as the target.

Check scores each target out of 100. It covers how many customers, invoices, payments and refunds arrived, plus one item for every planted problem. Warnings count half: they mark cases a straight copy can't pass, such as a duplicate your integration should have flagged.

Business types

TypeWhat it looks like
SaaS company saasMonthly and annual subscriptions, card payments, expansion deals.
Wholesale distributor wholesaleOne-off orders on net-30 terms, ACH and cheque payments, late payers.
Services agency agencyMonthly retainers plus project milestone invoices, net-15 terms.
Online store ecommerceIndividual shoppers, card orders, frequent refunds.
Nonprofit nonprofitMonthly donors and annual members, one-time gifts and gala tickets, expired cards.
Gym or fitness studio fitnessMonthly memberships, personal training add-ons, freezes and failed card renewals.
Online courses coursesCourse purchases and bundles from individual learners, 30-day refunds, repeat buyers.
Property management propertyMonthly rent from tenants by ACH, card and cheque, late payers, fees and maintenance charges.
Manufacturer manufacturingLarge B2B orders on net-45, ACH and cheque payments, long sales cycles, slow payers.
Restaurant supplier foodserviceSeveral deliveries a week to restaurants, net-14 terms, credits for spoiled goods.
IT services provider mspPer-device and per-user managed IT plans, hardware and project invoices, many support tickets.
Subscription publisher mediaDigital and print subscribers, annual plans, gift subscriptions, high churn.

Custom tables

Add the tables your app has that the built-in ones don't. Each custom table hangs off a parent: one row (or a range of rows) per customer, invoice, subscription, ticket, product or employee, or per row of another custom table. Without a parent you get a fixed number of rows. Edit them on a world's page under Custom tables, or under tables in the CLI's fakeco.json.

{
  "name": "shipments",
  "parent": "invoices",
  "where": { "status": ["paid", "open"] },
  "perParent": [1, 1],
  "columns": [
    { "name": "carrier", "type": "pick", "values": ["UPS", "FedEx", "USPS"], "weights": [5, 3, 2] },
    { "name": "tracking_number", "type": "pattern", "pattern": "1Z##########", "unique": true },
    { "name": "shipped_on", "type": "date", "from": "issued_on", "offsetDays": [0, 3] },
    { "name": "delivered_on", "type": "date", "from": "this.shipped_on", "offsetDays": [1, 7] },
    { "name": "status", "type": "map", "field": "this.delivered_on", "map": { "null": "in_transit" }, "default": "delivered" },
    { "name": "ship_to_city", "type": "copy", "field": "customer.city" }
  ]
}

Each row gets an id and a key to its parent (invoice_id here). Fields are looked up in this row first, then the parent row; prefix this., parent. or customer. to be explicit. n is the row's position under its parent. Dates after the world's as-of date are left empty unless you say otherwise, so nothing happens in the future.

TypeOptions
int Whole numbermin, max, dist (uniform, normal, skewed); or of (a numeric field) with factor [low, high]
decimal Decimal numbermin, max, decimals, dist; or of with factor
money Money amountmin, max, dist; or of with factor. Two decimals
bool True / falsep: chance of true
pick One of a listvalues, optional weights
pattern Pattern (# digit, A letter)pattern (# digit, A letter, ? letter or digit, \ escapes), unique
sequence Counterprefix, start, pad
uuid UUIDnone
date Datefrom (a date field) with offsetDays [low, high], or until (a field or as_of); between [date, date]; future (null, clamp, allow); ordered
datetime Date and timeas date, plus a business-hours time in the company's timezone
copy Copy a fieldfield, transform (lower, upper, slug)
text Text templatetemplate with {field} placeholders and |filters, transform
fake Realistic valuekind (see below), unique
ref Link to another tabletable: a random row of another table
map Depends on a fieldfield, map (value → result, a list picks one; "null" for empty), default

Every column also takes nullRate (0 to 1). Realistic values (fake): first_name, last_name, full_name, email, username, phone, company, job_title, street, city, region, postal_code, country, address, word, words, sentence, paragraph, comment, url, domain, ipv4, ipv6, user_agent, color, hex_token, semver, file_name, mime_type, currency_code, country_code, locale, timezone, product_name, product_sku, employee_name, employee_email. Template filters: |lower, |upper, |slug, |domain, |first, |initial.

Add series to make one batch of rows per day, week or month between two dates of the parent (it adds a period_on column): { "every": "month", "from": "start_on", "to": "canceled_on" } gives monthly usage from a subscription's start to its cancellation. To add columns to a built-in table instead, list them under extend: { "customers": [{ "name": "industry", "type": "pick", "values": ["retail", "health"] }] }.

Ready-made tables: App users, Product analytics events, Metered usage, Shipments, Ticket conversations, NPS survey responses, Inventory by warehouse, Employee expenses, Timesheets, Marketing leads, Audit log, Class bookings, Maintenance requests, Course enrollments, Managed devices, Email engagement. Same seed, same rows: every value comes from its own seeded stream, so adding a column never changes the others. Custom tables go into exports; they aren't loaded into the connected tools.

Exports: SQL, CSV and JSON

Every world downloads as a Postgres, MySQL or SQLite script that creates every table (built-in and custom) with primary keys and foreign keys, then fills it. The script runs in one transaction, so it either loads completely or not at all. It never drops tables unless you ask the CLI to with --drop.

psql "$DATABASE_URL" -f fakeco-postgres.sql
mysql your_test_db < fakeco-mysql.sql
sqlite3 test.db < fakeco-sqlite.sql

Also available: one CSV per table (or all of them in a zip), every table as JSON, and the whole world as JSON. Exports are free on every plan.

Mess types

TypeExampleExpected handling
duplicate_customer"Acme Ltd" and "ACME Limited" with the same emailMerge them, or flag them for review
case_whitespace" Jane.Doe@Example.COM" and "Acme Ltd "Normalize before matching
missing_fieldsA customer with no email; an invoice with no due dateHandle without crashing
cross_tool_mismatchDifferent billing address in HubSpot and QuickBooksFlag the conflict
orphanA Stripe payment with no matching HubSpot companyCreate the missing record, or flag it
partial_refund$40 refunded on a $100 invoiceBook the partial amount, not the full invoice
failed_then_retriedFails on day 1, succeeds on day 4One payment, not two
mixed_currencyA EUR customer in a USD companyKeep the original currency, or convert it explicitly
timezone_edgeIssued at 7:30 pm on the last day of the month, local timeLand in the month it was issued in the company's timezone
unicode_long_name"Ærø Fiskeri & Søn ApS", or a name 90 characters longStore and display it exactly
deleted_recreatedCustomer archived, then a new one created with the same emailDon't resurrect the old record
stale_custom_fieldA legacy field used for a few months, years agoIgnore it safely

Scenario packs

Reset and standby accounts

Reset removes everything the world created, and only that, then loads it again. Records you added by hand are never touched. Attach a second account per tool as a standby and resets become instant: the clean standby becomes active immediately and the old one is cleaned in the background.

CLI and CI

A fakeco command-line tool for running worlds from CI is on its way to npm. Until then, everything here works from the dashboard.

Known limits