Automatic $ to % Discount Normalization for Salesforce Sync
When syncing PandaDoc pricing tables/quote builders to Salesforce Opportunity Products, discount format mismatches ($ vs %) cause sync failures or incorrect data mapping.
PandaDoc allows line items to accept both flat-amount ($) and percentage (%) discounts, but the Update Opportunity Products trigger syncs discount values as-is without format normalization. If a line item has a $ discount and the mapped Salesforce field expects %, the sync breaks or writes the wrong value.
Goal: Automatically normalize all discounts to percentage format during SFDC sync, so:
- If a line item has a $ discount, convert it to the equivalent %
- If it's already a %, pass it through unchanged
- Sync succeeds regardless of format used in PandaDoc