A sync rule links a schedule to a sync target, telling us which of the
schedule's members should flow into the target's Slack user group.
sync_type decides who is synced: on_call syncs only the people currently on
call, next_on_call syncs the people on the next upcoming shift, and all_users
syncs everyone on the schedule. By default every rotation on the schedule is
included; set rotation_id to scope the rule to a single rotation. As the
schedule's shifts change hands, we keep the target's Slack user group
membership in step with the rule.
A user group's members are the union of every rule feeding it, so one schedule
can have several rules for the same target as long as they differ on
rotation_id or sync_type. Point an on_call and a next_on_call rule at one group
and it holds both the current and the next on-call.
permanent_member_user_ids names users who stay in the group whichever way the
shifts fall, on top of whoever sync_type selects.
IDs of users always kept in the Slack user group, regardless of who is on call. Useful for keeping e.g. a manager in the group so they see mentions without being paged. Scoped to this rule: when several rules feed the same group, we sync the union of their permanent members.
A sync target is the link between incident.io and a single Slack user group,
used to keep that group's membership in step with who is currently on call.
A target identifies the group by its Slack user group ID and Slack team ID,
and remembers whether the incident.io bot should be added to the group so it
can manage membership. On its own a target does nothing: you link it to a
schedule by creating a schedule sync rule (see the Schedules service), and
that rule decides which schedule members flow into the group. As the
schedule's shifts change hands, we update the Slack user group to match.
A single target can be referenced by sync rules on several schedules at once;
linked_schedules lists every schedule with an active rule pointing at it.