Use Selection Rules and Templates

Read as Markdown

So far each request has named its host. With a Selection Rule, Cronofy chooses the host from a group based on who’s available. With a Template, the meeting’s details and hosts are set up in advance, so your application only says who the meeting is with.

These use the same access token as Create a request with the API.

Selection Rules #

A Selection Rule is a group of members, and the number of them who need to attend. Click View Selection Rules on the Hill Valley Futures page to see the Sandbox’s two:

  • Either Doc or Marty: one of them attends.
  • Both Doc and Marty: both of them attend.

Click a rule to see its sub, its members, and how many are required.

Use the rule’s sub as the host_group:

POST /v1/scheduling_requests HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8

{
  "host_group": {
    "sub": "{SELECTION_RULE_SUB}"
  },
  "recipients": [
    {
      "email": "{YOUR_EMAIL}",
      "slot_selector": true
    }
  ],
  "event": {
    "summary": "Test meeting with Doc and Marty"
  }
}

Try each rule and compare the times offered:

  • Both Doc and Marty only offers times when both are working: Monday to Wednesday, 09:00 to 15:00.
  • Either Doc or Marty offers any time one of them is working: Monday to Wednesday, 08:00 to 17:00, and Thursday to Friday, 08:00 to 15:00.

Fewer required members, or more members to choose from, means more times to offer.

Templates #

A Template describes a type of meeting: its title, length, location, and who hosts it, which can be a Selection Rule. Click View Templates on the Hill Valley Futures page to see the Sandbox’s Discuss Flux Capacitor project Template, a 30-minute meeting hosted by Either Doc or Marty.

Click the Template to see its sub. Then pass it with the recipient:

POST /v1/scheduling_requests HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8

{
  "template": {
    "sub": "{TEMPLATE_SUB}"
  },
  "recipients": [
    {
      "email": "{YOUR_EMAIL}",
      "slot_selector": true
    }
  ]
}

The Template provides the event details and the hosts.

Templates can’t be created or edited in the Sandbox yet. A Selection Rule that a Template uses, such as Either Doc or Marty, can’t be deleted.

Book them in your own page #

Requests created from a Selection Rule or a Template have the same integration_operations as any other, so you can offer their times in your own booking page. Cronofy chooses the host when the time is booked.

In your product #

In an applicant tracking system

Let each customer choose the Template an interview stage uses. When a candidate reaches that stage, create the request from the Template, and its Selection Rule picks interviewers from the panel, with booking limits spreading the load across them.

Link to this
In talent management

Set up Templates for each meeting type, such as a quarterly review, with a Selection Rule for the people who run them, such as the HR team.

Link to this
In a CRM

Use a Selection Rule to share meetings between the reps in a territory, and Templates for each meeting type, such as a discovery call or a demo.

Link to this
In healthtech

Use a Template for each appointment type, with its length and location, and a Selection Rule to pick a practitioner from the right specialty, with booking limits capping how many appointments each sees a day.

Link to this

Comparing the ways to choose a host #

MethodWho hostsWhat you pass
Single hostThe member in hosthost, recipients, event
Selection RuleMembers of the rule, chosen by availabilityhost_group, recipients, event
TemplateDefined by the Templatetemplate, recipients

See Create a Scheduling Request and Create using a Template for every option, and Selection Rules and Templates for how your customers manage them.

Next #

You’ve worked through the Sandbox. To go to production, provision a Managed Organizational Unit for each of your customers.