Create your predefined flow from scratch
Here you will learn how to generate flows from predefined flows that fit your needs and speed up the production launch of your business!
Creation of a predefined flow
To create a predefined flow, after entering the Create Flows area, you must select the "Predefined flows" button.
Then you can choose the industry and the level of complexity, based on the flow you need, and you can choose between one of the available predefined options, such as Appointment Confirmation, Vehicle Interest as seen in this example, or create it from scratch.
In the controls of the predefined flow, you also have the option to preview, with the eye icon.
Creation of a predefined flow from scratch
Here you can create a predefined flow from scratch, where you can generate it according to your needs from the beginning.
To create a predefined flow from scratch, after entering the Create Flows area, you must click on the Create button, as indicated below:
Then you will be asked to select the WhatsApp number that will be the destination of that flow. Once selected, click on Continue.
Then you will go to the Flow Creation screen, where you will see the selected phone and the Trigger for the creation of the flow on the right panel of the screen.
There you will have the following options for your creation:
Template: where you will use the corresponding WhatsApp template
Webhook: where webhooks link the event that occurs in the server application and request it to send the payload to the client via the web.
Creating a flow from scratch with a Template
💡Important: you must have your template created in order to link it to the flow.
In the right panel, in Trigger, select the Template option.
Then we select the template:
And from here on you will determine the behavior of the bot, through the Evaluate Response component, where the behavior will be determined in this case of the buttons or other action that develops the actions we need:
If you want to learn more about all the components available to configure your bot, you can visit the following article.
Creating a predefined flow from scratch with Webhook
To create a flow that supports webhooks, follow these steps:
In the Atom flow editor, choose the Webhook trigger option.
Next, connect the webhook component to a template one.
After choosing a template, you can continue adding the components you consider to complete the flow. For more information about the components of a flow, you can see this article.
Once the workflow is complete, copy the Webhook input parameters. You can do this in two different ways:
Before publishing the workflow, double-click on the Webhook component and then on "Show POST request" in the right panel. In the detail of the POST request you will find the parameters between {} symbols (keep in mind that you must replace the values "Data to send" with the corresponding one". Example:
Example:
Another option you have to copy the input parameters once the flow has been published and is in 'Active' status, are the following: Select the flow with webhook in the 'Webhooks' screen within the Campaigns module and execute the action 'View flow':
Select the flow with webhook in the 'Webhooks' screen within the Campaigns module and execute the action 'View flow':
In the workflow viewer, click on the 'Copy information fields' button that is inside the webhook component:
In the workflow viewer, click on the 'Copy information fields' button that is inside the webhook component:
The fields will be copied with the following format, ready to paste them in your API testing tool or in the configuration of your CRM that will connect to the ATOM webhook:
The fields will be copied with the following format, ready to paste them in your API testing tool or in the configuration of your CRM that will connect to the ATOM webhook:
Example:
{
"phone": "",
"company_name": "",
"fecha_cita": "",
"monto": "",
"name": ""
}
After finishing the creation of the workflow with webhook, save it and publish it to be able to use it.
The webhook component has two buttons to speed up its subsequent operation:
Button 1 allows you to copy the URL of the webhook, while button 2 can be used to copy the information fields in JSON format.
Keep in mind the following information about the parameters of an ATOM webhook.
Every ATOM webhook has, by default, as a mandatory input parameter the phone number (phone) of the destination of the flow messages.
The phone number ("phone") must be entered by adding the "+" sign and the area code of your country, without using hyphens or spaces.
However, if templates with their own custom fields are inserted in the flow, all of them will become mandatory input parameters of the webhook.
On the other hand, Atom allows to include other parameters in the webhook through the custom fields, as shown below:
To view the required fields of a webhook:
Go to the flow editor in the Campaigns module.
Click on the Webhook component.
On the right side of the screen, a panel will be displayed where you can view the required fields.
Test your flow
Once you have a flow with webhook created and published, you can simulate and evaluate its execution. For this, the API testing tool called Postman will be used.
Below you will see the step by step to simulate a flow with webhooks in Postman:
Go to the Campaigns module.
Click on the webhooks submodule.
3. Go to the flow with webhook you want to test and click on the URL icon to copy it and use it in Postman.
4. Next, complete the following parameters in Postman:
Headers
Content-Type: application/json
Authorization: Bearer xxxxx, being xxxxx the API token that you must obtain in the submodule My Company → Security configuration
💡Important: when using a webhook, authentication through the API token is mandatory. On the other hand, keep in mind that if you already have one generated and decide to generate a new one, you have to replace the new one in all those webhooks and APIs of Atom that you have in use.
Body
Format: raw
Write the parameters in JSON format, e.g.:
{
"phone": "5795755112756",
"client_name": "Martin Lopez"
}
All parameters must be inserted in string format, i.e. between double quotes ("").
When using ATOM webhooks you may encounter the following codes
| Scenario |
Scenario
| Response Code |
Response Code
| Response Body |
Response Body
| Successful sending |
Successful sending
| 200 - Ok |
200 - Ok
| {"message":"Webhook executed successfully"} |
{"message":"Webhook executed successfully"}
| Non-existent token |
Non-existent token
| 401 - Unauthorized |
401 - Unauthorized
| No authorization token found. |
No authorization token found.
| Incorrect token |
Incorrect token
| 404 - Not Found |
404 - Not Found
| Cannot find a company with uuidToken = xxxxxxx |
Cannot find a company with uuidToken = xxxxxxx
| Required parameter |
Required parameter
| 500 - Internal Server Error |
500 - Internal Server Error
| {"message": "The parameter xxxx is required","hasErrors": true} |
{
"message": "The parameter xxxx is required",
"hasErrors": true
}
| Try to simulate an active flow |
Try to simulate an active flow
| 500 - Internal Server Error |
500 - Internal Server Error
| {"message":"The contact is simulating a flow.","hasErrors":true} |
{
"message":"The contact is simulating a flow.",
"hasErrors":true
}
Define the triggers in your CRM or ERP that will execute the flow with the created webhook. It is important that you configure in them both the URL and the parameters of the ATOM webhook.
Once you have evaluated and approved the interaction between your CRM or ERP and the ATOM webhook, put your flow into production.
Use of the http component to return the data of a flow
Alternatively, you have the possibility to return the data used in a flow through the HTTP request POST method.
For this, the "HTTP Request" component will be used in the design of the workflow. Below we will see its configuration:
In the ATOM workflow editor, insert the "HTTP Request" component.
As a method you must choose: "POST".
Insert the URL to which the data of the custom fields used in the flow will be sent.
Activate the field to insert the fields in the Body of the request, sliding the Body button.
5. The information fields must be inserted in JSON format. Keep in mind that both the identifier of the field and its value (the information field) must be between double quotes ("").
To choose the information field that captures the data, press the / (slash) key which will display a list with all the information fields available to insert.
6. Proceed to simulate the execution of the flow to evaluate the sending of the data.
Below, we present an example of a simulation of a flow that contains an "HTTP Request" component:
We generate a flow with an HTTP request with the following parameters:
The field "name" is an input parameter of the flow while the field "identification" captures the client's response in whatsapp
We start the flow simulation through the POSTMAN tool:
The customer receives and answers the following in WhatsApp:
We can see how the last response of the customer is stored in the field "Identification":
Create predefined flow based on available options
Select one of the options that is closest to the use case you want to use for your flow, for example, in this case we use the "Appointment Scheduling" flow
Click on USE, and you must select the WhatsApp number to link this flow. Once selected, click on Continue.
Once you select a predefined flow, the flow editor will open with the existing design.
Keep in mind before saving the flow, you must assign a different name to the predefined flow taken as a base.
In case you select a predefined flow that has templates or custom fields that have not been configured in your company, Atom will notify you of the absence of them and will give you the possibility to create them automatically through the following warning message:
⚠️Keep in mind:
You can create the flows according to your convenience, dragging the components from the vertical bar on the left of the interface, or in the tooltip that appears in each component.
Your flows can start with a template or message. By default, when creating a custom flow, the flow start is counted.
Every execution branch must end in a flow end component.
Additionally, several branches can be combined in the same flow end component.
You have two components that determine the end of the flow execution. These are: Flow end itself and the Assignment of said conversation to a group or agent in particular.
RELATED ARTICLES
To learn more about Components of a Flow, visit the following article: Flow Components
If you want to know the tools you have visually to manage your flow you can visit the following article: Tools to manage your flow
If you want to learn how to publish your flow visit the following article: Publishing a flow