High-Level Use Case
Ranking rules introduces a matching system that allows users to compare and score records based on flexible criteria. For example, staff members can be matched to training sessions based on required skills (e.g., specific degrees) and nice-to-have attributes (e.g., experience with over 18s).
Similarly, rooms can be matched to training requirements based on features like available equipment or room size. The system will prioritise and order results based on how well they meet the required and nice-to-have criteria, giving users a clear and structured way to make optimal decisions. This should be used on top of conflict checking. So all conflict rules are first taken into account. Then all available can be prioritised/matched/sorted.
Getting started
Ranking rules are supported from GoMeddo 6.11 onwards
Install the latest GoMeddo version and GoMeddo needs to be enabled to use Conflict Rules
Create or edit a ranking rule
Ranking rules use the Conflict Rule record type. Select it on the Select a Record Type screen when you create the rule. The Filter Rule record type is only for filter rules.
Follow these steps to create a ranking rule:
-
Go to the GoMeddo Rules tab. If the tab isn't visible, look under More.
-
Click New.
-
On the Select a Record Type screen, select Conflict Rule.
-
Click Next.
-
Enter a GoMeddo Rule Name.
-
Select a Dimension to link the rule to. This is needed for ranking to work properly.
-
Make sure Is Active is selected. It's selected by default.
-
In Formula, enter the condition a record must meet to be ranked.
-
Optionally, click Check Syntax to validate the formula.
-
In the Error Configuration section, set Conflict Type to Ranking. The Weight field appears in the Information section.
-
Enter a Weight as a whole number.
-
Click Save.
A filled-in ranking rule looks like this before you save:
After you save, GoMeddo opens the rule on its Rule Editor tab.
When you save an active rule, GoMeddo checks the formula syntax and the fields it references. An inactive rule isn't applied and isn't validated on save.
When the formula is true for a record, GoMeddo adds the rule's weight to that record's ranking score. The higher the score, the higher the record appears in intelligent lookups and API results. A negative weight lowers the score of matching records instead. When several ranking rules match the same record, GoMeddo adds up their weights.
To calculate the weight per record, leave Weight empty and enter a formula that returns a number instead of true or false. GoMeddo adds that number to the record's ranking score.
Formulas support the same operators and functions as conflict rules, except the dimension-specific ones.
You can leave Validation Message empty. GoMeddo doesn't currently show it anywhere for ranking rules. If you leave it empty, GoMeddo fills in the rule name when you save.
To edit an existing rule, open it from the GoMeddo Rules tab. On the Rule Editor tab, click the pencil icon next to a field, make your changes, and click Save.
For sample formulas, see Example ranking rules.
Ranking can be observed in the following endpoints and or booking flows:
Ranking can be seen in the following way in these places in GoMeddo
We show the highest ranked options first, then the one without a ranking, then the ones with negative scores.
-
Intelligent Lookups: The best ranked option shows up at the top of the list. Every option with a ranking score is marked by a star and its Ranking Score.
-
Dimension Junctions: The best ranked option shows up at the top of the list. Every option with a ranking score is marked by a star and its Ranking Score. When creating the rule, select the dimension part of the junction on the dimension field; for reservation contacts, the dimension is contact. Then create a rule that marks a reservation as most favorable if it has at least one record meeting the criteria. For example, a rule that assigns higher weight to reservation contacts for contacts whose department is IT: COUNT(FILTER(B25__Reservation_Contacts__r AS rc, rc.B25__Contact_Lookup__r.Department== 'IT')) > 0
-
Timeslot Endpoints: When you select a time slot, the system creates the best reservation based on ranking. For example, if a ranking rule identifies one resource as best ranked for the chosen time slot, the reservation will be made for that resource.
-
Timeslot Picker: When you select a time slot, the system creates the best reservation based on ranking. Optionally, show a star on the best time slots based on their rankings. To do so, open the Reservation time slot picker configuration and set Number of best ranked slots to show under Interface. The stars only show when Reservation Selection Modal is inactive.
-
Frontend Builder - When you select a time slot, the system creates the best reservation based on ranking.
-
findSingleAvailableDimensionId: Returns the list of dimensions sorted by best ranked.