# Trigger Actions

### 1. Live Chat

It is used to initiate live chat with your available agent.&#x20;

* It will create a live chat request.&#x20;
* You can enter a text message to inform the user that the request has been triggered.&#x20;
* By clicking on "Manage Team," you will be redirected to the Team's Section, where you can assign roles and manage your team.

**Use Case:**\
In case you want to **connect the user with a live agent**, this component is used to initiate a live chat request.

{% hint style="info" %}
Do not set next message to "End Chat" after using the live chat component.
{% endhint %}

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FVTIlpSkQrpOkxVrHcGMo%2Fimage.png?alt=media&#x26;token=406051a4-a074-424f-bab2-08359b461801" alt=""><figcaption><p>Live Chat</p></figcaption></figure>

<details>

<summary><strong>Advanced Settings (Live chat)</strong></summary>

The **Advance** tab allows you to control how bot messages behave after they are sent. These settings help improve response handling, timing, and team collaboration.

***

#### Send Notification for the User Reply

**What it does:**\
When enabled, your team will receive a notification whenever a user replies to this message.

**Use this when:**

* You want agents to respond quickly to user messages
* The message expects an important or time-sensitive reply
* Live chat or human handoff is involved

**Example use cases:**

* Sales inquiries
* Support questions
* Appointment or order confirmations

✅ Recommended for flows that require human attention.

***

### Rephrase Messages

**What it does:**\
Automatically rewrites bot messages to sound more natural, conversational, or context-aware while keeping the original meaning.

**Use this when:**

* You want messages to feel less scripted
* You are using AI-assisted conversations
* You want tone consistency across the chatbot

**Important notes:**

* The core intent of the message remains unchanged
* Minor wording variations may occur
* Best used for friendly or conversational bots

⚠️ Avoid enabling this for legal, compliance, or fixed-copy messages.

***

### Manage Team

**What it does:**\
Allows you to manage which team members can receive notifications or take action when users reply.

**You can:**

* Assign specific agents to handle replies
* Control access to conversations
* Route replies to the correct team (sales, support, etc.)

**Use this when:**

* Multiple team members manage the chatbot
* You want clear ownership of conversations
* Live chat is enabled

***

### Add Delay (Seconds)

**What it does:**\
Adds a delay before this message is shown to the user.

**Why use a delay:**

* Makes conversations feel more natural
* Simulates human typing behavior
* Prevents message overload

**How it works:**

* Enter the delay time in seconds
* The message will appear only after the delay

**Best practices:**

* 1–2 seconds for short replies
* 3–5 seconds for longer or important messages
* Avoid excessive delays that slow down conversations

***

### When to Use Advanced Settings

Use **Advance settings** when you want to:

* Improve response handling
* Control message timing
* Involve human agents
* Enhance conversational quality

You can leave these settings unchanged if your flow is fully automated.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FhkPAPMPxGJ6V6B0bkMQM%2Fimage.png?alt=media&#x26;token=22fddd1e-17c1-41ed-94fa-57edb3b5d663" alt=""><figcaption></figcaption></figure>

</details>

### 2. If-Else Branch:

{% embed url="<https://youtu.be/0DOgguAEG-8?feature=shared>" %}

* Introduces logic-based decision-making in the chatflow.
* Branches the chat base**d on various parameters.**
* Users can set conditions by clicking **"Please choose one"** and selecting a decision rule.
* Additional If-Else branches can be added using the **"Add If/Else Branch"** button.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F9jcrVT8kF1KyIpj6k0w3%2Fimage.png?alt=media&#x26;token=462c1fa3-ab7f-427e-a77b-e7fba7f245bf" alt=""><figcaption><p>If/Else Branch</p></figcaption></figure>

* The available "**Condition On**" options include:

  * **Visitor Response** – Based on the response given by the user to the chat message.
  * **Custom Attribute** – Evaluates the values of custom attributes created by the user.
  * **Contact Property** – Includes standard properties such as name, phone number, email, etc.
  * **Chat Property** – Considers chat-based properties such as tags, status, or weekday.
  * **Team Availability** – Checks whether a team member is currently available of a particular team.
  * **Business Hour Availability** – Determines if the chat occurs within predefined business hours as specified by user.

* Conditions can be compared against **fixed values** using the following operators:

  * **Equals** (Exactly matches the given value)
  * **Not Equals** (Does not match the given value)
  * **Is Any Of** (Matches any value from a predefined list)
  * **Is Not Any Of** (Does not match any value from a predefined list)

* The value for comparison is entered in the final input box, where users can also incorporate dynamic elements (e.g., user name) or custom attributes by using the **"/"** symbol.

