Run script to seed old POs, delivery notes and invoices for 3-way matching

Why

Documents (POs, delivery notes, invoices) created before the recent 3-way matching push are not being automatically matched. The matching system only runs on new documents. Historical documents need to be backfilled to enable matching.

What

Write and run a script/job to seed historical documents for 3-way matching across all tenants:

  1. Match all POs first
  2. Match all delivery notes
  3. Match all invoices

This will enable 3-way matching for documents that were created before the automatic matching was deployed.

How

  • Create a script that iterates through all tenants
  • For each tenant, trigger the 3-way match process for existing documents
  • Process in order: POs β†’ Delivery Notes β†’ Invoices
  • Log results and any errors
  • Run as a one-time migration job

Dependencies

Existing 3-way matching logic (COR-1229)

Acceptance Criteria

  • Script successfully processes all tenants
  • Historical POs are matched to delivery notes and invoices where applicable
  • Historical delivery notes and invoices are matched to POs
  • No duplicate matches created
  • Script logs progress and completion status
  • Can be run safely multiple times without creating duplicate matches

Please authenticate to join the conversation.

Upvoters
Status

Completed

Board
πŸ’‘

Feature Request

Date

14 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.