How can I shuffle vendors for Job Offers and Availability requests?
Problem: Some vendors never receive job requests despite meeting all the criteria.
Cause:
If you have several vendors with similar competencies and rates, filtering and sorting them by the same criteria will give the same results. Some names will always be on top of the sorting lists, while others will never have a chance to respond to job offers.
Solution: Create a mechanism for randomizing the vendor database.
Â
Add a Number type custom field for Vendors. For details, see the Add a custom field guide.
Add a macro for the Vendors scope that will change the value of this new custom field to a random natural number. For details, see the XTRF guide to macros.
A basic macro written in Groovy could look like this.import com.radzisz.xtrf.model.partner.provider.Provider import com.radzisz.xtrf.utils.velocity.VelocityTagUtils class RandomizeVendorsMacro { def list def params VelocityTagUtils utils = new VelocityTagUtils() RandomizeVendorsMacro(list, params) { this.list = list this.params = params } def runMacro() { list.each { Provider provider -> provider.getCustomFields().setNumberField1(Math.random()*1000 as BigDecimal) } } } new RandomizeVendorsMacro(list, params).runMacro()
This basic macro runs on the very first Number-type custom field created within the Vendor scope. For better precision, it should run on a chosen custom field.Â
Set up a periodic job that will run the macro overnight. For details, see the https://xtm-cloud.atlassian.net/wiki/x/SYADy guide.
Configure the vendor selection rules (Smart or Classic) to include the randomization.
For Smart vendor selection rules:
Go to the Configuration menu > Projects and Quotes > Vendor Selection Rules (Smart).
Open the rule you use for selecting vendors for job offers.
In the Sorting card, select <Your new custom field name> (ascending or descending) in the Sort by dropdown.
Â
For classic availability requests:
Go to the Configuration menu > Projects and Quotes > Vendor Selection Rules (Classic).
Open the rule you use for selecting vendors for availability requests.
In the Sort by dropdown, select the following line Vendor, Custom Fileds, <Your new custom field name>.
Â
Click the Save button.