* Additionally, users can define OR conditions using the **"Add OR Condition"** option. This allows for multiple conditions to be evaluated, ensuring flexibility even if the first condition is false.

* Finally, users must **select the next message** to determine the chatflow's progression after a condition is met.

**Use Case:**\
In case you want the conversation to **change based on user input or conditions**, this component is used.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FIeZX7ooAwJI6kx6yRO4b%2Fimage.png?alt=media&#x26;token=fac77b5f-faa7-4fe5-96fd-a8ba77223987" alt=""><figcaption><p>Customizing If condition</p></figcaption></figure>

### 3. AI Agent (Previous ChatGPT)

It is used to trigger AI in chat flow.&#x20;

* You can enter the first message that will be sent before starting the AI-generated questions.&#x20;
* Select the number of queries to be resolved using AI.&#x20;
* If the query suggestion box is checked, you must provide up to 3 chat suggestions to be used initially.&#x20;
* After that, the AI Agent will provide query suggestions based on the prompt you enter.&#x20;
* You can also train your AI, and the query suggestions and replies will be based on that training.
* Integrate your preferred LLM directly from here using the "AI Provider Integration Required" box

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FEsA7VB84ZYDxl0mkbrU3%2Fimage.png?alt=media&#x26;token=45e15360-4194-4189-9055-e2d599b26901" alt=""><figcaption></figcaption></figure>

<details>

<summary><strong>Advanced Features (AI Message Settings)</strong></summary>

The **Advanced** tab gives you fine control over how AI messages behave, are tracked, and are delivered to users.

***

#### 🔔 Send Notification for the User Reply

When enabled, the system sends a notification whenever a user replies to this message.\
**Use case:**

* Alert support teams instantly
* Monitor high-intent or important conversations

***

#### ✍️ Rephrase Messages

Allows the AI to intelligently rephrase the message before sending it to the user.\
**Benefits:**

* More natural and human-like responses
* Avoids repetitive or robotic wording

***

#### 📧 Include in Email Transcript

Adds this message and the user’s reply to the email conversation transcript.\
**Use case:**

* Conversation history tracking
* CRM or support record keeping

***

#### 💡 Use Suggestions History for Default Suggestion

Uses past successful suggestions as the default response option.\
**Benefits:**

* Smarter AI replies over time
* Improved consistency based on real user interactions

***

#### ⚠️ Enable Disclaimer for AI Responses

Displays a disclaimer with AI-generated replies to set correct user expectations.\
The default disclaimer shown in the image is:

> *“AI can make mistakes. Check important info.”*

**Best for:**

* Legal compliance
* Transparency and trust

***

#### ⏱️ Add Message Delay

Add a delay (in seconds) before this message is displayed.\
**Benefits:**

* Creates a more human typing effect
* Improves conversational flow and realism

***

#### 🤖 AI Provider (LLM) Integration Required

This section indicates that an AI provider (such as **ChatGPT**) must be connected to use AI responses.

**What it enables:**

* Context-aware replies
* Natural language understanding
* Dynamic, personalized conversations

The **“Integrate Now”** button allows instant setup.

***

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F8Gin2wvgLkh8qwWDkNFS%2Fimage.png?alt=media&#x26;token=da290b3c-5727-485e-b2a4-fac9b90a1c57" alt=""><figcaption></figcaption></figure>

</details>

### 4. Redirect:

The "**Redirect**" component allows for the chat to be transferred between the several flows that the user makes:

* You can select the chatflow to redirect to through the drop-down menu and selecting the desired chat.
* Upon reaching this component, the chat will go to the starting point of the selected chat.

{% embed url="<https://youtu.be/lPplVf48lXA>" %}

<details>

<summary><strong>Advanced Features – Redirect</strong></summary>

The **Redirect** action sends users from the current step to another chat flow. The **Advanced** settings control how flexible and natural that transition feels.

***

#### 🔙 Allow Back

Allows the visitor to return to the previous step after being redirected.

**Why it’s useful:**

* Lets users recover if they enter the wrong flow
* Improves navigation in complex chat journeys
* Reduces frustration and drop-offs

***

#### ⏭️ Allow Visitor to Skip

Lets users skip the redirect and continue with the current flow instead.

**Why it’s useful:**

* Ideal when the redirect is optional
* Keeps users in control of their experience
* Prevents forced navigation

***

#### ⏱️ Add Redirect Delay

Adds a delay (in seconds) before the redirect happens.

**Why it’s useful:**

* Gives users time to read the last message
* Creates a smooth, human-like transition
* Avoids abrupt flow changes

***

#### 🔁 Seamless Flow Switching

