Genesys Cloud - Developer Community!

 View Only

Sign Up

TypeError When Adding New Language to Published Flow via SDK

  • 1.  TypeError When Adding New Language to Published Flow via SDK

    Posted 9 days ago

    TypeError When Adding New Language to Published Flow via SD

    I'm encountering a TypeError: Cannot read properties of undefined (reading 'cases') when attempting to edit an already published flow using the Genesys Cloud Flow Scripting API SDK. The error specifically occurs when adding a new language to the flow.

    • SDK: purecloud-flow-scripting-api-sdk-javascript
    • Node.js Version: v20.19.4
    • Operation: Editing published flow to add a new language
    • Error Location: scripting.bundle.js:105:213501

    Error Details

    TypeError: Cannot read properties of undefined (reading 'cases')
        at A._updatePromptReferencesForAudioCases (C:\home\site\wwwroot\node_modules\purecloud-flow-scripting-api-sdk-javascript\build-scripting\release\scripting.bundle.js:105:213501)
    

    The error occurs in the _updatePromptReferencesForAudioCases method, which suggests the SDK is trying to:

    • Update or iterate through audio prompt references
    • Access a cases property on an object that is undefined
    • Process menu actions or switch cases that contain audio prompts

    1. Has anyone encountered this issue when adding languages to existing flows?
    2. Is there a specific way to handle audio prompt cases when adding new languages programmatically?
    3. Should the flow be in a specific state (draft vs published) when adding languages via SDK?
    4. Are there known data structure requirements for audio menu cases when working with multi-language flows?

    #Architect
    #PlatformSDK

    ------------------------------
    Muhammed Shibil
    Senior Software Engineer
    Feebak : The Voice of Customer
    ------------------------------