Send /intent as payload instead of a String

Hi Everybody,

building the assistant, is it wise (or even good UX practices) to use intents straightforward on a payload instead of a string. in order to make sure my assistant will call that intent for sure ?

E.g:

def run(self,dispatcher,tracker,domain):
    if tracker.get_latest_input_channel() == 'facebook':
        buttons =[
            {
                "content_type": "text",
                "title": "check account balance",
                "payload": "/check_account_balance"
            }

             ]

        .... 

I believe it will ensure that (and only that) intent always runs as well as save me some processing power

Thanks in advance

Hi @jusce17!

Yeah, that’s how it should be done. As you said, “/intent” will trigger that particular intent. So it is better to use “/intent”.

1 Like