Skip to content
FacebookYouTubeX (Twitter)

Reply Action

The “core” of conversational automations

Reply Action Overview

The Reply action is the “core” of conversational automations in Pingstreams. It helps you correctly reply to users, creating what is perceived as the end-user UI on their chat application. The Reply Action can send different types of content to users - some non-interactive like simple text or images, and others interactive like buttons or carousels. It can also send multimedia content like videos or (depending on the channel) entire small web applications contained within an iframe.

Consider that all components sent to users can adapt automatically to the channel being used for chat. For example, WhatsApp chats only support up to three buttons, but if you send more than three buttons, the reply automatically adapts the conversation to show buttons with a pop-up menu instead of individual buttons. Some channels don’t support buttons at all (i.e., SMS), and the Reply action makes an additional effort to create solutions for you, such as auto-creating a numbered menu with all the options.

Let’s explore how the Reply action works in Pingstreams.

When you work with replies (and other Actions), you’ll always have two different “views” of the action:

  • Action preview
  • Action editor

The Action preview represents a synthetic view of the action inside the stage. It’s very useful for getting a good understanding of the whole flow when you have many blocks. Some action previews, like the Reply Action itself, are also interactive. For example, you can easily create and connect a button directly from the preview without needing to open the editor.

The Action Editor represents the detailed view of the action and allows you to edit and set up your actions with all the needed and supported details.

Action Editor View

If you want to reply with simple text, the default Reply dragged onto the stage is ready for the task. You only need to fill out the text field with your desired phrase:

Text Reply Configuration

Let’s test it!

Text Reply Test

We get our text as the welcome message.

Adding an image to your reply is very easy. Simply use the toolbar and click on the image icon. An image component will appear in the reply. You can now set up your image by uploading it directly from your device.

Image Setup

Setup your image:

Image Configuration

Test it again. Your image displays in the welcome message:

Image Test Result

Now we have our image following our text.

Buttons, also known as Quick replies, are a main element in user interaction. They provide users a quick way to reply to your chatbot. You can add one or more buttons attached to reply elements (text, images, frames, etc.).

Buttons can perform three main actions in Pingstreams:

  • Move to another block
  • Send a predefined text
  • A clickable web URL shaped like a button

You can add a button in two main ways:

  1. Adding a button from the Reply action editor
  2. Adding a button from the preview

Adding a Button from the Reply Action Editor

Section titled “Adding a Button from the Reply Action Editor”

When in the editor, you can easily add a button by pressing the ”+ Add button” placeholder below the selected element. In this example, we’ll add a button attached to the welcome message.

Add Button Editor

As soon as you click, a button is added with basic prefilled text “Button”. You can change the button text by clicking on it. The button detail editor appears, where you can choose the text of your button and its type. We’ll discuss button types later. For now, we’ll change the button name to “Support” (an ideal button that can move the user to another “Department”). We can leave the standard type “text” for now, which means the button text will be sent back to the chatbot when the user clicks it.

Button Configuration

Let’s see this in action by pressing the Test button:

Button Test

The button appears following the text reply. If you press the button, you’ll get a default “not understanding” message because no blocks were trained with the text sent by the button, and the defaultFallback block is automatically executed.

Button Default Response

Now let’s add a new reply action on the stage and connect it to the button. Open the Actions menu on the left and drag the action onto the stage:

Drag New Reply Action

New Block Created

As soon as you release your mouse button, a new block is placed on the stage with a Reply action inside. We can customize the action with a welcome message for the Support department:

Support Block Configuration

To connect the button to the block, simply click on the Support button. The button detail editor will open:

Button Detail Editor

Change the button type to “go to block” from the Type selector. The “Go to block” selector appears. Find the destination block from the list. In our case, it’s “Support flow”.

Go to Block Selection

As soon as you choose the destination block, an arrow appears on the stage connecting the button directly to the block.

Connected Button Flow

Running the flow, we get the block replying with the configured text as soon as we press the Support button:

Final Button Flow Test

You can easily add a button directly from a reply action on the stage. Press “Add button” directly and a button will be added. You can then connect the button to your desired block by clicking on the small button tag on the left and dragging the row to the selected block.

Add Button from Preview

Once connected, you can set up the button name by clicking on it, using the button editor that will appear on the right of the stage:

Button Editor Panel

You can dynamically render your buttons using JSON. This feature is useful when you don’t know your buttons at design-time and need to render them based on, for example, a Web Request action reply.

