Cross-instance service and charge mapping for destination quotes

Objective

  • When handing off a job across instances, help CSRs map source inspection charges to destination company services so the new pending quote includes meaningful line items instead of an empty or manual-only quote.

Background

  • Parent epic: pending quote in destination from source inspection.
  • Service catalogs differ by company/brand; source charge _serviceId values are not valid on destination quotes.
  • Source charges live on inspection population and chargeSchema; destination quote charges are created via createOrUpdateCharges inside createQuoteWithCharges.
  • Workorder UI child provides the handoff entry point; API child creates the quote shell.

Scope

Backend

  • Preview or mapping endpoint: given source inspection + targetCompanyId, return source charges (name, category, amount) and suggested destination services (by name/category match β€” decision needed on matching rules).
  • Accept user-selected service mapping (source charge or service id β†’ destination service id) on create or follow-up PATCH to quote.
  • Create destination charges with correct destination _serviceId and pricing rules for target company (decision needed: copy amounts vs recalculate via destination price engine).
  • Do not copy source Mongo charge ids onto destination quote.

Frontend

  • In workorder handoff flow (after destination selected): show source line items and destination service picker or suggested matches.
  • Allow proceed with partial mapping; clearly label unmapped items that CSR must add in destination scheduler.

Out of scope

  • Unconfirmed inspection creation.
  • Spectora service id sync across companies.

References

  • attik-backend/src/util/functions/quote/createQuoteWithCharges.ts
  • attik-backend/src/models/chargeSchema.ts
  • attik-backend/src/models/serviceSchema.ts (services catalog)

Please authenticate to join the conversation.

Upvoters
Status

Planned

Board
🏠

Main App

Date

4 days ago

Author

Linear

Subscribe to post

Get notified by email when there are changes.