Skip to content

[CRM Seed Data] Missing Relationship Fields in Contacts, Opportunities, Tasks, etc.  #874

@hotlong

Description

@hotlong

Problem

The CRM seed data in examples/app-crm/src/data/index.ts does not provide relationship (lookup/master_detail) fields in records, causing contacts, opportunities, etc. to be disconnected from parent objects. This breaks ObjectStack conventions and makes demo/test environments not resemble realistic CRM data.

What To Fix (Checklist)

  • Contacts: Add the account field (value should match the Account's name which is the externalId).
  • Contacts: For records with management hierarchy, add the reports_to field (value = target contact's email).
  • Opportunities: Add account field; link each Opportunity to a parent Account (use Account name). Also add owner (if user assignment modeled).
  • Tasks: Add account (when relevant), and possible owner field. If the Task is associated with an Opportunity, add opportunity field (use Opportunity name).
  • Leads: If relevant, add fields to relate Lead to Account/Contact (e.g., add account field).
  • Quotes and Products: Link quote line items to Opportunities by field, and Products by name if these objects exist.

Acceptance Criteria

  • Changes should follow ObjectStack spec: cross-object relationship fields use the target object's externalId value (not internal IDs).
  • All CRM data should demonstrate realistic parent-child and lookup relationships, and allow the seed loader engine to resolve references automatically.
  • No hardcoded internal IDs should be present.
  • Demo app should show correct relational graphs in UI and allow navigation between objects.

References


This issue acts as a data quality bug report. Fixing it improves onboarding, demos, IDE experience, and plugin reliability.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions