Skip to main content

Mini Program Module

Introduction

The Mini Program Module enables you to embed any existing web application or website directly within the chat. It also allows data exchange between the chatbot and the embedded application via API.

Typical Use Cases

Use this module to link customers to a web application within the chat for providing specialized information or services.

How to Use the Module

URL

Specify the URL of the mini program you want to embed.

Wording

Choose the text that will appear on the mini program button.

Options

  • Open automatically: Determines if the mini program should open automatically.
  • Hide footer: Option to hide the chat's footer when the mini program is displayed.
  • Wait at mini program: Prevents further steps until the mini program is closed.
  • CTA (Call to Action): Text on the mini program button or optionally an image to represent the CTA.

JavaScript Integration

Mini programs can interact with the chatbot by setting process variables and closing the mini program through JavaScript. For example:

parent.postMessage({ action: 'setVariables', variables: { somekey: 'value' }, continue: false }, '*');

This will create a process variable named somekey_b48bb83d_dde3_463c_816a_1665686e6d52.

To close the mini program via JavaScript:

parent.postMessage({ action: 'close' }, '*');

Limitations

Some websites have security settings that prevent them from being embedded on other pages. This is intended to prevent phishing and similar attacks. Mini programs can only function properly when the chatbot is running on the same domain as the website being embedded.

Other Texts

  • Title of mini program message in Facebook: Define the title for the mini program message when displayed on Facebook.