When used with **If/Else Branch** or **User Reply**, Redirect can:

* Send users to the right flow automatically
* Handle FAQs, sales, or support separately
* Scale complex journeys without duplication

***

#### 🎯 Common Use Cases

* Redirect users to **Live Chat**
* Move users into a **product-specific flow**
* Route visitors based on intent or responses
* Send users to onboarding or checkout flows

***

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F3ptfiG4qbuq0er2cAbKG%2Fimage.png?alt=media&#x26;token=c1e05dda-48b2-4314-87eb-03be828bcb67" alt=""><figcaption></figcaption></figure>

</details>

### 5. Payment

The **Payment Component** allows your chatbot to collect payments from users directly within the chat flow. It provides a smooth and secure way to accept payments for products, services, subscriptions, or donations without redirecting users to external pages.

### Use case:

* Collect payments via supported payment gateways (Razorpay, Stripe, PayPal, etc.).
* Accept both one-time and recurring payments.
* Send payment links, invoices, or QR codes directly in chat.
* Track payment status (success, failure, or pending).
* Customize messages and instructions for a personalized experience.

### How to Use

1. **Add the Payment Component**
   * Open your bot flow in BotPenguin.
   * Drag and drop the **Payment** component where you want to collect payment.
2. **Select Payment Method:** Choose the payment service we are going to use. You have the option to choose between&#x20;

   * All Pay
   * RazorPay
   * Peach Payments
   * Telr Pay
   * Tilo Pay

   <div data-gb-custom-block data-tag="hint" data-style="danger" class="hint hint-danger"><p>Make sure to go to the third party integrations and integrate the chosen method in the bot as well! Else, the payment may through unexpected errors.</p></div>

   * Select Currency: Select the currency of you choice from the dropdown.
   * Payment amount: Enter the amount that needs to be paid. If the amount is variable, we recommend you create a custom attribute that takes in the amount form the user, and use that here.
   * Choosing Flows: Choose the flows to redirect to when the payment is successful and unsuccessful.&#x20;

   And that's it! Once you configured the payment gateway as well in the "Third Party Applications", you can start using the "Payments Component" just like any other component.
3. **Customize User Message**
   * Compose the message that will be sent to the user along with the payment request.
   * Example: “Hello \[User Name], please complete your payment of ₹500 to confirm your order.”
4. **Set Payment Actions**
   * **On Payment Success**: Define what happens after a successful payment (e.g., send a confirmation, trigger next component).
   * **On Payment Failure**: Set fallback actions (e.g., retry, notify admin, or provide alternative instructions).
5. **Test Your Payment Flow**
   * Test your chatbot using sandbox mode or real accounts to ensure payments are processed correctly and confirmations are sent.

