List of items entity when list has only one item


For a ‘list of items enumerated’ entity that derives the list from an api call, is it possible to default the value when the list of items has only one item?

For example for a bank account entity , the bot should not ask for the account anymore if the user has only one account.

While you ready the list of items you must have been using something like a context.myValues and setting them with the required structure. In the same script you can also check the length of the response and assign the entity there itself - like:
context.entities.myLovEntity = 'response.body.key.<<theValueAttributeOfTheOption'>>;
Hope this helps.