Automating the value of the sales rep in the sales order item line. The sales rep will be identified based on the customer territory and the item’s brand value setup in the custom record.
Requirements
Is there any way to automate this using sales rules?
The scenario will be the customer is located in a specific territory and is purchasing from brand x (haircare). In that case, the sales rep will be prepopulated as the sales rep is responsible for that brand’s sales in that territory?
Our Solution
- For the sales rep mapping, we will create a custom record.
- The custom record will have three fields.
- Sales territory, brand, and sales rep are the fields.
- We will populate the sales rep value on the item sublist sales rep column field based on the custom record entry.
- When an item commits, the sales rep value is populated in real-time.
Assumption
- We need data to create the custom record. This information will be provided by the client.(In CSV files) sample template will be given below.
Mapping
Customer sales territory:- sales territory
Brand:- Item brand
Item sales rep:- sales rep
Note: The values must exactly match the values in this list.
- We have created a sample custom record in the sandbox
- We will create the custom record using CSV import.
- The sales territory must be assigned to all customers.
- All items must have a brand value.
- If the customer record territory field/ item record brand value is empty we cannot identify the sales rep from the custom record. In this case, the user must enter the sales rep value.
- When we save a sales order, we add validation. We do not allow the record to be saved if any of the sales rep columns or brand columns are empty.
- This script only works when a user creates a sales order through the Netsuite UI.