Archy 2.1.3 throws error when publishing Bot Flow with empty intents

The latest version of Archy (2.1.3) fails when trying to re-publish a Bot flow that has an empty array for the intents (which is the value of the property when exported from Architect). Below is how to reproduce this error:

  1. Publish the Bot Flow: bot-flow-empty-intents.yml (3.4 KB)
  2. Publish the same Bot Flow a second time and an error will be thrown:
TRACE:[architect.validation] Unhandled exception caught!
Failure during validate
updating description from 'undefined' to ''.
(node:87887) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'filter' of undefined
   at /snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:71:850016
   at Array.forEach (<anonymous>)
   at N.updateIntents (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:71:849904)
   at N.<anonymous> (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:71:847099)
   at Generator.next (<anonymous>)
   at /snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:16:1758
   at new Promise (<anonymous>)
   at c (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:16:1503)
   at N.initializeDesignTime (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:71:846892)
   at /snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:2024589
   at Function.gt (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:1:10846)
   at Y._initializeDesignTime (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:2024553)
   at Y._initializeDesignTime (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:366585)
   at Y.initializeDesignTime (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:201657)
   at S._processManifestResults (/snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:1948650)
   at /snapshot/architect-archy/node_modules/purecloud-flow-scripting-api-sdk-javascript/build-scripting/release/scripting.bundle.js:43:1947891

The error appears to originate from the purecloud-flow-scripting-api-sdk-javascript package. When you navigate to where the stack-trace is pointing, you find the code e.intents.filter.

Workaround

After exporting the YAML file for a Bot Flow that has an empty array of intents, replace the intents within settingsNaturalLanguageUnderstanding to:

  settingsNaturalLanguageUnderstanding:
    nluDomainVersion:
      intents:
        - utterances:
            - segments:
                - text: test2
            - segments:
                - text: test
          entityNameReferences: [ ]
          name: Example
      entities:
        - name: TestSlot
          type: "builtin:number"
      entityTypes: []
      language: en

Publishing the flow multiple times now works.

Hello!

I am one of the Product Managers for Bot Flows.

A minimum number of intents use to be a requirement, however we recently removed this when we released "global slots", i.e. the ability to create a bot with slots only, for example, ask ID number, do lookup then transfer to the right agent. Looks like this change hasn't made it's way to Archy yet.

One of the team will look into this tomorrow for you.

Nicola

1 Like

Hi Lucas1,

I've identified the issue and will have a fix for this in the next release of Archy. Thanks again for reporting this issue!

Jon

2 Likes

Thank you both for your prompt responses!

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