> For the complete documentation index, see [llms.txt](https://docs.suvvy.ai/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suvvy.ai/en/main-settings/dopolnitelnye-nastroiki/dynamic-follow-ups.md).

# Dynamic follow-ups

**Dynamic follow-ups** automatically adjust message sending times to the client's specific situation, making reminders more personalized. In addition to standard intervals, the system can now take into account important dates and events in the conversation, sending messages precisely when they are most relevant.

For example, if a client has scheduled an appointment for a specific time, a reminder will be sent just before the appointment, rather than after a fixed time interval.

## Adding and creating a Dynamic Follow-up

{% hint style="success" %}
Let's look at creating dynamic follow-ups using the example of reminding a client about booking a session.
{% endhint %}

To add the ability to generate a dynamic follow-up in a dialog, you need to create a new Action.

{% stepper %}
{% step %}
Go to the **Workflows** tab and click **Add**.

<figure><img src="/files/wyitibifJh9bESBfyWSU" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Select the step type Set follow-up

<figure><img src="/files/FocL0vEJ4mYlHjAennAD" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Fill in the general settings fields in the Trigger Conditions tab

<figure><img src="/files/CwvonR6KHwmjW5kSgXv2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Add Arguments in the Action Variables tab

<figure><img src="/files/3jWfLNKwhnELVKiYX42q" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
In our case, there will be three reminders for the client. Therefore, we specify three arguments—each argument will be responsible for sending a reminder according to its own scenario:

* datetime\_now — notification at the time of recording
* datetime\_one\_days\_before — notification 1 day before the event
* datetime\_two\_hour\_before — notification 2 hours before the event
  {% endhint %}
  {% endstep %}

{% step %}
Go to the Action Steps section, click Add Step and select Set Follow-Up from the list:

<figure><img src="/files/NKrHUN5E5LIHu9pOnnO2" alt=""><figcaption></figcaption></figure>

Fill in the required argument in the Follow-up Launch Date-Time field by clicking the gear icon ⚙️ on the right.

<figure><img src="/files/PWa2mwaK8I4Ct05bfsdk" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Since we have three reminders in our example, we'll create three steps. Each reminder (argument) requires its own step. You can't add all three arguments in a single step.
{% endhint %}

<figure><img src="/files/okvcK3MzUk1qGoLHPq9I" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/Pi2EnX2gtjUBwsJRPMTx" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Now, at each step, you need to configure the message that will be sent to the user:

<figure><img src="/files/EJXVS3QPyxJgK0oKO6hs" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Flag meanings:

* No flag enabled — the text from the Message field will be sent to the user exactly as it is.
* Invoke Bot — allows you to specify instructions for the bot to perform when a given action is performed (for example, generate a message and call a knowledge base file).
* Generate Message — allows you to specify instructions for the bot to generate a text message to send to the user.
  {% endhint %}

In our case, we will use the **Call Bot function**:

<figure><img src="/files/yaDazHTbtDSjEgzdUR0T" alt=""><figcaption></figcaption></figure>

Click **Save**
{% endstep %}

{% step %}
Similarly, we configure steps 2 and 3 and create a message sending for each scheduled reminder. Ultimately, we need to add **three separate steps** to this action:

<figure><img src="/files/jgeeQm856bxfVtMRdK3X" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click the gear icon ⚙️ to the right of the Add Step button and select Bot Response Rules — All:

<figure><img src="/files/zR0Midz8lGNKMCjcChKC" alt=""><figcaption></figcaption></figure>

Click **Save**
{% endstep %}

{% step %}
Not only date and time can be passed **as arguments**, but also any other arguments that can be used as a template for generating a message.

<figure><img src="/files/vZraSmiys7gQW0syJFbX" alt=""><figcaption></figcaption></figure>

*To add an argument to the template of the sent reminder, go to the step settings and insert the generated argument in the desired place in the text:*

<figure><img src="/files/Ej3VEu4exuhg5NKVh8Jv" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
You can form any required argument by providing the Bot with the necessary instructions.
{% endhint %}
{% endstep %}

{% step %}
Next, you need to add instructions to the prompt that will tell the Bot to add dynamic follow-ups to the dialog and generate the necessary arguments.

{% tabs %}
{% tab title="Instructions for the bot based on our example" %}
When a client is successfully registered, call the notify\_customer function and pass three dates to it: the current date and time, the date and time 1 day before the scheduled meeting (event), and the date and time 2 hours before the scheduled meeting (event).
{% endtab %}

{% tab title="Instructions for forming an argument" %}
When a customer is successfully scheduled, create a {service\_description} argument using the name and description of the service the customer has scheduled and call the notify\_customer function, passing in three dates: the current date and time, the date and time 1 day before the scheduled meeting (event), the date and time 2 hours before the scheduled meeting (event), and the {service\_description} argument.
{% endtab %}
{% endtabs %}
{% endstep %}
{% endstepper %}

### Where to view scheduled reminders

You can see a full list of scheduled reminders for a specific conversation by going to the Chats section:

<figure><img src="/files/hBuE1pb3En2wD4lyXoMz" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Since our scenario calls for the first notification to be sent immediately after a client successfully books a session, when we open the list of scheduled follow-ups, we see two remaining scheduled reminders.\
**The first notification** has already been successfully sent to the chat.
{% endhint %}

## Canceling and changing a Dynamic Follow-Up

{% hint style="info" %}
When working with dynamic follow-ups, you may need to cancel already scheduled reminders—for example, when rescheduling an event, changing a meeting date, or canceling a service. There are two main ways to do this:
{% endhint %}

1. **Built-in option to remove old follow-ups when installing them.**

In the "Set Follow-Up" step settings, you can enable the option "**Delete all reminders associated with this step in the dialog when the step is activated.**"\
When this step is called again, all previously set reminders will be automatically deleted and replaced with new ones.

{% hint style="warning" %}
You only need to enable this setting in the first step, otherwise, during installation, all reminders except the last one will be deleted.
{% endhint %}

<figure><img src="/files/D3ocnbkNuHGe3h13s9ZJ" alt=""><figcaption></figcaption></figure>

**Pros of this approach:**

* Simplifies the scenario—no separate action is required for cancellation.
* Useful for scenarios with regular date changes (automatic replacement).
* Fewer setup steps.

**Cons:**

* Less flexibility—all reminders associated with a step are deleted, with no option to select individual reminders.
* Reminders cannot be canceled without setting new ones; it functions more like a reminder rescheduling feature.

2. **Using the separate "Undo Follow-Up" action**

In this case, a separate action is created in the Actions section, which is entirely responsible for deleting previously set reminders.

<figure><img src="/files/edukgM2jlTVBVhiHRHer" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/8CR6sR0jZl5PeME7iqNp" alt=""><figcaption></figcaption></figure>

Enable the **Cancel all follow-ups (Reminders)** function for the dialog.

<figure><img src="/files/8Dm1SARMeObzQeVt347R" alt=""><figcaption></figcaption></figure>

#### Fill in the name and description of the function.

<figure><img src="/files/cfK9olLCztfH4yc7vMfh" alt=""><figcaption></figcaption></figure>

#### Click Save

{% hint style="info" %}
In the main instruction, we write the following: When canceling reminders, call the cancel\_follow\_ups() function.
{% endhint %}

**Pros of this approach:**

* Full control: you can explicitly call cancel only when necessary.
* Clear script structure—cancel is not mixed with setup logic.

Cons:

* Requires an additional script step and separate call logic.
* Inconvenient for frequent transfers—you'll have to call two actions (cancel + setup).

{% hint style="success" %}
💡 Recommendation:\
For one-time cancellations or targeted deletions, use the separate "Cancel Follow-Up" action.\
To automatically move and replace reminders within a single scenario, enable the option to delete old reminders when setting new ones.
{% endhint %}
