> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comforthub.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync rules by module

> For each mirrored module: which way it flows, who owns its fields, and what a delete in the CRM does here

Every module below is mirrored between the CRM and the engine. The mechanics, why a change never loops, and what the three delete rules mean are on [How sync works](/handbook/running/how-sync-works). This page is the per-module table.

Direction reads: **both** means a record can be made and edited on either side; **CRM → engine** means the engine only reads it; **engine → CRM** means the CRM only reads it, and a record typed into the CRM is refused. "Deactivate here" keeps the row and marks it inactive. "Delete here" removes the row and the children it owns, and is refused and flagged for review when something else still points at it. "Refuse and flag" writes nothing and raises a human-review flag, because the record moved money.

| Module               | Direction    | Who owns the fields                                                                                                                                                                                                                       | On a CRM delete | Notes                                                                                                                                                                                                                                                                                                                                 |
| -------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| customer             | both         | shared; the name is the CRM's                                                                                                                                                                                                             | deactivate here | one person, one email                                                                                                                                                                                                                                                                                                                 |
| account              | both         | shared                                                                                                                                                                                                                                    | deactivate here |                                                                                                                                                                                                                                                                                                                                       |
| lead                 | both         | shared; the status and the conversion are the CRM's                                                                                                                                                                                       | deactivate here | converting is the CRM's own action, see [Convert a lead](/handbook/new-customers/convert-a-lead)                                                                                                                                                                                                                                      |
| property             | both         | address and account shared; name and type are the CRM's; the active flag is the engine's                                                                                                                                                  | deactivate here |                                                                                                                                                                                                                                                                                                                                       |
| equipment            | both         | shared                                                                                                                                                                                                                                    | deactivate here |                                                                                                                                                                                                                                                                                                                                       |
| product              | both         | name, description, price and active flag shared; the rest is the CRM's                                                                                                                                                                    | deactivate here |                                                                                                                                                                                                                                                                                                                                       |
| stock material       | both         | shared; the supplier link is the engine's                                                                                                                                                                                                 | deactivate here |                                                                                                                                                                                                                                                                                                                                       |
| supplier             | both         | shared                                                                                                                                                                                                                                    | deactivate here | branches belong to the supplier; a supplier with none gets a **Default branch** when a purchase order arrives from the CRM                                                                                                                                                                                                            |
| purchase order       | both         | notes shared; the supplier is the CRM's; the number and creation time are the engine's                                                                                                                                                    | delete here     | the engine numbers an order made in the CRM                                                                                                                                                                                                                                                                                           |
| work order           | both         | name, status, type, billing status and notes shared; the customer, subscription, number, discount and fee are the CRM's; completion notes are the engine's                                                                                | refuse and flag | the number and the name are two different things: the number is the CRM's own autonumber, and a work order booked here has none until the sync brings one back, while the name is minted here the moment the job is booked. Line items and equipment links go with the work order; a change to one line re-sends the whole work order |
| appointment          | both         | name, date, service type, status, duration, technicians and arrival window shared; the customer, property, work order, territory, checklists, number and notify-client switch are the CRM's; no-show and completion time are the engine's | delete here     |                                                                                                                                                                                                                                                                                                                                       |
| territory            | both         | active flag shared; name and arrival windows are the CRM's; the major service area is the engine's                                                                                                                                        | deactivate here | the arrival windows are ticked in the CRM and never pushed back                                                                                                                                                                                                                                                                       |
| technician           | both         | shared                                                                                                                                                                                                                                    | deactivate here | a technician made in the CRM with an email gets an app login and an invite email                                                                                                                                                                                                                                                      |
| phone agent          | both         | active flag and order shared; the app user is the CRM's; the Twilio worker is the engine's                                                                                                                                                | deactivate here | an agent made in the CRM must name an app user nobody else holds, or it is refused once and flagged                                                                                                                                                                                                                                   |
| invoice              | both         | discount and fee shared; status, amount, customer, properties and partial-payment switch are the CRM's; number, payment status, sent time and due date are the engine's                                                                   | refuse and flag | a CRM edit to an engine-owned field is refused, flagged and put back; the CRM's Created, Delivered and Void read Draft, Sent and Void here                                                                                                                                                                                            |
| payment              | both         | the engine's                                                                                                                                                                                                                              | refuse and flag | a CRM edit to an engine-owned field is refused, flagged and put back                                                                                                                                                                                                                                                                  |
| subscription         | both         | the engine's                                                                                                                                                                                                                              | deactivate here | a CRM edit to an engine-owned field is refused, flagged and put back                                                                                                                                                                                                                                                                  |
| subscription payment | engine → CRM | the engine's; the subscription link is the CRM's                                                                                                                                                                                          | refuse and flag | Stripe is the only path; one typed into the CRM is refused once and flagged                                                                                                                                                                                                                                                           |
| checklist template   | CRM → engine | the CRM's. Nothing written here ever reaches the CRM, the name included                                                                                                                                                                   | delete here     | author templates in the CRM; a template that still has a submission here cannot be deleted                                                                                                                                                                                                                                            |
| assigned checklist   | both         | name shared; type and description are the CRM's                                                                                                                                                                                           | delete here     |                                                                                                                                                                                                                                                                                                                                       |
| checklist submission | both         | completion time and technician shared; the template and the appointment are the CRM's                                                                                                                                                     | delete here     | one typed into the CRM has no answers; the real path is the app                                                                                                                                                                                                                                                                       |
| timesheet            | both         | technician, status, approval time and rejection reason shared; the period, hours and submitted time are the engine's                                                                                                                      | delete here     | a status set in the CRM is applied here and stamps the approval or rejection; a change here pushes once, however many entries it touches                                                                                                                                                                                              |
| time off request     | both         | technician, status, review time and review notes shared; the days and submitted time are the engine's                                                                                                                                     | delete here     | a request typed into the CRM must name an app user                                                                                                                                                                                                                                                                                    |
| payroll calendar     | both         | name shared; processing status and summary are the CRM's                                                                                                                                                                                  | delete here     | all four CRM processing statuses land here, Needs Review included                                                                                                                                                                                                                                                                     |
| call                 | engine → CRM | the engine's                                                                                                                                                                                                                              | delete here     | one record per call, with its result, people, recording and transcript; the CRM reads it and cannot change it                                                                                                                                                                                                                         |
| email                | both         | the customer link shared; the rest is the CRM's, except the message id                                                                                                                                                                    | delete here     | a customer mail sent by the engine names its account in the CRM                                                                                                                                                                                                                                                                       |
| record lock          | both         | status shared; the rest is the CRM's                                                                                                                                                                                                      | delete here     | a push refused because the CRM record is locked is re-sent once when this lock is resolved or deleted; the flag it raised stays until a person closes it                                                                                                                                                                              |

## How ownership works

* **Shared is the default.** Both sides may write a shared field, and the last writer wins; there is no arbitration. Edit one side at a time.
* **A field one side owns is only ever written by that side.** An edit made on the other side is either overwritten on the next crossing or, for the modules marked *refuse and flag*, put straight back and flagged for a person.
* **The same value is often spelled differently in the two systems**, such as a status written in lower case here and picked from a title-case list in the CRM. The sync converts between them on the way through, so a difference of spelling alone is not drift.

## Related

* [How sync works](/handbook/running/how-sync-works)
* [Who is the source of truth](/systems/who-is-the-source-of-truth)
* [Fix a record that did not sync](/handbook/running/fix-a-record-that-did-not-sync)
