Making a list in Architect

Hi, could someone help me with creating a list within Architect? I am asking for an intent in a Bot Flow, which is initiated through an Inbound Messaging flow. We have 5 options we want to present to a customer. Here's the start of it

What I’d like is for those options beneath the first text box to appear as a list. At the moment, it appears in the chat as “Please say one of the following Ceremony Booking Fees Giving Notice” so it’s all as one. I’m assuming I might need to write this as an expression, but I haven’t had to do this yet so a bit of help would be appreciated if you know how to do this!

At the moment, the expression looks like this:

MakeCommunication(
"Please say one of the following:",
"Ceremony Booking",
"Fees",
"Giving Notice",
"Plan Ceremony",
"Certificates")

I haven't tested this, but possibly the text sequence

"Please say one of the following"

followed by an Expression sequence of:

ToCommunication(
    MakeList(
        "Ceremony Booking",
        "Fees",
        "Giving Notice",
        "Plan Ceremony",
        "Certificates"
    )
)

could return these in list form.

Secondly, have you seen the tutorial videos here?

The video in the "Build a bot flow conversation" section gives an example of a prompt asking for intent that is phrased in such a way that a list is not needed. However, there's more to your use case I don't know, so if you do need a list, maybe the above idea will help.

Thanks for this! The code you gave has pretty much worked, the only thing I want to add is a line break between the text and the expression - what's the best way of doing that?
Is there a particular coding language I need to learn to start being able to write these expressions myself?

This is how it appears currently:
message

I was able to test this and get it to display correctly by removing the text sequence and moving the prompt inside of the list, like:

ToCommunication(
    MakeList(
        "Please say one of the following"
        "Ceremony Booking",
        "Fees",
        "Giving Notice",
        "Plan Ceremony",
        "Certificates"
    )
)

In the Expression editor, the F() tool is an index of functions you can use with the expressions. If you use that resource and know how to invoke the functions, it becomes easier.

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