In this article we will explore each step of the Template (Salesbot) ByteGPT and understand each part.
We will start with a schematic of the template, which represents the overview of the flow, with the main steps and the two fictitious zones from which Artificial Intelligence operates, being the steps in which ChatGPT operates and those of the Assistant.
1. This is a Template: In other words, it is not a ready-made flow for your business. As it is a template, you can change and customize it according to your business and needs.
2. Duplicate your template (salesbot): Preserve the original template and leave it to be the replicator for new salesbots that you need.
3. Functional test of the ByteGPT: If your salesbot is not operating correctly, run a test run using the original salesbot template. ByteGPT first. This will help check if the problem is in the ByteGPT or in some specific configuration of your salesbot.
4. There are two Webhooks: One for ChatGPT (internal actions) and one for GPT Assistant (responses to customers).
5. Intent Analysis: We left options in step 184, so that ChatGPT can identify the intent of the message. Add or change depending on your business. You can also use this step for actions other than intent. Intent was just one example. You can also remove this action (see below in the “About ChatGPT and Assistant in Salesbot” section).
6. Intent Check: Intentions are checked and redirected as necessary, in step 201. We have provided an example, but you must provide your options, depending on your business.
7. Flow Diversion: The flow can be adjusted based on the identified intent (step 201).
8. Update fields in reinstallations: New fields are added with each reinstallation. The most recent fields are always the current ones, so make sure you always use the latest template available. In the widget, there is a list of active fields.
9. Specific prompts: you can adapt your prompts, throughout the salesbot, according to your needs.
10. The solution depends on you: Remember, the ByteGPT is a connector that connects AI Assistants, ChatGPT etc to your Kommo. It's a tool. Therefore, success will depend on building your flow, structuring the solution for your business.
First of all, it is important to know that the salesbot “ByteGPT+ Template” comes with two webhooks, related to Artificial Intelligence, one for the Chat GPT (GPT-4o) and another for your Assistant (with your company data and model defined by you), connected to this salesbot or template.
Let's understand the role of each one in the salesbot:
Chat GPT
- The ChatGPT Webhook is at Step 187.
- ChatGPT in salesbot is used for internal actions and functions, such as identifying intentions of messages received from users, analyzing, validating, extracting data and whatever else you want to do.
- Does not send messages to customers (unless you change this).
- You can use the ChatGPT result to infer conditions, change flow routes, define values in CRM fields, etc.
- It is unrelated to your GPT Assistant, so it is not impacted by the Assistant's instructions or files.
- It reacts to the internal prompt, in the salesbot, from step 184, or from other steps that you define.
- The default model is GPT-4o. See how to change here.
- If you do not want to use or do not need this ChatGPT in your flow and want to keep just the assistant, connect step 219 (Pause step) directly to step 210 (with the “ByteGPT+ | Prompt”).
- If you want to delete the ChatGPT steps, you can delete the steps: 184, 187, 189, 191, 204, 201, and 171.
Assistant
- The GPT Wizard Webhook is at Step 50.
- The Assistant in the salesbot is used for personalized service and sending responses to the customer.
- It is responsible for generating messages via GPT and sending them to the client.
- It is directly related to your GPT Assistant (such as Assistants from Open AI, Dify, Chatbase, etc.) and is impacted by the instructions or files in this Assistant. It has no relation to the native resource of Kommo AI (suggested answers), as they are different resources and independent of each other).
- It can also react to internal prompts, in the salesbot, if you define or edit it in step 210, being able to increase the message received or make other adaptations. However, it is worth noting that it is not directly related to the prompt in step 184 (related to ChatGPT).
- The GPT model used is defined directly in your Assistant, externally (like in OpenAI, the Assistants area, for example)
- If you do not want to use or do not need this Assistant in your flow and want to keep only ChatGPT (for internal actions or responses given by it), you could exclude the steps: 210, 50, 59, 209, 212, 213, 80, 51 (if you want ChatGPT to respond to something, you may need this), 228, 224, 215, 216, 226, 218, 217.
With these two webooks in use, 2 requests to the API are consumed ByteGPT. Each time a webhook is triggered, 1 request is counted.
To directly activate the ByteGPT When starting a conversation from the lead card, follow these steps:
- Access your salesbot flow on Kommo.
- Connect “Start Robot” directly to step 144, which sets the “Message received” field to “customer message”.
- In your account Kommo, in the table with the Salesbots list (Settings > Communication tools), select the conversation trigger “When conversations are started by an incoming message on any channel”.
For visual guidance, watch the video at minute 28:00 via this link:
Here is an example of the process:
- Clone the template ByteGPT to preserve the original.
- Make your customizations in the copy.
See explanation of the Template ByteGPT in detail, with each step.
If you need further assistance or want to schedule a meeting, activate the chat at the bottom and to the right or schedule a call via link to schedule.
Overview
1. User Message Reception:
– When a message is received from the user, it is recorded in the “Customer Message” field (ByteGPT+ | Message received), in step 144.
2. Defining the Intent Prompt:
– The received message is inserted into a pre-defined prompt in the step 184. This prompt is used for intent analysis, seeking to identify whether the message is related to attendant, meeting, greeting or general.
3. Submission to ChatGPT Webhook:
- Na step 187, the intent prompt is sent to the ChatGPT webhook.
– The system enters a 5-second loop to wait for ChatGPT’s response, in which case step 189. It is important to maintain at least 5 seconds.
4. Intent Check:
– When the response is received, it is checked in the step 201 (Intent Conditions), to see if it matches any of the defined intents (attendant, meeting, greeting, general), referring to step 184 of the intent prompt.
– If an intent condition is satisfied, the flow continues as defined for that specific intent.
5. Flow Diversion:
– If one of the conditions is met (Yes), and if the intention is, for example, “#Attendant”, the flow will be diverted to other specific steps where various actions can be performed, including opening response options or even stopping the flow.
- It is possible and recommended to edit the intent prompt to include more options.
6. Assistant Response:
– If none of the intent conditions are met, the flow proceeds to the step 50, where the assistant webhook processes the response.
- Na step 51 (GPT Response), the assistant responds to the user using a generative response based on GPT artificial intelligence.
7. Interaction Cycle:
– After responding, the system returns to step 9, waiting for a new user interaction, creating a continuous cycle of “question, analyze, answer”.
Yes the ByteGPT can interpret images and pass a specific prompt to your salesbot.
You can create a condition after step 201 (which in our case is 233) and add a condition to the field ByteGPT+ | LOG.
If it contains #image, you can pass a specific prompt in the next step (235, in our flow), asking you to analyze the image, passing a specific prompt or requesting whatever is necessary.
In this example, the prompt (ByteGPT+ | Prompt) in step 235 has just one period (.), as an example.
Detailed description of the Salesbot Steps
At each stage there is also Editing icons, with the same colors, which represent where you can or cannot edit, following the same reasoning as the colors mentioned above.
Legend of Editing icons
🢢 Green (Can edit): Steps that can be freely edited or deleted if necessary. (Ex.: Messages, custom prompts).
🟡 Yellow (Be careful when editing): Steps that we recommend editing carefully if you know what you're doing. Recommended for when you want to make a different flow and need to delete or change it. So don't change if you don't master your flow well.
🔴 Red (Do not edit or delete): Essential steps that should not be changed or deleted. (Ex.: System checks, internal notifications)
Salesbot Steps
Below we will describe each step, its role and comments about it, so that you can understand the entire flow.
🟡 Step 81 - Define Field
Define lead: ByteGPT+ | Answer Received?: Empty
This action sets the field “ByteGPT+ | Answer Received?” to empty, as this is a control field that the API uses to send a GPT message. When the API ByteGPT sends messages, it changes to “Full”. In this step 81, we leave it empty to ensure that it is suitable to receive the next message.
🟡 Step 9 - Pause Response
Until the message received
This is a pause field that waits for the user's first message.
Start the ByteGPT for any new conversation
To directly activate the ByteGPT When starting a conversation from the lead card, follow these steps:
- Access your salesbot flow on Kommo.
- Connect “Start Robot” directly to step 144, which sets the “Message received” field to “customer message”.
- In your account Kommo, in the table with the Salesbots list (Settings > Communication tools), select the conversation trigger “When conversations are started by an incoming message on any channel”.
For visual guidance, watch the video below:
Here is an example of the process:
- Clone the template ByteGPT to preserve the original.
- Make your customizations in the copy.
See explanation of the Template ByteGPT in detail, with each step.
If you need further assistance or want to schedule a meeting, activate the chat at the bottom and to the right or schedule a call via link to schedule.
🔴 Step 144 - Define Field
Set lead: GPT | Message received: Message from the customer
The customer message is received and stored in the “GPT | Message Received".
This step is crucial as the recorded message will be used later in the intent prompt.
If the user sends multiple messages, they can be incremented and accumulated in this field. This process will be further detailed in step 221.
❗We do not recommend editing this field
🟡 Step 219 - Pause
Stopwatch: 0 hours 0 min 20 sec
Until the message received
- Description: At this stage, there is a pause of 20 seconds or until a new message is received, whichever comes first.
- Process Details:
- The customer message is received in step 9.
- The message is logged in the field at step 144.
- If the user does not submit anything else for 20 seconds, the flow advances to step 184.
- If the user sends a new message, he is directed to step 221, where the new message is incremented to the previous message.
- Open Hours We wait at least 20 seconds, during which time, if the user no longer sends messages, the flow continues. Otherwise, all sent messages are combined.
- Example:
- The user sends “Hello”.
- Then send “Good morning”.
- Then, send “How are you?”
- Finally, ask a question.
- All these messages are accumulated and sent together for analysis in subsequent steps.
The waiting time of 20 seconds can be changed freely, depending on your business.
🟡 Step 221 - Define Field
- Description: This step combines the previous message with any new message received.
- Importance: Allows the creation of an incremental message, where multiple user phrases are combined for analysis and subsequent response.
- Example:
- Initial message: “Hello”.
- New message: “Good morning”.
- New message: “How are you?”
- They are all combined to form a single input for the next step.
❗We do not recommend editing this field
🟡 Step 184 – Intent Prompt
Set lead: GPT. | Prompt: Manual entry
Consider that you are analyzing the intent of a sentence typed by a user into a chatbot. See which of the situations below fits the intention of this typed phrase: [“Lead: GPT | Message received”]:
#Attendant: Talk to a person, a human attendant or leave the chat.
#Meeting: interested in scheduling a meeting or chatting via a call, phone call, etc.
#Greeting: Greeting (ex: Hi, Hello, Good morning, Good evening, How are you? etc).
#General: None of these scenarios.
Respond only with the respective ID of the options, which follows this pattern: “#word”:
Example: #Attendant
- Description: In this step, a standard prompt is used for ChatGPT to analyze the intention of the message received from the customer.
- Functionality:
- The prompt is used internally by ChatGPT to identify the customer's message intent.
- Example of pre-defined options: #attendant, #meeting, #greeting, #general.
- We ask ChatGPT to respond only with the ID of these options in hashtag-word format.
- Customization:
- You can customize this prompt to include other functions such as checks, sentiment analysis, data extraction, etc.
- The list of options for the intent prompt can be edited, expanded, reduced, or eliminated as needed.
- Result:
- The ChatGPT response will be recorded in the “GPT | Answer” in step 201.
- Alternative Flow:
- If you do not want to use intent analysis before the assistant's response, you can delete fields 184, 187, 189, 191, 204, 201, 171 and connect step 209 directly to step 210.
- This way, the user's message will be answered directly by the assistant without going through ChatGPT analysis.
✅ You can edit the content of this field
🟡 Step 187 - ChatGPT Webhook
Enter URL here
https://bytegpt2.byte.bio/715f5eb294641….
- Description: This step contains the ChatGPT webhook, configured to the GPT-4o-mini standard.
- Functionality:
- Responsible for analyzing the prompt defined in step 184.
- The answer or result of this analysis will be displayed internally in the “GPT Answer” field.
- Functional Role:
- ChatGPT performs internal actions necessary for the CRM, such as analyzing intent, before a response is sent to the user.
- It serves a variety of uses depending on your business needs.
- Differentiation of Webhooks:
- ChatGPT (Step 187): Used for internal analysis and prompt processing.
- Wizard (Step 50): Uses another webhook (GPT Provider) to respond directly to the end user.
❗Do not change the URL base, as it is already correctly linked to your ChatGPT (OpenAI Key)
Change ChatGPT models and parameters
If you want to change the OpenAI model, from ChatGPT, as well as parameterizing the size of Token usage (Max Output), you can add a suffix to the end of your URL.
Suppose your Webhook url (Step 187, from ChatGPT), is, for example: https://bytegpt.byte.bio/dac44aaa8a432ert5853/handler
The default is the template gpt-4o-mini
If you want to make changes, you can add “?” at the end of the url, followed by parameters; look:
OpenAI Models
Examples:
?model=gpt-4o
?model=gpt-3.5-turbo
- https://bytegpt.byte.bio/dac44aaa8a432ert5853/handler?model=gpt-4-turbo
Tokens (max output)
Examples:
?tokens=800
?tokens=2000
- https://bytegpt.byte.bio/dac44aaa8a432ert5853/handler?tokens=800
Is for combine models and tokens, in addition to starting with “?“, add with “&“, becoming, for example:
- https://bytegpt.byte.bio/dac44aaa8a432ert5853/handler?model=gpt-4o&tokens=800
🟡 Step 191 - Condition
If Lead: GPT | Answer Received? Equal: Full
- Description: This step is a control condition of the API ByteGPT and must not be changed, including the field and conditions.
- Functionality:
- It represents two situations:
- Empty Field: None of the conditions were met.
- Full Field: The request to ChatGPT was made and the response was received.
- After the request to ChatGPT in step 187, there is a 5 second interval to wait for the response.
- When the response is generated, the API ByteGPT automatically marks the field “GPT | Answer Received?” as full.
- It represents two situations:
- Flow Advance:
- Since the field is marked as full, satisfies the condition in step 191.
- The flow then advances to step 204.
- In step 204, the “GPT | Answer Received?” is emptied to wait for the next response.
❗We do not recommend editing the fields
🔴 Step 204 - Define Field
Set lead: GPT | Answer Received?: Empty
In step 204, the “GPT | Answer Received?” is emptied to wait for the next response.
❗We do not recommend editing the field
🟡 Step 201 - Intent Conditions
If Lead: GPT | Answer Contains: Manual entry #Attendant
- Description: This step checks the intent conditions or conditions referring to the prompt defined in step 184.
- Functionality:
- Lists the possible words or options that have been configured in the prompt.
- Example included: condition for the term “#attendant”.
- The condition is set so that if the “GPT | Answer” contains the word “#attendant”, the flow will proceed to the next step, which can be created and customized freely.
- In the given example, after step 171, the robot will stop.
- Alternative Flow:
- If none of the conditions are met, the flow continues to the assistants area (GPT providers), who will respond to the message.
- Importance:
- Step 201 is crucial to divert the flow or route according to the results analyzed by ChatGPT.
- Allows calling specific flows, such as scheduling, screening or other custom flows.
- Prevents the template from being in a simple question, processing and response loop, offering greater flexibility.
- Integration with ChatGPT:
- It is combined with the analysis carried out by ChatGPT in the Prompt stage (step 184), allowing dynamic management of the workflow.
✅ You can edit the content of this field in the conditions options
🢢 Step 171 - Define Fields
Set lead: GPT | Prompt: Manual entry
- Description: This step is responsible for cleaning the prompt, emptying it to avoid any future noise if the ByteGPT is triggered by another flow and the field is still populated.
- Functionality:
- It serves as a preventative measure to ensure that the prompt field is empty for future uses.
- It is an optional measure and can be changed or deleted as needed.
- Flexibility:
- In the example given, after identifying the “attendant” intention, the flow was configured to stop.
- You can replace this step with other actions, such as:
- Send a message to the user informing that an attendant will be called.
- Send an internal notification to users.
- Add a specific note or tag.
- Any other action you deem appropriate when an intention to speak to an agent is identified.
🢢 Stop Robot
+ Add Action
- Description: This step is crucial as it stops the bots' activity, ensuring that they do not remain active.
- Functionality:
- The “Stop Robot” step can be configured to start another bot when clicking “+Add Action”.
- It is considered good practice to stop and start bots at the same step, rather than starting them separately.
- Example of use:
- In the example given, the bot is stopped when the user's intention is to speak to a human attendant.
- This enables hybrid mode, allowing one person to interact and write normally in the conversation.
- Flexibility:
- This step can be adjusted according to your needs and may include additional actions, such as launching other bots or making specific notifications.
🟡 Step 210 - Define Field
Set lead: GPT | Prompt:
Lead: GPT | Message received
- Description: At this stage, the “GPT | Prompt” is reset to the user's original message, which was recorded in the “GPT | Message Received” in step 144 and incremented, if necessary, in step 221.
- Functionality:
- The intent here is to use this message as the prompt for the GPT wizard to respond.
- The message is then sent to the webhook in step 50, which is responsible for the GPT provider, where the response to the user's message will be generated.
- Prompt Handling:
- You can edit this field to enrich the prompt by adding additional information or relevant context.
- It is possible to complement the original message while preserving the “GPT | Message Received” and adding other texts as necessary.
- If no adjustments are needed, the message can be used as is.
🟡 Step 50 - GPT Webhook (OpenAI Assistant)
Enter URL here
https://bytegpt2.byte.bio/3ed5a477f7216158
- Description: This step contains the GPT wizard webhook provided by vendors such as OpenAI, Dify, Chatbase, and others.
- Functionality:
- The webhook URL is added automatically and editing this URL is not recommended.
- Template Settings:
- If you need to switch or change the GPT model, such as selecting GPT-4, this must be done directly in the vendor's environment (for example, on the OpenAI platform).
- Settings such as token limit and other parameters must also be adjusted at the GPT provider level.
- Example of Suppliers:
- OpenAI
- Dify
- chatbase
🟡 Step 59 - Pause
Stopwatch: 0 hours 0 min 10 sec
Minimum pause required to process the Assistant response (GPT Provider). If the response is not received within 10 seconds, the process goes into a loop, trying again for another 10 seconds.
❗We do not recommend changing this time, as Salesbot Kommo It can stop your flow if the loop is too short.
🟡 Step 209 - Condition
If Lead: GPT | Answer Received? Equal: Full
- Similary to step 191.
- Description: This step is a control condition of the API ByteGPT and must not be changed, including the field and conditions.
- Functionality:
- It represents two situations:
- Empty Field: None of the conditions were met.
- Full Field: The request to ChatGPT was made and the response was received.
- After the request to ChatGPT in step 187, there is a 5 second interval to wait for the response.
- When the response is generated, the API ByteGPT automatically marks the field “GPT | Answer Received?” as full.
- It represents two situations:
- Flow Advance:
- Since the field is marked as full, satisfies the condition in step 209.
- The flow then advances to step 212.
- In step 80, the “GPT | Answer Received?” is emptied to wait for the next response.
❗We do not recommend editing the fields
🔴 Step 212 - Condition
Condition
If Lead: GPT | LOG Contains: Manual entry ok
E
If Lead: GPT | On/Off Equal: Empty
If Lead: GPT | LOG Equal: Manual entry ok
E
If Lead: GPT | On/Off Equal: Full
If Lead: GPT | On/Off Equal: Full
E
If Lead: GPT | Uneven LOG: Manual entry ok
- Description: This step checks for errors when interacting with the GPT wizard or provider.
- Conditions to be Verified:
- Condition Satisfied:
- The “GPT | LOG” should be “OK”.
- The “GPT | ON-OFF” must be empty.
- If these conditions are met, the message advances to where the response will be generated.
- Intermediate Condition:
- The “GPT | LOG” is “ok”.
- The “GPT | ON-OFF” is full.
- The flow will stop and the response will not be sent to the client.
- Error Condition:
- If “GPT | ON/OFF” is off (full) and “GPT | LOG” is not “OK”, this indicates an error in the GPT provider (such as OpenAI).
- In this case, an internal message is sent to all participants.
- None of the Conditions Satisfied:
- If “GPT | LOG” is not “OK” and “GPT | ON/OFF” is empty.
- A tag is added in step 215 indicating an error.
- The flow retries in subsequent steps to reprocess until the initial condition of step 212 is satisfied and the response is displayed.
- Condition Satisfied:
🟡 Step 213 - Manage Tags
Delete a tag from a lead: OpenAI ERROR
This action deletes the tag of an “OpenAI ERROR” lead, if it was previously assigned due to errors. If this tag does not exist, nothing will happen.
🔴 Step 80 - Define Field
Set lead: GPT | Answer Received?: Empty
In step 80, the “GPT | Answer Received?” is emptied to wait for the next response.
❗We do not recommend editing the field
🢢 Step 51 - Send message (to)
[Lead: GPT | Answer]
- Description: In this step, the message processed by the GPT wizard is sent to the client.
- Functionality:
- The message is sent to all channels enabled in the “Channels:” list. All".
- This list can be edited to select specific channels where the stream should be active.
- It is important to keep the “Try sending a message”.
- Field Used:
- The “GPT | Answer” displays the response processed by the GPT wizard.
- This response is then sent to the customer on the selected channels.
🟡 Step 9 - Pause response
Here there is a link to step 9, which is Pause Response, where the bot waits for the next message from the customer.
When returning to step 9, the Message > Processing > Response loop closes.
To avoid being in a loop, you can add a “Stop” step and add a new flow, if necessary, or add conditionals that do what diverts the flow, in step 201.
🔴 Step 228 - Define Field
Set lead: GPT | On/Off: Empty
- Description: This step manages the “GPT | On/Off”, which is a security field used to activate or deactivate the API flow. ByteGPT.
- Functionality:
- The “GPT | On/Off” is empty, indicating that the API flow ByteGPT is activated (On).
- Responses are only displayed if this field is empty (On).
- Importance:
- Just change the state of the “GPT | On/Off” manually, is not enough to stop the flow of ByteGPT, as this is a field used by the API and not by Kommo.
❗We do not recommend editing the field
🟡 Step 224 - Send internal message (to)
OpenAi ERROR [Lead: GPT | LOG]
This field sends an internal message to all participating users, from your Kommo, in this conversation. It is not sent to the external client, only to internal users.
The message is to warn them that there is an Error with OpenAI or the GPT vendor.
🟡 Stop robot
+ Add action
The robot or salesbot flow is stopped.
🟡 Step 215 - Manage Tags
Add a tag for a lead: OpenAI ERROR
Action to add a tag for a lead: “OpenAI ERROR”, to make it easier to find or filter by leads that have or are having problems.
If the situation is resolved, after a few attempts, by the flow itself, this tag is removed in step 213.
🟡 Step 216 - Add Note
Add a note to a main contact
OpenAi ERROR [Lead: GPT | LOG]
🔴 Step 226 - Define Field
Set lead: GPT | On/Off: Full
This action causes the bot to be set to “Full”, which is relative to “OFF”. It is a control field, so that the ByteGPT You can try to redo the prompt sending, as there may be a problem.
❗We do not recommend editing the field
🢢 Step 218 - Send message (to)
Just a moment please
Message sent to the customer, asking them to wait a moment.
This message can be edited as needed.
The intention of this phrase is to not let the user wait longer than usual, while the ByteGPT Attempts to make another request to GPT.
Following the flow, in step 217, you will wait for a 45 second pause, until resending to the Assistant Webhook.
If the problem persists, identified in step 212, the flow will go to step 228 and then stop, after step 224.
If the situation can be reversed and becomes ok, the message will be sent, following the flow, after the condition of steps 212, 213, 80 and 51.
🟡 Step 217 - Pause
Stopwatch: 0 hours 0 min 45 sec
This is a 45-second pause to prompt the Assistant again. This is a time when we determine to wait and see if the situation has returned to normal.
Often, in a request to OpenAI, for example, there may be instabilities on the supplier's server and we then try again after this time.
🔴 Step 50 - GPT Webhook (Wizard)
Link to Step 50, where the Assistant Webhook is.