Skip to content
How to properly use...
 
Notifications
Clear all

How to properly use the wait node with call webhooks?

8 Posts
3 Users
0 Reactions
4 Views
Carlos_Guimaraes
(@carlos_guimaraes)
Posts: 5
Active Member
Topic starter
 

Describe the problem/error/question

Hello Community?

I am developing an automation in callin.io that makes calls using AI Voice, with data received from GHL. The process is as follows:

  1. An initial webhook receives the contact data, which undergoes a brief preparation.
  2. The flow is then set to attempt calls to all the phone numbers listed for the contact, ensuring each one receives an attempt.

The logic is simple: if one of the calls is answered, the system should stop trying the remaining numbers. To manage this, the automation updates a custom field in GHL with the call status (“answered” or “not answered”). This update is sent back to callin.io through an additional webhook.

The idea is that the call status acts as a “flag,” allowing the loop to proceed only if the last number called wasn’t answered — then, the flow should move to the next number. To implement this, I configured the “Wait” node in “On Call Webhook” mode with the $execution.resumeUrl path, expecting the flow to continue only when the webhook receives a “not answered” status. However, the loop is not resuming as expected after the webhook response.

What is the error message (if any)?

Please share your workflow

Preformatted text

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your callin.io setup

  • callin.io version:
  • 1.65.2
  • Database (default: SQLite):
  • Postgre
  • callin.io EXECUTIONS_PROCESS setting (default: own, main):
  • Running callin.io via (Docker, npm, callin.io cloud, desktop app):
  • Selfhosting (Railway, Docker)
  • Operating system:
  • MacOs Monterey Version: 12.7.6

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 05/11/2024 11:59 am
Azradex
(@azradex)
Posts: 3
New Member
 

Hi,

I believe you might be overcomplicating the process by attempting batch processing. Have you considered saving the data after its preparation?

Subsequently, a workflow could read the data item by item from the table. You can link the calling flow to a scheduling job and avoid the complexities of batch processing.

I hope this suggestion proves useful.

 
Posted : 05/11/2024 12:40 pm
Carlos_Guimaraes
(@carlos_guimaraes)
Posts: 5
Active Member
Topic starter
 

The issue is that I want to avoid calling the customer multiple times (two or four, based on the number of phones in their registry).

Therefore, I require a mechanism that provides the outcome of the initial call to determine if subsequent calls to the same customer are necessary.

To implement this, I need to utilize a wait node to store the response. Without it, the workflow would proceed without interruption, and I need to pause to receive the response.

Any recommendations? Thank you.

 
Posted : 05/11/2024 8:30 pm
Azradex
(@azradex)
Posts: 3
New Member
 

Hi,

I understand your perspective.

Yes, you do need to wait and examine the outcome of the previous call. However, I don't believe accomplishing this in a single step is the most elegant solution.

Consider a scenario where you have a table with:

Phone number
Status (NEW, IN_PROCESS, …)

You would first execute a flow to perform your data transformations, retrieve the phone numbers, and then save them to the table with a status of READY.

Now, imagine a separate workflow that runs at 10-minute intervals. It retrieves one record from the table where the status is READY. It then updates that record's status to IN PROGRESS, initiates the call, and upon completion of the call, updates the status once more.

This approach allows you to manage your prospect's state using the status field. You can scale your system independently of each prospect and maintain control over your workflow.

You can incorporate a company field into the table and perform additional checks.

You can include a 'last called at' field and verify if a specific duration has elapsed.

Should you have any further questions, please don't hesitate to ask. I'd be glad to assist.

 
Posted : 06/11/2024 8:51 am
Carlos_Guimaraes
(@carlos_guimaraes)
Posts: 5
Active Member
Topic starter
 

Your suggestion is logical, but if I wait 10 minutes for every call or result check, and a prospect has 4 phone numbers in their contact list, it would take me 40 minutes to process one prospect. I don't believe I shared this detail with you earlier, but my prospecting lists typically contain around 10,000 leads per campaign! This would make processing such a batch incredibly time-consuming.

However, we've refined our approach. Unless I'm misunderstanding, I believe utilizing the Wait node in "on call webhook" mode will be the most effective option regarding algorithm efficiency and overall performance!

If you have insights on how to implement this solution using the WAIT node, please share.

Thank you for your responses and assistance. They have helped clarify my thinking on this matter. I appreciate it greatly.

 
Posted : 06/11/2024 6:20 pm
Azradex
(@azradex)
Posts: 3
New Member
 

Hi Carlos,

I hope you're having a good day.

You're correct; scheduled jobs would indeed complicate processing efficiency.

I've experimented with an alternative flow using a WAIT block and appended a flag at the end.

I'm unsure about the specific platform you're using, but this solution assumes it provides an 'on call ended' hook.

If you expand the status types in GHL to four:

  • Not-answered
  • Answered
  • In-progress
  • Not-called
  1. You can finalize your data transformation and save everything to GHL as 'Not-called'.
  2. Subsequently, you can select a single record, update its status to 'In-progress', and initiate a call.
  3. The workflow will then pause for a set number of minutes.
  4. After the pause, it will check the table to ascertain:
    • If any calls are currently ongoing.
    • If a call has been answered.
    • If neither of the above is true, whether there are any remaining numbers to call.

In the first scenario, it will simply return to the wait block and re-evaluate after the specified minutes.

In the second scenario, it will terminate.

If the third scenario is met, it will select another number and commence a call.

This approach should enable you to sequentially attempt all numbers.

However, for this to function, you'll require a secondary workflow that listens for the 'on call ended event'.

This secondary workflow should access the table and update the record's status; otherwise, an infinite loop could occur.

Please excuse my handwriting.

I hope this explanation is helpful. Please don't hesitate to ask if you require further assistance.

PS: If an 'on call ended' event listener is available, you can omit the WAIT block and instead check the table within the 'on call ended' event flow. This flow can then either initiate a new call or stop, depending on the status.

 
Posted : 07/11/2024 11:02 am
Carlos_Guimaraes
(@carlos_guimaraes)
Posts: 5
Active Member
Topic starter
 

I'm trying that and will provide an update shortly.

Thanks again!

 
Posted : 08/11/2024 7:41 am
system
(@system)
Posts: 332
Reputable Member
 

This thread was automatically closed 7 days following the last response. New replies are no longer permitted.

 
Posted : 16/11/2024 7:57 am
Share: