How the template works
File processing
O ByteGPT automatically detects the message type. When there are files like stickers, audios or images, it is forwarded to a ChatGPT webhook. Salesbot applies a pre-configured prompt (change as you prefer) to interpret the content and then the result is sent to the Assistant webhook. This assistant is integrated with the chosen provider, such as Dify, OpenAI or Chatbase.
Message processing
Text messages follow a different flow within Salesbot. To provide similar functionality to version 1 of the Salesbot templates, ByteGPT, a message concatenator and an intent prompt have been incorporated.
Before forwarding the message to the Assistant, the Salesbot uses the intent prompt to identify relevant information. This verification occurs via the ChatGPT webhook, which analyzes the message and classifies it into pre-defined categories, such as:
- #Attendant – Request to speak to a human
- #Meeting – Interested in scheduling a meeting
- #Greeting – Initial messages like “Hello” or “Good morning”
- #General – Other types of interaction
This template is only using the category #Attendant to redirect the flow. When ChatGPT detects this option, Salesbot stops its operation. This is done through a conditional that checks if the return of the ByteGPT it is exactly #Attendant. Otherwise, the flow continues normally.
If ChatGPT identifies another option within the intent prompt, the customer’s original message is sent to the Assistant webhook. The Assistant then accesses the user-configured AI and responds according to the personalized prompts.
How to do
Changes will be made after the step we receive the message from the customer.
Step 1: Message Concatenator
To add the message concatenator, we will add two steps. It will be a pause and a set field step.

Pause: Wait for a new message, if nothing is received within 20 seconds, it moves on to the next step.
Set Field: Concatenates the field ByetGPT+ | Message Received with the customer's latest message.
These steps will be connected as follows:



Step 2: Intent Prompt
The intent prompt is a field definition step, in which we will pass instructions to ChatGPT to understand what to do with the customer's message.
We can change this prompt and add options as we wish.

This field will be connected in the pause, from the previous step.


Step 3: Request to ChatGPT
After defining the prompt, we will make a request to ChatGPT. At this point, we can copy some steps that already exist in our salesbot, indicated in the image below:

We will copy four steps, ChatGPT Webhook, API Control Condition, Control Pause, and Set Field. With the exception of the webhook, all other steps are control steps.
These steps will be connected as follows:






Step 4: Conditional step
After the ChatGPT Webhook and API control fields ByteGPT, let's add a conditional to check the return from ChatGPT.
In this example, we will identify whether the customer wants to speak to a human attendant.
In the conditional, we can add other examples that we put in the intent prompt.


Now, this is where a deviation in the flow will be created, in case the customer wants to speak to a human.


If this condition is not met, we will set the field ByteGPT + | Prompt with customer message and send to assistant webhook.


After that, the salesbot follows the flow normally, without changes, until the response.

