Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Outbound contact list data delayed when attempting to use column values in the script.

    Posted 29 days ago

    We are using the values from several columns in our outbound contact lists to drive behaviors inside our agent script. We are noticing that occasionally the value will return as the literal string used to identify the variable, rather than the value that should be inside it. For example, if a column named "Object ID" and in my script I print that value out to participant data using {{Outbound.Object ID}} then sometimes the data literally prints out as {{Outbound.Object ID}}. If we had delay to the execution of the step (3 or 4 seconds) then the issue seems to stop (or at least not happen as often). Has anyone else experienced this kind of thing. I've been looking in the outbound documentation for a bit now and can't seem to locate anything that indicated the variables referenced using Outbound.<value> or Scripter.<value> should take time to populate. 


    #Scripts

    ------------------------------
    Mike Bailey
    x
    ------------------------------


  • 2.  RE: Outbound contact list data delayed when attempting to use column values in the script.

    Posted 29 days ago
    Edited by Luiz Rosa 29 days ago

    Hi, Mike Bailey

    Try adding a small delay when the page loads and then run the Refresh Input Variables action. This helps ensure the contact values are fully loaded before being used in the script.

    Hope this helps.



    ------------------------------
    Luiz Rosa
    Full stack developer
    ------------------------------



  • 3.  RE: Outbound contact list data delayed when attempting to use column values in the script.

    Posted 28 days ago

    Luiz,

    Agreed that delay helps deal with this. It's been frustrating not knowing how much delay to use. However, I did discover this function this morning "Wait Until" - which seems perfect for ensuring we don't try to use data until we have it. Thanks for the heads up on the Refresh Input Variables, I hadn't noticed that one. Are values from the contact list considered input variables, does that action impact those? The page below had exactly the kind of info I was trying to find - thank you for pointing it out to me. The only issue I take with how it is written is when it says that using the contact data load action under the properties of the script should solve ensuring the variables are available. We are doing that and still experience delays in the data showing up. We'll be trying out the "wait until" function to see if that works well for us. 

    Scripting best practices and recommendations - Genesys Cloud Resource Center

    Genesys Cloud Resource Center remove preview
    Scripting best practices and recommendations - Genesys Cloud Resource Center
    Scripting best practices for Genesys Cloud include using Scripter.QueueID instead of Name, triggering actions after contact data loads, avoiding page load for one time logic, and refreshing input variables for conversation updates.
    View this on Genesys Cloud Resource Center >



    ------------------------------
    Mike Bailey
    x
    ------------------------------



  • 4.  RE: Outbound contact list data delayed when attempting to use column values in the script.

    Posted 28 days ago
    Edited by Mike Bailey 28 days ago

    Here's a follow up on testing the "Wait Until" function available in scripts now (I had never seen or noticed it before). We found that it can take anywhere between 5 - 10 seconds for Outbound.Campaign Name to actually be populated. We did this by using a 'wait until' function and waiting till the length of the string return from this variable is > 0. This seems like a really long time, but I guess there's nothing we can do about it. Rather than building a single script that can be reused with multiple campaigns and respond based on logic, we are now just building static scripts for every campaign. Less elegant, but it works. Somewhat disappointed.



    ------------------------------
    Mike Bailey
    x
    ------------------------------