Salesforce-to-Xero Integration

Meeting Pack — Schema Reconciliation & Data Model Decisions

Purpose of this meeting: Reconcile our proposed business rules schema against the existing Salesforce data model. We've inspected the live sandbox and found that ~70% of what the rules need already exists under different names. The meeting needs to confirm field mappings, agree on ~16 net-new fields, and resolve 10 open questions before we build the rules engine.

Suggested agenda

  1. Walk through the schema diagram Confirm shared understanding of Account → Contract → OLI/Asset relationships and where Xero objects sit. ~10 min.
  2. Discuss OpportunityLineItemSchedule discovery Standard SF object designed for billing schedules, currently 0 records. Should we use it instead of inventing a custom one? Affects BR-049, BR-004. ~10 min.
  3. Walk through Rule Application Process How rules actually fire and what users see. 6 UX patterns to agree on (UX-1 to UX-6). ~15 min.
  4. Field mappings review Ethan validates our "use existing field X" proposals. Flag any we got wrong. ~20 min.
  5. Open questions — go through Q1 to Q10 Each has a recommended answer. Goal: agree, defer, or change. ~25 min.
  6. Field metadata package review Walk through the 16 pre-built field XML files. Confirm types, picklist values, required flags. ~10 min.
  7. Sandbox data refresh Empty sandbox blocks data audit on Q5/Q6/Q7. Can Ethan refresh from prod? ~5 min.
  8. Deployment process SFDX-managed (this repo) — Ethan reviews PRs. Confirm flow. ~5 min.
  9. Action items + next steps Who owns what; when do we reconvene. Plus: BDD spec generation timeline for Paul. ~5 min.
⚙️
Rule Application Process NEW
How rules actually fire and what users see. Sequence diagrams, action-to-UX mapping, plus 6 design decisions to confirm.
Anchors the Gherkin's abstract phrases ("sync is blocked", "alert fires") to concrete user-visible outcomes. Use as the reference when walking through the BDD specs.
📊
Schema Diagram PRIORITY
Visual model of Account → Contract → Opportunity → OLI / Asset, plus Xero integration objects.
Highlights:
  • Where billing schedule data actually lives
  • The dual-date problem (Service dates on 3 objects)
  • Live vs abandoned objects (Billing__c)
🔀
Field Mappings PRIORITY
Every field referenced by the YAML rules, mapped to existing or new Salesforce fields. The Ethan's review document.
Reuse: 23 existing fields
Rename/cascade: 9 existing fields
Net-new: 16 fields
Picklist extensions: 3
Open Questions PRIORITY
10 reconciliation questions, each with context, options, and a recommended answer.
4 high impact
4 medium impact
2 low impact
All have draft recommendations
📋
Business Rules REFERENCE
All 56 rules from the final spreadsheet, filterable by category, type, status, and CFO decision.
Click any rule to expand and view the full YAML representation. Search across descriptions and field names.
🗺️
Implementation Plan CONTEXT
6-phase roadmap from current state to production. Phase 0 (test safety net) complete.
Use to set expectations on sequencing. Phase 2.4 (create missing fields) is on the critical path.
🔍
Raw Schema Diff REFERENCE
Technical bidirectional diff via Tooling API. Have ready in case the Ethan wants to drill in.
Bypasses FLS so it sees all fields. Shows existing custom fields not yet referenced by any rule (~290 across 6 objects).
📝
BDD Specs (Draft v0.1) NEW
Each rule expressed as Gherkin scenarios in business language. For Paul's parallel review.
56 rules, 56 .feature files. Filterable by category, type, CFO decision. Will refresh after Ethan meeting locks the schema.
📦
Field Metadata Package NEW
SFDX field-meta.xml files for the 16 net-new fields. Ready for Ethan to review and deploy.
Account (2): Region__c, L1_Account_Name__c
Opportunity (5): TCV__c, SOW_Currency__c, Value_Change_Notes__c, Invoice_Status__c, Is_Delayed_Renewal__c
OpportunityLineItem (2): Movement_Type__c, ARR_Change_Reason__c
Asset (4): Year_N_Total__c, Recurring_ACV__c, Testing_Start_Date__c, Testing_End_Date__c
Xero_Invoice__c (3): Is_Intercompany__c, Is_First_Invoice__c, SOW_Check_Completed__c