In our platform, our resources are organized by Sites (which is a resource capability). Each resource belongs to a site.
Our intention is that when we create a booking, we select a site and all the resources are filtered by this capability.
So, we configured the following in the nodes of service definitions:
{
"Condition": "<A>",
"Value": [
{
"Label": "A",
"Type": "Operation",
"Value": {
"FirstOperand": {
"Link": "[var:Site]"
},
"Operator": "=",
"SecondOperand": {
"Link": "RESOURCE",
"Capability": "Site"
}
}
}
] }
In the booking wizard, this is working fine.
Next step is to update our automation script that is creating bookings silenty. How can we pass the Site as input argument during the slient booking creation?
Hi Bruno,
To filter out resources silently based on "Site" parameter you'll have make use of the group objects in the TryCreateNewBooking call present in the BookingManager.
On your automation script make sure to use the "IEnumerable<Group>" as input field to provide a filtering group.
Here is an example of a Group object creation:
var group = new Group
{
Name = "ProfileParameterName", // Profile Parameter Name should be "Site"
Type = FilterType.Capability,
NodeIds = new List<int>{4}, // Node Ids to apply the filter to.
SelectedLocation = "SiteToFilter", // for instance Lisbon / Izegem etc..
Label = "ProfileParameterName"// Profile Parameter Name should be "Site"
};