> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/chatlayer-documentation-pt-br/buildabot/tips-and-best-practices/route-your-flow-depending-on-the-time.md).

# Direcione seu fluxo de acordo com o horário

Esta página apresenta dois tutoriais que usam [Obter horário](/chatlayer-documentation-pt-br/buildabot/flow-logic/dialog-state/action-bot-dialog.md#get-time): para direcionar sua saudação com base no horário e para direcionar seu offloading com base no horário.

### Saudação

Você pode usar o plugin Get Time para cumprimentar os usuários de uma forma personalizada, com “bom dia” e “boa tarde”!

Primeiro, altere sua introdução para um “Go To”. Em seguida, nesse Go To, vincule a um bloco de Ação com o plugin Get Time. Nesse bloco de Ação, na seção Go To, vincule a um novo Go To “Check Time”. Este Go To ficará assim:

![](/files/a6e6598d05f0801c8a73b7c42cd887063836ab82)

Nesse Go To, a hora atual é verificada e dividida em noite, tarde ou manhã por meio das diferentes condições. Dependendo da hora atual, a variável {greetingTime} é dinâmica, então você pode ter uma introdução para o dia inteiro.

![](/files/746da1551847d9160214a0867b30bcd4eac564cd)

Onde o fluxo completo ficará assim:

![](/files/864762d9e0db4d77c78b7cf9f2078a9e736aa780)

### Transferência

O plugin Get Time também pode ser usado para verificar se você deseja ou não iniciar o offloading para um agente humano. Crie um fluxo semelhante ao acima, mas, em vez de fazer o direcionamento para a introdução no Go To, direcione para o bloco Offloading Open ou Offloading Closed com base no horário:

![](/files/a85209da0afc98691eae13ec9cfdd0e202187794)

Nesse caso, os agentes humanos estão disponíveis das 9:00 (se a hora for maior que 8) até as 16:00 (se a hora for menor que 16), e o Go To verifica o horário com base no plugin Get Time anterior e direcionará os usuários corretamente!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.chatlayer.ai/chatlayer-documentation-pt-br/buildabot/tips-and-best-practices/route-your-flow-depending-on-the-time.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
