{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "twentyhq-twenty--define-custom-crm-object-as-code",
 "repo": "twentyhq/twenty",
 "repo_url": "https://github.com/twentyhq/twenty",
 "repo_slug": "twentyhq-twenty",
 "title": "Define a custom CRM object as code and publish it",
 "page_title": "How to define a custom CRM object as code and publish it with Twenty",
 "summary": "Scaffold a Twenty app, define a deal object in TypeScript, and publish it to your workspace.",
 "who": "A technical sales ops lead or developer whose CRM needs a custom record type that the standard setup does not cover.",
 "problem": "Standard CRM records do not match the business, and changes made by hand in a UI are hard to track and repeat.",
 "outcome": "A deal object with name, amount, and close date fields is defined in code and available in your Twenty workspace.",
 "steps": [
  "Run `npx create-twenty-app my-app` to scaffold a new app.",
  "In the new project, define an object with `defineObject` from 'twenty-sdk/define', using nameSingular 'deal', fields for name (TEXT), amount (CURRENCY), and closeDate (DATE_TIME).",
  "Run `npx twenty app:publish --private` to ship the app to your workspace.",
  "Open the workspace and confirm the Deal object and its fields appear."
 ],
 "agent_prompt": "Using the twentyhq/twenty repo, scaffold an app named <app-name> with `npx create-twenty-app <app-name>`, then define a deal object with name, amount, and closeDate fields as shown in the README example. Publish it with `npx twenty app:publish --private` and report the publish output. Verify that the Deal object appears in the <workspace-name> workspace.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "1 hour",
 "basis": "readme",
 "caveat": "The README shows the object definition and publish command but does not describe the workspace access needed for `app:publish`, so check your access before you start.",
 "category": "Sales and marketing",
 "tags": [
  "Sales and marketing"
 ],
 "lang": "typescript",
 "requirements": [
  "A computer with Node.js and npm, since the README uses npx commands (inferred)",
  "A Twenty workspace to publish to, from twenty.com or a self-hosted instance",
  "Docker, if you plan to self-host with Docker Compose"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/twentyhq-twenty/define-custom-crm-object-as-code/",
 "md": "https://dedupedai.com/use-cases/twentyhq-twenty/define-custom-crm-object-as-code/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/twentyhq-twenty--define-custom-crm-object-as-code.json",
 "api_version": "v1"
}
