Smax.bot

Step 1: You create 2 blocks on Smax in which 1 block will include the lucky spinner and 1 block will return customer information from the lucky spinner.

Lucky Spinner block
Confirm Info block

Step 2: On botplus.io you access to the Push data menu then select "Create New Platform" and select SmaxBot in the drop-down menu..

Step 3: Connection config

Name: Name of the connection setting

BotID: BotID get from Smax.bot

Bot Token: Bot Token get from Smax.bat

Block ID: ID of the block will return customer information after they play lucky spinner.

Data Fields: Data fields to push back from the bot

To fill in the Bot ID, Bot Token, Block ID information fields, please see the next step.

Step 4:

To copy Block ID you copy the number as shown in Pic 1 (after the ?Id =)

Then you turn off Block VQMM and click on number 2 to copy Bot ID, number 3 to copy Bot Token

After finish you go back to step 3 to fill in the configuration form

Step 5: Configure data transmission on botplus.io

In the configuration table in the Push Data section, select Add Field to add the data fields sent to SmaxBot

Select the Control Name section and you will see the data fields that are created during the process of building the form. And the default fields for example: Gift_id, Gift_name, ....

The Control Name column is the column of the variable name you obtained in the form, and the Attr Name column is the column of the attribute name you want to sent to the bot.

Step 6: Declare information for ConfirmInfo block

Enter the Attribute Name you entered in step 5 in the confirm Data field

Step 7: Lucky Spinner Url's config

Go to Menu URL Address (1) and select User free domain

Note:

  • You can edit the items in the free domain to nicer. Eg: botiosmax.botplus.asia/luckyspinner

  • Bạn có thể sá»­ dụng Use own domain để sá»­ dụng domain riêng cá»§a bạn VD vqmmtest.vn

Click Update, then click on item 3 to copy the link for Smaxbot (the link in the URL above is used when you want to run the web without embedding it in the chatbot).

Step 8: Add turns to spin

1. At Lucky Spinner block you choose Json API then choose POST protocol

2. Copy the url from Step 7 and don't forget to add secret to the url

3. Next choose Body. From here you can choose Json or Params

  • If you choose Json then you can insert the code as below. Which "turnNumber" is the turn of the lucky spinner.

  • If you choose Params, you add turnNumber to the name and add the number of spins to the value.

Step 9: Link lucky spinner to button.

In the text in the Lucky Spinner block you select Add new button (you can use the Gallerry tag or the Media tab)

You enter the name of the button (eg: Spin) then select the URL tab and paste the copy url in step 7.

Click outside, you will see a line that is Add https://botiosmax.botplus.asia into ..... You click on, the purpose to add domain to the list so that webview can turn on the popup form at messenger.

Step 10: Testing

Create a ref link to test if the bot works OK (see how to create a reflink here)

Messenger will display a message and a button to open the botgame

You open the plug-in and test the spin to see your luck

Next, you fill out the information in the customer information section

Submit your information then bot will announce your gift, your remaining spin, and your information.

Last updated

Was this helpful?