This proposal covers the scope of displaying the sales rep contribution based on the brand.
Requirement
The client sells many types of brands. The sales reps are responsible for selling these brands, the sales rep can sell more than one brand.
A customer can have multiple sales reps if they buy different brands. On a sales order form, the customer will order different items from different brands but we want to show the sales reps’ contribution based on brand.
Only one sales order form can be completed at any one time by the customer. Is it possible to attach multiple brands to a sales rep and have their sales contribution calculated from a sales order based on the amount of money the brand has generated?
Our Solution
- We will inactivate the existing script for calculating the sales team contribution. This will help us to resolve the existing script issue (‘Total contribution for sales reps is 200%. It must be 100%. Please modify contributions’)
- For calculating the sales rep contribution based on the brand we will set up two custom column fields in the sales order form.
- The first column field will be the “SALES REP” second one will be the “Brand”.
- Currently, these fields are already set up in the sales order record.
- When entering the new sales order user must manually enter values in the sales rep field and the brand we can set up brand value will be auto-populated from the item record.
- We will add a validation script for restricting the commit item line without rep value.
- When users save the new sales order record (create context). We will group all sales reps based on their assigned brand in the item line.
- Also, find out the total line amount of each sales rep and brand combination.
- Find the contribution percentage based on each combination.
- The total amount of each rep combination/subtotal of the SO*100 will be the formula for finding the contribution.
- Each rep contribution percentage will be stored under the sales rep contribution tab (For this we will create a new custom record named “sales rep contribution” each entry will be linked under the sales rep contribution subtab)
Assumption
- The user must manually enter the value in the “sale rep” column field when creating or editing the sales order.
- The solution only works for new sales orders which are created after the script deployment.
- The calculation only performs in the sales order record creation.
- We will not consider the sales team subtab in the sales order for contribution calculation.