With the integration and processes inside GetCourse, it is possible to send information about the subscriber and his order from GetCourse to BotHelp in order to interact with the subscriber through the bot.

General description of the scenario

The integration of GetCourse and BotHelp, configured according to this scenario, will automatically exclude subscribers from closed Telegram groups or chats if they have not renewed their subscription to GetCourse.

Assumptions under this scenario

  • The subscription is issued for a long period, so the configured process will be started manually at the right moment.
  • We believe that the subscriber is already a member of a closed Telegram group and has previously paid for a subscription.
  • An offer for the first subscription has already been created in your GetCourse account, which prompted the subscriber to place an order.

The main stages of the process

  1. The deadline for paying for the next subscription to a private chat/group in Telegram is approaching.
  2. The subscriber does not renew the subscription for some reason.
  3. In GetCourse, a process is started that verifies that the participants have a paid subscription.
  4. For anyone who has not renewed their subscription, a special bot is launched in BotHelp from the GetCourse process.
  5. This bot excludes such subscribers from a private chat/group in Telegram.

Setting up a funnel in BotHelp

1. Creating and configuring a bot

  • Create a bot for the telegram channel.
  • Add the “Action” block.
  • Select the “Exclude from group/Channel” action type.
  • Specify the ID of your private group from which you want to remove the subscriber.
    • For more detailed instructions on working with groups and channels in Telegram, follow the link.

  • If necessary, you can send a message or add a tag.
  • The result is such a simple bot:

2. Receiving data for further integration settings

To further configure the integration, you will need:

  • Get a Ref of the created bot.
    • Stay in the currently open bot editor window.
    • Click on the settings button, the gear, in the upper-right corner.
    • Click on the “Settings” sub-item.
    • In the window that opens, expand the “Advanced Settings”.
    • At the very bottom of the window that opens, find the field with the name “Bot Ref” — the ID of this bot.
    • Copy/write it down. It will come in handy later.

  • Get the Ref of the step.
    • Stay in the currently open bot editor window.
    • Switch to the bot’s edit mode by clicking Edit in the upper-right corner.
    • Open the edit panel for the first step of the created bot.
      • In our example, this is step “Action 1”.
    • The ref of the step is displayed at the top of the panel under the step name, which is the identifier of the current step.
    • Copy/write it down. It will come in handy later.

  • Get the BotHelp SecretKey.
    • Go to the “Settings” section in the navigation bar of your cabinet.
    • Open the “Integrations” tab.
    • Find the GetCourse block and click Add Integration.
    • Copy/write the received BotHelp SecretKey. It will come in handy later.

Configuration steps in GetCourse

1. Product Creation

  • Go to the “Sales” — “Products” section and click Add Product.
  • Give the product a name.
  • Set the price of the offer.

  • After saving the product, go to the “Offers” tab and open the created offer (its name matches the product name).
  • Make sure that the “Complete order automatically upon receipt of payment” checkbox is active for the offer.
    • For this offer, orders will automatically switch to the “Completed” status after payment is received.


2. Creating a process

  • Go to the “Tasks” — “Processes” section and click on the Create Process button.
  • Specify the process name.
  • Select the “Users” object type.
  • You don’t need to specify anything in the “Template” field, leave the “without template” option.
  • Click on the Create button.

3. Process Setup

  • In the settings of the created process, in the “Bulk task creation” section, select “Once after startup”.
    • In this case, the created process will be started only once — immediately after startup.
  • In the rules for entering an object, set the following logic:
    • The user already has a paid subscription for the previous period.
    • The user does not have a paid subscription for the current period.

4. Creating process logic

  • In the settings of the created process, go to the “Process” tab to configure the logic of the process itself.
  • Add the “Operation” block.
    • Specify the block name.
    • The block must work according to the User.
    • Select the operation type “Call URL”.
  • In the block settings, select the “POST” method.

  • Insert a link in the URL column:
https://gc.bothelp.io?domain_name={%Your domain is in Bothelp%}&token={%Your SecretKey from the BotHelp cabinet%}&email={object.email}&phone={object.phone}&actions[run_bot]={%Ref of your bot%}&actions[step_ref]={%Ref of your bot's step%}
  • Important!
    • In the domain_name column, instead of the text {%Your domain in Bothelp%} you must specify the domain of your account in BotHelp. The curly brackets {} and % signs must be removed. The final record will be in this format: domain_name=mybhaccount.
    • In thetokencolumn, instead of the text {%, your SecretKey from the BotHelp cabinet%} you must specify the BotHelp SecretKey from the integration settings of your account (see the first section of this instruction). The curly brackets {} and % signs must be removed. The final record will be in this format: token=qwerty123456.
    • In theactions[run_bot]column, instead of the text {%Ref of your bot%}, you must specify the Ref of the bot to which you want to add a subscriber (see the second paragraph of this instruction). The curly brackets {} and % signs must be removed. The final record will be in this format:actions[run_bot]=c123456789.
    • In the actions[step_ref] column, instead of the text {%Ref of your bot’s step%}, you must specify the Ref of the bot’s step to which you want to add a subscriber (see the second paragraph of this instruction). The curly brackets {} and % signs must be removed. The final record will be in this format: actions[step_ref]=f987654321.
    • An example of a ready-made link:
https://gc.bothelp.io?domain_name=mybhaccount&token=qwerty123456&email={object.email}&phone={object.phone}&actions[run_bot]=c123456789&actions[step_ref]=f987654321
  • Why this link?
    • Using this link, GetCourse sends data about the subscriber and the type of action so that BotHelp can perform the specified action with the selected subscriber.
    • This link contains the necessary information about the subscriber and the action:
      • email — email address of the subscriber. According to it, BotHelp finds a specific subscriber in its database. This is a required field for email identification.
      • domain_name — the name of your account in BotHelp. Using this field, BotHelp understands which cabinet to look for a subscriber with such an email. This is a required field.
      • token — the secret key of your BotHelp account, which ensures the security of the integration. This is a required field.
      • phone — the subscriber’s phone number. BotHelp can also use it to find a specific subscriber in its database if there are several of them in the mail. This is an optional field.
      • actions[run_bot] and actions[step_ref] — the parameters that indicate the “Add to bot for a specific step” command. The parameter values specify the IDs of the bot and its step to which you want to add a subscriber.
        • actions[run_bot] — a required field.
        • actions[step_ref] — an optional field. If this parameter is not present, the bot for the subscriber will be launched from the “Start” step.
  • Save this block.
  • Add the “Process Completion” block and extend the links between the blocks.
  • The final process should look like this:

  • Ready! On the “General” tab of the created process, activate the “Approved” checkbox.
  • When ready, click the big green Start button — the process will start and run once.

If you haven’t found the answer to your question, ask it to us in the chat room or write to hello@bothelp.io😃

Get 14 days of full functionality of the BotHelp mailing list, autowork, and chatbot platform.

Get 14 days for free

Была ли статья полезна?

0/400
Спасибо за обратную связь!