# Understanding Time Conflicts

When making appointments diarybook ensures that the times chosen do not conflict with other items on the account. If conflicts occur these are shown to the user creating the appointment, and _if possible_, allows the user to override and accept the conflict(s).

## Types of conflicts

So what can an appointment conflict with? Conflicts are very much depend on for which service provider (diarybook user) the appointment is being made, which user is making the appointment and what resources it is using.

The following can conflict with an appointment:

* Other appointments that exist for the same service provider
* Other appointments that exist using the same resources
* A blocked time for the user or account
* The resources permission level
* The resources normal available hours
* The service provider's normal working hours
* Waiting room occupancy

## Accepting conflicts

When a user is presented with the conflicts they _sometimes_ have the option of accepting the conflict and creating the appointment. Whether they are given the option or not depends on a number of factors discussed here.

For clarity the following terms will be used

|term|meaning|
|----|----|
|User|The diarybook user that is creating the appointment|
|Service Provider|The diarybook user that the appointment is for|
|Blocking Appointment|An existing appointment that is conflicting with the new one|
{.table}

### Other appointments - same service provider

This is when the appointment being made for a service provider conflicts with other appointments for the same service provider.

The user can accept the conflict(s)...

* When the user also created the blocking appointment
* When the service provider _is_ the user creating the appointment
* When the user has been granted `Can Double Book Others` permission
* When the user is an administrator



### Other appointments - same resource(s)

This is when the appointment being made using specific resources (rooms or equipment) is conflicting with one or more existing appointments with those same resources.

The user can accept the conflict(s)...

* When the user also created the blocking appointment
* When the service provider _is_ the user creating the appointment
* When the user has been granted `Can Double Book Resources` permission


### Blocked times

This is when the appointment being made is conflicting with one or more blocked times.

The user can accept the conflict(s)...

* When the blocked time is specifically for the service provider *and* the service provider _is_ the user creating the appointment



### Resource Permission

This is when the appointment being made is trying to book a resource that has been restricted to specific users that does not include the user making the appointment.

> [!danger]
> This type of conflict **can't be** overridden




### Resource Work Hours

This is when the appointment being made is trying to book a resource whose availability has been restricted to specific days and hours.

> [!danger]
> This type of conflict **can't be** overridden




### Service provider's Work Hours

This is when the appointment being made is for a time outside the service provider's normal hours of work.

The user can accept the conflict(s)...

* When the service provider _is_ the user creating the appointment
* When the user has been granted `Can Double Book Others` permission



### Waiting room occupancy

This is when the appointment being made is using a waiting room that has restricted occupancy.

> [!success]
> This conflict **can be** overridden

## Location conflicts

As well as time conflicts, diarybook checks that the locations on the appointment agree. A location can come from three places: the [appointment type](/docs/appointments/appointment-types/), the reminder setting and the appointment itself. If they point at different locations a location conflict occurs.

> [!danger]
> This type of conflict **can't be** overridden, because a mismatch could lead to the client being directed to the wrong location.

---
Source: https://diarybook.com/docs/appointments/time-conflicts/
