Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-
In the final step of this workflow rule, associate the custom function you created and then hit Save.
Here's how you can update the salesperson at the customer level:
1. For new customers - During customer creation, you can select the salesperson from the dropdown custom field that was created for this purpose.
2. For existing customers - You have two options, either update the salesperson information using the "
Bulk update" option or export the customer data, add the salesperson details in the Excel sheet, and then re-import the file using the Overwrite option.
Now, whenever an invoice is created and saved, the custom function will get executed and the salesperson chosen at the customer level will be associated with the invoice.
If you wish to implement this automation for other types of sales transactions like Estimates, Sales Orders, or Credit Notes, please contact support[at]zohobooks[dot]com, and we'll assist you.
Regards,
Shireen Farhana
Zoho Books