Legacy Dev Forum Posts

 View Only

Sign Up

Creating a Decision expression (IF()) with user input

  • 1.  Creating a Decision expression (IF()) with user input

    Posted 06-05-2025 19:09

    Duncan_Stewart | 2017-11-28 20:47:37 UTC | #1

    I've defined a Collect Input node in my call flow that accepts a single character ("1 for yes, 2 for no") that evaluates to a string. I want to route the call to our Customer Service queue if they enter 2, or anything other than 1, really.

    The expression seems straightforward, but I can't seem to define the Boolean condition correctly.

    The Collect Input is defined as a string: <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/0205091399a08e846fb6c2cd952fd2ea274fcf8a.png" width="587" height="455"> <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/d7f1b9d63d10789f39e67efb896d1c4bcf5b25a9.png" width="357" height="500">

    What's the proper syntax to evaluate whether that input, Task.SubmittingInventory, is a "1" or not?

    The following is not the way, alas: If((Task.SubmittingInventory="1"), true, false)


    RogierBosch | 2017-11-29 11:31:24 UTC | #2

    (Press one for )

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/eac7921dd6b787c656c1805357dbef2dff29b95c.png" width="294" height="420">

    Decision if customer pressed 1

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/3761fb1fe30963d06ef80e0fd6485801f895f24b.png" width="297" height="173">

    Flow example and failure path (everything else then 1). You can also do with a Switch action.

    <img src="//inin-prod-use1-developerforum.s3.amazonaws.com/original/1X/e5d8b2cd2a1c2aa40e2d78dc16e3c14142c216b5.png" width="533" height="267">

    ps. community.mypurecloud.com (also) good place for Architect questions..


    system | 2017-12-30 11:31:38 UTC | #3

    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: 2158