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.

 

  1. Add a Number type custom field for Vendors. For details, see the guide.

    Custom field.png

  2. 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 .
    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. 

  3. Set up a periodic job that will run the macro overnight. For details, see the https://xtm-cloud.atlassian.net/wiki/x/SYADy guide.

    Periodic job.png

  4. Configure the vendor selection rules (Smart or Classic) to include the randomization.

    • For Smart vendor selection rules:

      1. Go to the Configuration menu > Projects and Quotes > Vendor Selection Rules (Smart).

      2. Open the rule you use for selecting vendors for job offers.

      3. In the Sorting card, select <Your new custom field name> (ascending or descending) in the Sort by dropdown.

         

    • For classic availability requests:

      1. Go to the Configuration menu > Projects and Quotes > Vendor Selection Rules (Classic).

      2. Open the rule you use for selecting vendors for availability requests.

      3. In the Sort by dropdown, select the following line Vendor, Custom Fileds, <Your new custom field name>.

         

      4. Click the Save button.