0

I have defined a parameter named age of the type @sys.age When trying to access it through fulfillment, its showing no output in the first line and falls into the else clause.

function EntryPointHandler(agent) {
    const number = agent.parameters.age;
    agent.add(`inside fulfilment1`+ number);

    if(number < 18 )
    {
      agent.add(`Sorry, we dont have products for under ages under 18`);
    }
    else {
      agent.add(`Thank you, do you have an ID`);
    }

  }
Sonali Gupta
  • 494
  • 1
  • 5
  • 20

1 Answers1

1

To access age value, you should use the following,

 const age = agent.parameters.age.amount;

enter image description here

shradha
  • 471
  • 3
  • 6