0

I have a flow in Studio where I'm trying to loop based on workflow steps in a back-end system, and occasional prompts/input from the caller.

The HTTP request needs to be based on a parameter that varies depending on whether the previous step was a prompt with DTMF input, or whether it's just a polling request from the client (IVR) for a status update.

When I dig around using Postman via the Rest API, I can see that there is a 'transitioned_from' parameter within 'steps', but it doesn't seem that I can access that from Studio (I did try using {{steps.transitioned_from}} but it comes up blank).

Does anyone know any way that I can determine the previous widget or step within a Studio flow?

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Could you maybe call out to a Function instead of use the HTTP request widget? That way you could write the code to determine whether you've been passed a `Digits` parameter or not. – philnash Mar 14 '18 at 23:54
  • Even with an HTTP request, I can determine if Digits were passed or not ({% if {{widgets.gatherInput.Digits}} %}{{widgets.gatherInput.Digits}}{% else %}{% endif %} as part of an input parameter. That's not the issue. The challenge was figuring out whether that was actually the **most recent** step called, because it's possible that those digits were collected several steps prior. For now, I've worked around it by re-coding the back-end system to always accept the digits and use tracking logic at each step in the flow to determine whether those digits were expected or not. – Dave Friedman Mar 16 '18 at 01:42
  • Sure, I suggested a Function because that would not act like a widget and would only have the `Digits` parameter if was directly passed it. Glad to hear you've found a workaround though. – philnash Mar 16 '18 at 01:43

0 Answers0