Skip to content

Two-Way Sync for CPG Master Data: NetSuite, Postgres, and Field Ownership

Postgres holds the channel SKU aliases, pack conversions and account crosswalks CPG teams keep in spreadsheets, while NetSuite stays the owner of the ERP fields it mirrors.

Author
Ruben Burdin · Founder & CEO
Published
Read time
5 min read
Two-Way Sync for CPG Master Data: NetSuite, Postgres, and Field Ownership
DATA ENGINEERING

The operating decision

Use a Postgres operational model to make CPG master-data relationships explicit, with NetSuite remaining authoritative for the ERP records it owns. Two-way sync is useful when approved changes must travel back, but mirrored ERP data and proposed corrections should have different permissions. Model channel SKUs, pack conversions, and account crosswalks as governed relationships.

Explore the complete consumer packaged goods integration and automation hub for the systems and processes around this guide.

Summary card: NetSuite Postgres two-way sync for CPG master data

What this looks like in consumer packaged goods

A CPG operations team keeps SKU aliases in spreadsheets because each marketplace and distributor calls the same product something different. The team wants a shared application backed by Postgres. If that application writes directly into mirrored ERP rows without review, a typo can become an operational change before anyone checks the affected channels.

Records, ownership, and update rules

RecordOwnerOperating rule
ERP mirror rowERP administratorPreserve the NetSuite internal reference and source revision; restrict edits to finance-owned values.
Channel-item crosswalkProduct operationsKey each alias by channel, account scope, item, and effective period.
Proposed correctionData stewardRecord the requested value, reason, requester, review status, and affected records separately.
Accepted changeAuthorized ownerPersist approval and destination reference before marking a write-back complete.
Record ownership diagram: ERP mirror row, Channel-item crosswalk, Proposed correction
Define the record owner and the rule before enabling updates.

Work through the process

  1. 01
    Design the keys first
    Use stable internal IDs for ERP records and separate keys for externally visible codes. An SKU alias can change while historical orders must still resolve to the item sold at the time.
  2. 02
    Separate views from commands
    Expose synchronized data for investigation through read views. Route proposed corrections through a controlled table or application path with an owner and approval state rather than treating every database update as permission to write to the ERP.
  3. 03
    Check dependent relationships
    Before approving a pack or alias correction, list affected open orders and channel mappings. A valid new mapping may still be inappropriate for orders created under an older product revision.
  4. 04
    Verify the accepted result
    After an approved write, read the destination record and compare the owned fields. Preserve both the proposed and accepted value if the ERP normalizes or rejects part of the request.
  5. 05
    Push one approved alias correction from Postgres to NetSuite
    Change one marketplace SKU alias through the proposed-correction table in Postgres, with requester, reason and effective date. After the steward approves it, read the NetSuite item: only the alias field may change; internal ID, revision and finance-owned values must be untouched. Query an order created before the effective date: it must still resolve to the earlier alias revision. Then submit an alias already owned by a second product; the mapping must move to suspended with both items listed for the steward. Stop the rollout if a direct mirror-table update reaches NetSuite, if the old order shows the new alias, or if the overlap was applied to either product.
5-step operating sequence: NetSuite Postgres two-way sync for CPG master data
Follow the operating sequence; unresolved exceptions return to a responsible reviewer.

Handle the exceptions explicitly

Alias overlaps two products

Suspend the ambiguous mapping and ask the steward to establish scope and effective dates.

Database user edits a protected mirror

Block or disregard unauthorized write-back according to the configured ownership model.

ERP rejects an approved value

Keep the change pending with the rejection evidence; approval is not proof of acceptance.

What to verify before expanding

  • Historical orders retain the correct mapping revision.
  • Only approved, permitted fields can produce an ERP write.
  • A protected ERP mirror field cannot be changed through an unauthorized database edit during the pilot.
  • An approved correction rejected by NetSuite remains pending with its rejection detail and cannot appear as accepted.
Book a demo for consumer packaged goods integration and automation

Connect this process to the rest of your operation

Explore Stacksync two-way sync and scope the records and actions against your actual systems. Book a demo with a real ERP mirror row example and the exception your team handles most often, for example alias overlaps two products.

The shared architecture guide covers record matching, ownership, and recovery across systems.

Technical references

Book a demo for consumer packaged goods integration and automation

FAQ

Frequently asked questions

Is the operational database a new ERP?
No. Postgres holds the relationships NetSuite does not keep as versioned records: which alias each marketplace uses for a product and the period it applied, the pack conversion in force for a retailer, the crosswalk between a CRM company and an ERP customer, and the review state of every proposed change. NetSuite still owns the item and customer records themselves, including any current alias value written back after approval, along with pricing, inventory valuation, posting and customer approval. If a column in Postgres starts to look like a ledger, that is the signal to move the decision back to the ERP.
What has to be cleaned up in the spreadsheets before loading aliases into Postgres?
Each alias row needs a channel, an account scope, an ERP item and an effective period before it is loaded. Rows where the same alias and channel point at two items load as suspended, not resolved by hand during import. Aliases with no matching NetSuite item stay in a staging table until product operations finds the item or retires the alias, and the loaded count is signed off against the spreadsheet before the sync is enabled.
Does approval in Postgres mean the change is live in NetSuite?
No. Approval is one state and acceptance is another. The accepted-change row is written only after NetSuite has been read back and the owned field matches the approved value, and the elapsed time between the two states is visible on the row. If NetSuite reformats the value, the application shows the approved and returned values side by side so the steward decides whether the difference is acceptable or needs another correction.

About the author

Ruben Burdin
Ruben Burdin
Founder & CEO

Ruben Burdin is the Founder and CEO of Stacksync, the first real-time and two-way sync for enterprise data at scale. Ruben is a Y Combinator alumni with a strong background in software engineering and business.

All posts by Ruben Burdin

About Stacksync

Stacksync powers real-time, two-way sync between CRMs, ERPs, and databases. Engineers sync data at scale and automate workflows, not dirty API plumbing.

Coworkers laughing in front of a laptop in a casual office setting

You just read how it should work.
See it run on your own data.