{% content-ref url="../../../whatsapp-bot/manage-chatflow/components-in-chatflow/whatsapp-payment-components" %}
[whatsapp-payment-components](https://help.botpenguin.com/bots/whatsapp-bot/manage-chatflow/components-in-chatflow/whatsapp-payment-components)
{% endcontent-ref %}

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FS11JpNQLWAm6AhxjO4Er%2FScreenshot%202025-12-23%20at%201.07.32%E2%80%AFPM.png?alt=media&#x26;token=71ec73ea-cc2f-4b39-8a22-2a6d0a598725" alt=""><figcaption></figcaption></figure>

<details>

<summary><strong>Advanced Features – Payment Component</strong></summary>

The **Advanced** settings let you control how this message behaves, how it’s tracked, and how it interacts with other system features.

***

#### 🔔 Send Notification for the User Reply

When enabled, a notification is triggered whenever the user replies to this message.

**Why it’s useful:**

* Alert admins or agents about user activity
* Monitor high-intent messages (pricing, payments, onboarding)
* Improve response time

***

#### ✍️ Rephrase Messages

Allows the system or AI to intelligently rephrase this message before sending it.

**Benefits:**

* Makes messages sound more natural
* Reduces repetition across conversations
* Improves overall conversational tone

***

#### 🧾 Map Order Attributes

Maps user input from this message to order or transaction attributes.

**Why it’s useful:**

* Capture payment-related details
* Store structured data (location, plan type, preferences)
* Enable seamless checkout or order processing

***

#### ⏱️ Add Message Delay

Adds a delay (in seconds) before this message is displayed to the user.

**Why it’s useful:**

* Creates a human-like typing pause
* Improves message readability
* Makes conversations feel less robotic

***

#### 🔗 Works with Other Flow Actions

When combined with **Payment**, **Redirect**, **If/Else Branch**, or **Assign Chat**, this message can:

* Collect data before payments
* Route users intelligently
* Trigger automated actions

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FcNvETQwTvK0u28Egv6F3%2Fimage.png?alt=media&#x26;token=2e01b9b3-6a3f-4d2d-8902-0e0bf312b748" alt=""><figcaption></figcaption></figure>

</details>

### 6. Whatsapp Payment

The **WhatsApp Payment Component** allows your chatbot to collect payments directly from users within WhatsApp. This enables seamless transactions without redirecting users to external websites, improving conversion rates and user experience.

**Use Case:**&#x20;

* Collect payments via supported payment gateways integrated with WhatsApp.
* Send payment links or QR codes directly in chat.
* Track payment status in real-time.
* Customizable messages and instructions for users.
* Supports multiple currencies (depending on your payment gateway setup).

### How to Use

### Adding a Whatsapp Payments step <a href="#adding-a-whatsapp-payments-step" id="adding-a-whatsapp-payments-step"></a>

1. In the left panel, open the Trigger Action section.​
2. Drag the “Whatsapp Payments” block into your flow where you want to ask for payment.​
3. Place it after any message that explains the product, price, or offer so users know what they are paying for.​

### Customizing the payment message <a href="#customizing-the-payment-message" id="customizing-the-payment-message"></a>

* Click the “Whatsapp Payments” block in the middle canvas to open its settings on the right.​
* In the Message field, type the text you want users to see (for example, “Complete your payment to confirm your order”).​
* Optionally add an image URL or upload an image (like a product photo or logo) to show with the payment message.​

### Linking a payment configuration <a href="#linking-a-payment-configuration" id="linking-a-payment-configuration"></a>

1. In the right panel, open the “Select Payment Configuration” dropdown.​
2. Choose the payment configuration you have already set up in BotPenguin (gateway, amount logic, etc.).​
3. This configuration controls how the payment link or button is generated and processed inside WhatsApp.​

### Routing after payment <a href="#routing-after-payment" id="routing-after-payment"></a>

* Use the “Go to next message” dropdown (bottom-right panel) to pick what message the bot should send after this payment step.​
* Typical next messages include: order confirmation, failure/retry instructions, or a thank-you message.​

{% content-ref url="../../../whatsapp-bot/manage-chatflow/components-in-chatflow/whatsapp-payment-components" %}
[whatsapp-payment-components](https://help.botpenguin.com/bots/whatsapp-bot/manage-chatflow/components-in-chatflow/whatsapp-payment-components)
{% endcontent-ref %}

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F06WjdbErxrHMvYfZz5jj%2Fimage.png?alt=media&#x26;token=abbd178f-5009-4784-b48c-75bb6bb8830f" alt=""><figcaption></figcaption></figure>

<details>

<summary><strong>Advanced Features – Whatsapp Payment Component</strong></summary>

The **Advanced** settings let you control how this message behaves, how it’s tracked, and how it interacts with other system features.

***

#### 🔔 Send Notification for the User Reply

When enabled, a notification is triggered whenever the user replies to this message.

**Why it’s useful:**

* Alert admins or agents about user activity
* Monitor high-intent messages (pricing, payments, onboarding)
* Improve response time

***

#### ✍️ Rephrase Messages

Allows the system or AI to intelligently rephrase this message before sending it.

**Benefits:**

* Makes messages sound more natural
* Reduces repetition across conversations
* Improves overall conversational tone

***

#### ⏱️ Add Message Delay

Adds a delay (in seconds) before this message is displayed to the user.

**Why it’s useful:**

* Creates a human-like typing pause
* Improves message readability
* Makes conversations feel less robotic

***

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FZekyPMxDzNNSWwGohWoY%2Fimage.png?alt=media&#x26;token=2df09b84-620d-460d-b669-caf9547c0768" alt=""><figcaption></figcaption></figure>

</details>

### 5. Assign Chat

{% embed url="<https://youtu.be/B-XqhecC-sg?feature=shared>" %}

It is used to automatically assign live chat request among team members.&#x20;

* You can either assign the task to a team member by selecting their name.

&#x20;                           or

* &#x20;You can assign it by department, select the department, and set the assignment logic to "Round Robin," where each team member will be automatically assigned a live chat request one by one in a round.&#x20;
* You can choose not to assign tasks to offline agents and assign them only during business hours.

**Use Case:**\
In case you want to **automatically assign live chat requests** to team members, this component is used.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2FZ4KDnWSqaggwairj5i6l%2Fimage.png?alt=media&#x26;token=769b4e0b-e825-4dbf-8ff1-89a55b0c61ef" alt=""><figcaption><p>Assign Chat</p></figcaption></figure>
