How do I access the name, age and language variable in my bot?

I am setting payload from react native app like this -

YMChat.setPayload({ name: “Purush”, age: 21, lang: Hindi });

How do I access the name, age and language variable in my bot?

1 Like

@Arjun_Bhagat you can use this syntax {{profile.payload.data}} to access data from payload.
For more info, checkout this doc: Web Client | yellow.ai

This does not work with react native. I am not using the web client, I have an android app.

@Pratik Please check my reply above.

let bot_payload = {
            name: this.Profile_Store?.user?.data?.FullName,
            lang: i18n.locale == 'en' ? 'en' : 'hi',
            contactNo: this.Profile_Store?.user?.data?.ContactNo,
            userID: this.Profile_Store?.user?.data?.UserID,
            triggerJourney: 'edm_chatbot'
        }
        YMChat.setPayload({ ...bot_payload });