# Preset the Widget on a specific Department

Departments are very useful to separate support actions into “domains” of competences.

This domains can be served by humans, chatbots or can be served in a hybrid fashion, mixing chatbots with humans handoff.

Tiledesk has a very easy way to handle departments.

Just go into the Departments section, create your own departments, configure these departments to be served by chatbots, humans or hybrid way:

![deps-705x371](https://user-images.githubusercontent.com/9378770/92229538-f2495f80-eea9-11ea-9331-33dc8a8f6c3d.png)

Now simply open the widget in the test page and the departments are shown to the guests of your site every time they will start a new conversation:

![widgt-438x705](https://user-images.githubusercontent.com/9378770/92229579-ff664e80-eea9-11ea-9c2f-d797cc7d2d7b.png)

## The problem

But, if you embed the widget in your “pricing” page, you probably don’t want all the new conversations in the page to be constrained choosing a department different by the “Pricing” one.

## Solution

In this case, to skip departments selection, you can simply slightly modify the widget code in the page, setting the department ID upon which the widget must start the new conversation. Just add this line of code:

```
departmentID: 'ID-OF-DEPARTMENT'
```

In the position shown by the following picture:

![snippet-dep-450x165](https://user-images.githubusercontent.com/9378770/92229706-2de42980-eeaa-11ea-8166-62a838cd4c5e.png)

You can always find the department id in the url of the “Modify Department” view, as shown in the following picture:

![edit-dep-705x304](https://user-images.githubusercontent.com/9378770/92229729-363c6480-eeaa-11ea-9709-26a6b14a7c51.png)

If the widget finds this property set, he will always skip the Department selection view, moving the user directly into a conversation in the preset department.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tiledesk.com/widget/advanced/preset-department.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
