How to add clickable code in text message(SMS)? - node.js

I am sending a One time passworde or verification code from my node js application. I am actually sending this text
const message = `Nekmart.Do not share PIN and security code with others.
Nekmart never asks for those. Your Nekmart security code is ${otp} .
Validity 5 minutes.`
But When I received this text as SMS. I found the OTP code is not clickable. Like the following image-
But I see many SMS with this type of verification code with clickable functionality. Like somthigng-
Here We can see this is clickable. When someone click to that area, they can see some options.
My question is When I send the message text Then Why that otp code is not clickable. How can I do that?

SMS messages are only text, you cannot mark them up in any way to make the SMS application render them differently. It is entirely down to the SMS application on the device for how it decides to render the message and whether it makes an OTP code clickable.
There is nothing that you can do here.

It's true that SMS messages are just straight text and cannot be formatted, but systems interpret the codes on their own. For example, when you write "Your invite code is: 01010101", iOS will make it clickable.

Related

How to handle clicks in buttons left on screen but no longer valid, in Microsoft Bot Framework?

I'm a bit confused about something. We are building a bot with Microsoft Bot Framework (v3 -- I know, I know, it's old, but that's what they want us to do) and at startup we offer the user th choice of two paths to follow, using buttons. It works fine, but the buttons remain on the screen after the user has clicked, as is normal. Should we attempt to handle a user click in the buttons after we have passed from their actual point of use? That is, let's say we've passed through all our waterfalls and are back at the root dialog? How we detect these clicks and intercept them and give suitable feedback (e.g. "That's not a valid choice"?).
At present, it seems there is some routing going on before the user click even gets to our root dialog --
> ChatConnector: message received. UniversalBot("*") routing <null> from
> "emulator" Library("BotBuilder").findRoutes() explanation:
> ActiveDialog(0.1) ...BotBuilder:prompt-text - WARN: Prompt - no
> intent handler found for null ...BotBuilder:prompt-text -
> Session.send() ...BotBuilder:prompt-text - Session.sendBatch() sending
> 1 message(s)
A generic "I didn't understand. Please try again." reply is sent automatically, which seems to come from botbuilder/systemResources.js. Is this, then, the correct and expect behaviour?
I'm a bit confused, as I thought the message would always get to the root dialog and we would have a chance to evaluate it there. I've put a breakpoint in the root dialog, but it never reaches it when I click on an 'already used' button.
Thanks for any insights!
I've faced a similar scenario. I have several forms as adaptive cards and also a carousel of hero cards. What I do is make sure some of the data returned on buttons clicks (or taps) is unique for every form. Then when I'm expecting a form I check if it's the right one, otherwise anything else (including messages with no luis intents) is rejected and I ask the user to answer the current question or cancel while looping back a step.
So for example, in the data for this button
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"data": {
"x": 13
}
}
...
]
I would add "form" or maybe "dialog" with unique values that you can check for when you expect a specific form/card. In other places where I just expect text then I just ignore forms and re-ask the question.
I'm not how it works for NodeJs but in C#, buttons (and CardActions with MessageBack/PostBack) come under Context.Activity.Value whereas text responses are in Context.Activity.Text

Is it possible to have a dynamic payload value in a Messenger button?

I'm struggling with a payload issue on a Facebook messenger bot.
How to pass a parameter in the payload. I simply want to stock an info before launching a webview on a button.
But my postback can't interpret the dynamic payload.
I read that some people are using m.me links with parameters but i sounds weird that you can't pass parameters with m.me links.
Any idea.
Putting this answer from comment thread here if anyone needs it:
You can set the payload of the button dynamically when you define the button, but the payload only accepts a string, so you can stringify the object to set the payload, then parse it when the payload is received.

NODE.JS: Submit form without page reload?

I have a form with action attribute and within: input text and submit. When the user presses submit, the information they provided will be used to send a text message using Twilio. My question is how do I do this without reloading the page or going to another a page? Instead, I would rather have a cool small animation that displays whether it sent successfully or not, with the page remaining the same.
Thank you for your help. Much appreciated!
I basically did what zeronone said with listener on submit event, but instead wrote "return false;" preventing the page reload. I then included ajax, and the rest of the code remained basically the same.

Docusign API Custom Button with SFDC - giving error

I am trying to create a custom button for Sales to drive a custom routing and I'm getting the following error: "A problem with the OnClick JavaScript for this button or link was encountered: Unexpected identifier"
Here is the text of the button. I'm having a hard time troubleshooting this, because the error is rather vague.
Here's the Code:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} var RC='';var RSL='';var RSRO='';var RROS='';var CCRM='';var CRL='';var CCTM='';var CCNM='';var CRCL='';var OCO='';var DST='';var LA='';var CEM='';var CES='';var STB='';var SSB='';var SES='';var SEM='';var SRS='';var SCS ='';var RES='';RC='';RSL='2';RSRO='';RROS='';CCRM=''CRCL='';CRL='Email~matt.moog#powerreviews.com;FirstName~Matt;LastName~Moog;Role~Signer 2;RoutingOrder~2;Email~legal#powerreviews.com;FirstName~Legal;LastName~Department;Role~Carbon Copy;RoutingOrder~'Email~{!Opportunity.OwnerEmail};FirstName~{!Opportunity.OwnerFirstName};LastName~{!Opportunity.OwnerLastName};Role~Carbon Copy;RoutingOrder~3';CCTM='';CCNM='';CRCL='';OCO='';DST='';LA='0';CEM='Hello,I am sending you this request for your electronic signature, please review and electronically sign by following the link below.We highly recommend that you use the electronic signature to speed the process, however, if you do need to sign manually, please click the MORE button at the top of the Docusign screen and select the "Sign on Paper" option - and complete the process as defined in the dialog box in Docusign. Otherwise, there may be delays in the execution of this process.We appreciate your cooperation.';CES='PowerReviews Request to eSign Contracts - {!Account.Name}';STB='1';SSB='1';SES='1';SEM='1';SRS='1';SCS='1';RES='1,2,2,1,15,3';window.location.href = "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&SourceID={!Opportunity.Id}&RC="+RC+"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM+"&CCTM="+CCTM+"&CRCL="+CRCL+"&OCO="+OCO+"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES+"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES+"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
You have CCRM=''CRCL=''; it needs to be changed to CCRM='';CRCL='';

i see some strange code in the window that pops up in facebook sdk at my iphone

i use this code at my post window in facebook sdk in my iphone app
[mainDelegate._session dialog:#"feed" andParams:params andDelegate:self];
when the windows shows up i see the following code in the words i used for my description.
span class text_exposed_hide ... span span class text_exposed_showspan class text_exposed_hide ... span span class text_exposed_show
what is this code about? should be visible to me or not?
this code is no visible when i post to facebook!!! how do i get rid of it in the window anyone?
The code you see is so that Facebook can limit the amount of text displayed and show a More link when it's on Facebook. I don't know how to get rid of it yet, but am also experiencing it. I'll post a reply if I find out more.
Update: From what I can tell this only happens with the Description and not with the Caption. It didn't used to happen (I have apps that I haven't changed that also exhibit this behaviour) so will have to put it down to Facebook - no doubt they want us to switch to the Graph API instead (which doesn't have a preview!)

Resources