Pingstreams supports many types of buttons:

  • Action buttons: used to directly connect to a block
  • Text buttons: these buttons simply mimic the end-user typing some text. It’s up to the flow to manage the text reply
  • URL Buttons

You can configure buttons using basic JSON structure. Here’s an example of an action button that directly connects to a block using the block name. Once you connect the button to the block, be careful when renaming the block title, because the button will not work anymore.

JSON Button Configuration

For fast prototyping purposes, it’s useful to know that your static buttons become grayed out while you have JSON Buttons active. This is helpful if you want to see a graph with some connectors active, despite the fact that those connectors will be later dynamically rendered using the JSON Buttons section:

Static Buttons Grayed Out

You can also use attributes to render JSON Buttons. Attributes can be set in a Code Action or a Set Attribute action:

Set Attribute for JSON Buttons

Once you define your JSON, you can render your buttons in the JSON Buttons section using your attribute:

Render JSON Buttons with Attributes

If your attribute is a real JSON (not a stringified JSON), don’t forget to use the JSON modifier (we use LiquidJS to render attributes):

JSON Modifier Usage

A gallery in Pingstreams (aka Carousel) is an interactive message made up of a sequence of scrollable “cards,” each containing an image, title, description, and action buttons.

Carousel Example

It’s especially useful in contexts like e-commerce (i.e., Shopify) because it allows you to showcase multiple products or options in a compact way, helping customers make choices without leaving the chat.

With a carousel you can:

  • Quickly present a selection of featured products
  • Suggest related items during customer support
  • Guide users toward purchase with buttons that link directly to the product page or add items to the cart

Static carousels are useful as a prototype tool. You can configure them quickly to showcase simple demos of your e-commerce agents to clients. If you’re getting dynamic lists of products and want to use a carousel, you must use a dynamic carousel (JSON Gallery).

Static Carousel Setup

Press the Gallery button on top of the Reply components toolbar:

Gallery Button

You can now add cards with preview, description, and buttons of various types:

Add Gallery Cards

Getting the following as final result:

Gallery Final Result

Once you add a Gallery element, press JSON gallery:

JSON Gallery Button

Now you have a text box where you can fill out your Dynamic JSON using the carousel’s JSON syntax to dynamically render the product cards in Pingstreams:

Dynamic JSON Configuration

The syntax has the following general specification:

[
  {
    "preview": {
      "src": "Your card image URL"
    },
    "title": "The card title",
    "description": "The card description",
    "buttons": [] // the buttons array, follows the JSON Buttons syntax
  }, 
  {...}
]

First consider that the cards list is a JSON array, so all the cards are embedded between [ ... ].

It’s important to note that the buttons section follows the JSON Buttons syntax.

Pingstreams extensively supports LiquidJS syntax in text sections, and so does the JSON Gallery section. Here’s an example with LiquidJS supporting a products list iteration rendering cards on the fly:

[
{% for item in results limit:10 %}
{
  "preview": {
    "src": {{item.imageURL | json}}
  },
  "title": {{item.name | json}},
  "description": {{item.description | json}},
  "buttons": [{"type": "url","value": "Buy","link": {{item.imageURL | json}}}]
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]

Filters are a special way to hide/unhide specific sections of a Reply Action based on flow attribute values.

You can use Filters to reduce the number of branches in the flow by simply building a Reply that automatically adapts the shown content based on the values of some attributes.

A good use case to understand Filters is for Multi-language support. You can create a single Reply “serving” multiple languages. When the multi-language use case is not too complex, you can approach a viable solution with Filters.

Multi-language Filter Example

Advanced Reply is a new Action developed to provide more control over the flow.

Advanced Reply

With Advanced Reply you have:

  • User Input timeout
  • Check on buttons matches the user input
  • No input handling

If the user doesn’t reply within the specified amount of time, you can take a specific action. This is extremely useful when, for example, you want to close a conversation after some inactivity period. A real game changer option for managing your conversation flows with your AI-agents.

No Input Configuration

We introduced the No match connector allowing your users to reply not only by clicking on a button but also by writing text inside. This is extremely useful especially on WhatsApp (or other external channels) where the user sometimes prefers to reply to a question by writing text instead of clicking the button.

With the new Reply you can also take a specific action when written text doesn’t match any of the buttons’ text. You can use the “no match” connector to manage this case with a specific flow.

No Match Configuration

If you have questions about the Reply Action or other Pingstreams features, feel free to send an email to support@pingstreams.io or leave us feedback.