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
_serviceIdvalues are not valid on destination quotes. - Source charges live on inspection population and
chargeSchema; destination quote charges are created viacreateOrUpdateChargesinsidecreateQuoteWithCharges. - 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
_serviceIdand 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.tsattik-backend/src/models/chargeSchema.tsattik-backend/src/models/serviceSchema.ts(services catalog)
Status: Planned
Log in to comment and vote
No comments yet
Be the first to share your thoughts.