What is the possibility to change the colour of the text message from the bot asking for only time in a DateTime entity

Hi,

How can I update the text color in the bubble, that asks for the time when a DateTime entity is presented and only the Date is given to the bot. Please see the attached screenshot for more context. I am using native mobile SDK’s, not web SDK.

@chandrahasan1 This message appears to the user as a standard response at the condition “Ask user to enter time”. (Natural Language > Default Conversation > Standard Responses)

Could you configure the template as mentioned in the below topic by applying a channel specific override at web/mobile SDK to change the font color?

Thanks @Subrahmanyam for your prompt reply.

Now, I understood where to customize these standard bot messages. I got stuck on how to send the date parameter to the custom JS. Please shed some light. PFA the screenshots of Simple mode and Advance mode code. Thank you.

29%20AM
17%20AM

@chandrahasan1 You should write the custom logic at the channel specific override if you have to present the date passed by the user. The value provided by the user at the entity should be available under the context and under BotUserSession.

@Subrahmanyam can you please share the code, on how I can access the date to be presented to the user. Thanks.

Please refer to the below screenshot of context holding the input as provided by the user.
image

Without too much trouble, in Simple Mode, I am able to access the data as shown in the screenshot using .

14%20PM

And the output is 01%20PM

But the by same date variable, I cannot achieve this in JS code in Advance mode.

Yes, at the simple editor, the developer doesn’t have the option to apply a color coding for the message. The key can only be accessible at the simple editor and not at the advanced editor.

At the advanced JS editor, developer have to code the logic to present the message, in this case, even the date based on the user input.

As a side note, the keys, for instance <date> are only supported at relevant conditions of standard responses and not for all.

1 Like

Got it @Subrahmanyam.

Thank you.