Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry option creates a new task in voice channel instead of original task's channel #55

Open
allavytalize opened this issue Apr 2, 2024 · 1 comment

Comments

@allavytalize
Copy link

Test:

No agents are available.
User leaves a voicemail.
When an agent comes online, they pick up the voicemail task.
When they click retry, the task appears in agent's queue, but it is ringing. It is no longer a voicemail talk but a voice task.

Expected behavior:

  • On Retry the new task should be created in the same channel as the original.
  • If this is the intended behavior, provide documentation on flex plugins page.

Screenshot 2024-04-02 at 2 49 51 PM

@allavytalize
Copy link
Author

I figured out the root cause of the problem after debugging the plugin library function code.

There are 2 functions:
/callback/studio/create-callback - responsible for creating initial voicemail task from studio
/callback/flex/create-callback - gets triggered when you click Retry and a second task is created from Flex

In the 2nd function, this part of the code does not work because taskChannel is blank, so it defaults to 'voice':
...
const {
taskChannel: overriddenTaskChannel
} = event;
const taskChannel = overriddenTaskChannel || 'voice';
...

For my use-case, I can change the above to 'voicemail' and it works. But I think it still needs to be fixed in the source code.
I would assume the event should come with all attributes of the original task, but it doesn't seem to be the case.

Also, there is no documentation on how to debug plibo functions.
For my custom functions I can run twilio serverless:logs --tail and see the logs. But for the plugin functions, I can only find logs if I trigger an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant