twilio-labs / plugin-queued-callbacks-and-voicemail

MIT License
11 stars 14 forks source link

Trigger the Callback/Voicemail after workflow ends #36

Open maxmito opened 3 years ago

maxmito commented 3 years ago

Hello and thanks for sharing the plugin!

I have a workflow with 2 steps, and I would like to trigger the feature only at the end if no one answers. Should I look for the speciic event and redirect the call to /queue-menu?mode=main or what to dou suggest?

Thanks

Max

vernig commented 3 years ago

Hey @maxmito, just to make sure I understand, the flow you have in mind is:

Is that the flow you want to implement? If not, can you clarify the steps?

Should I look for the speciic event and redirect the call to /queue-menu?mode=main or what to dou suggest?

I wouldn't suggest do that blindly, because the serverless implementation depends on existing task. Let me know more about the flow, and I can try to help you integrating it

maxmito commented 3 years ago

@vernig thanks for the answer!

Yes that's the flow I want to achieve and this is the approach I'm testing and looks working so far:

1 - As per instruction I created a new Task Queue (CallbackVoicemail); 2 - I deployed all the functions as instructed, via Serverless 3 - In all my workflows I added an additional steps at the end so the taks enter the newly created CallbackVoicemail task queue 3 - I created a function (and put it in the Event Callceck under Workflow - Settings) that intercepts the task-queue.entered event and check if the TaskQueueName is CallbackVoicemail , if yes I trigger a call update and redirect the call to the /queue-menu?mode=main url

As said this looks working, I'm still testing in a staging environemnt and have agents testing it, I'm sure few details will need to be olished, but I guess we are on the right path!

Any suggestions is more than welcome!