Legacy Dev Forum Posts

 View Only

Sign Up

Data Action break in the IVR

  • 1.  Data Action break in the IVR

    Posted 06-05-2025 18:41

    husseinco | 2018-10-14 20:32:09 UTC | #1

    Hi, I have a weird behavior with retrieving Participant name from a conversation, in the sense I have successfully created the action and tested it before publishing it and it retrieves the name perfectly but when I call it from the IVR and store its Output (the Agent name) in Flow.String variable and then try to invoke it in another Data Action withing the same IVR Node it keep disconnecting, any insight on what might be the cause?


    Jason_Mathison | 2018-10-15 12:58:42 UTC | #2

    Hello,

    So you can run both actions in test mode, and use the output of the first action to get the second one to work? One thing to try is to output the participant name with a play audio step to see if the first action is actually working in the IVR.

    --Jason


    husseinco | 2018-10-15 13:18:24 UTC | #3

    Hi @Jason_Mathison ,

    In fact I have tried that and it's successfully TTS the agent name, and already I figured out the issue it's from the space between the agent first name and last name as it turned out that the integration does not accept any spaces to pass through, whereas when I use Postman I can peacefully pass full agent name, so is there any work around this issue?


    Jason_Mathison | 2018-10-15 13:21:51 UTC | #4

    Maybe you need to URL escape the agent name?

    Take a look at $esc.url($input) here: https://help.mypurecloud.com/articles/velocity-macros-data-actions/#StringEscaping

    If that doesn't take care of it for you, please open a Customer Care ticket so someone can dig into the logs.

    --Jason


    husseinco | 2018-10-15 14:00:47 UTC | #5

    @Jason_Mathison you are indeed the Master, I totally thank you you saved me many times, the $esc.url just did the magic.


    Jason_Mathison | 2018-10-15 14:17:09 UTC | #6

    Glad I could help! I am going to enter an internal ticket to add this to our troubleshooting page.

    --Jason


    husseinco | 2018-10-15 20:58:22 UTC | #7

    Hi @Jason_Mathison,

    Now I have another issue with the authorization it keeps expiring every 24 hours and it's impossible for me to keep creating the authorization manually, so is there a way to just use ONLY one single authorization token (or any auth method) with the integration?


    Jason_Mathison | 2018-10-16 12:44:24 UTC | #8

    The "PureCloud Data Actions" integration with a set of OAuth client credentials should not have any issues with credentials timing out.

    https://help.mypurecloud.com/articles/about-purecloud-data-actions-integration/


    husseinco | 2018-10-17 13:57:10 UTC | #9

    Hi @Jason_Mathison,

    I'm afraid that the issue still present I tried to generate new Client Credentials token using Postman and then used them into my Data Action but after 24 hours I threw an authorization error 401 "bad.credentials". any hints what might be the cause or the token generation should not be with Postman?


    Jason_Mathison | 2018-10-17 14:00:12 UTC | #10

    Have you followed the directions on this page for "Add a PureCloud OAuth Client"?

    https://help.mypurecloud.com/articles/about-purecloud-data-actions-integration/


    husseinco | 2018-10-17 14:13:19 UTC | #11

    Yes, but Am I doing the right thing "generating the token through Postman"?

    Also you may notice the token duration is 24 hours by default!

    **If there's a way to create a Data Action to grab the token every time and then pass it to the second Data Action? if yes could you please share the Request Config for that"

    Thank you


    Jason_Mathison | 2018-10-17 14:40:08 UTC | #12

    It may be possible that you could create a client credential via postman, but I have never tried it. Typically when I am using postman I am creating relatively short lived tokens, not long lived Client Credentials.

    When the Data Action Service is running PureCloud actions it will create a token based on the Client Credentials and will create new tokens as old ones expire. I am guessing that you are creating something else in Postman that isn't renewable, but without any details I can't say what is going on. If you want to go further with this, please provide the APIs you are using and what you are passing them (with sensitive information redacted). Since creating client credentials typically only has to be done once this is the first time I have seen anyone ask to generate them programatically.

    --Jason


    husseinco | 2018-10-17 15:06:35 UTC | #13

    Hi @Jason_Mathison

    Let me elaborate what exactly I'm doing, firstly I create the client credentials and take the client and secret and populate them in Postman as follows:

    secondly, I request token and then copy the generated token and past it into my Data Action

    Here is my Data Action

    <a class="attachment" href="/forum/uploads/db6296/original/2X/9/915fe31ca55497abcdff583f407f12083ff6b61c.json">GETAgentNameByID-20181017180058.custom.json</a> (1.3 KB)


    Jason_Mathison | 2018-10-17 18:23:58 UTC | #14

    Is there a reason that you are using a custom rest integration instead of a PureCloud Integration? The PureCloud integration takes the client Id and secret and handles authentication for you from there.


    husseinco | 2018-10-17 18:54:45 UTC | #15

    Hi @Jason_Mathison

    There is no reason to be honest rather I had forgotten about this integration altogether, anyways I just set it up and and finger-crossed I wont be having any issues soon.

    Thank you for your usual and kind support.


    system | 2018-11-17 19:08:28 UTC | #16

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 3727