setting up nexmo test messaging for classified listings - vonage

Here is what I am looking to setup & I'm wondering if it is possible:
I have a classified ads site where people can join the site and then are allowed the ability to email any listing. I would like to add the ability for people to text message listings as well.
Listing owners would add their cell numbers if they would like to be contacted via text message, the site would then allow user to text BUT it would not show real phone numbers, each listing owner would be assigned a nexmo number and if they choose to give out their phone numbers, they can.
Then, I would also like the ability to send out a general broadcast to all users. Is this possible? And, if so, how would I integrate something like this?

Yep all of that is possible with Nexmo you seem to have 3 or 4 separate use cases here so lets break those down:
When your users sign up for your site you'll want to capture their Cell numbers against their account, you might want to use the Nexmo Verify product as part of that signup to ensure you have a correct and valid mobile number.
For users to be able to add listing via text you would need to get a nexmo number for them to send their listing to, that would be one number for the whole site and you could look at the senders number to link the message to an account (from the one you captured at registration) If you don't recognise the sender of a listing message then you'll want to send back some kind of response asking them to register and a link.
For buyers to contact sellers without revealing their numbers this is a very common use case called 'Message (or Call) Proxy' you need to rent a number for each seller (or listing) so you'll need to factor that into your pricing, then you forward any messages sent to the number to the seller, you will also have to implement some logic to handle replies and track state in your application, within SMS there is no concept of a reply so each message has no association with the previous one, this is a bit tricky when you have several conversations going on over the same number.
Finally the 'broadcast' this would just be a case of iterating over the list of numbers you have for your users and sending the message to each one, you will need to ensure that you comply with any regulations around sending of bulk messages in the country you are sending to, more details for that are on the nexmo knowledgebase https://help.nexmo.com/hc/en-us

Related

Get Stream Chat: Is it possible to hide message from the customers?

I'd like to add messages that are visible only to our support team, but should be hidden on the customer side.
The opposite should also be possible, how can I send a message from the backend straight to the customer but hide it for our support team?
Tried to search about SYSTEM messages but didn't find anything usable.

What is the Get URL to fetch TEAM roster or user profile information?

Can someone please share the postman to fetch TEAM roster or user profile information. I am referring to https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=json
The Url you need is this: [serviceUrl] + "/v3/conversations/{teamId}/members/"
and it is based on two variables: the "teamId" is obviously different per team. However, the first part of the address (called the ServiceUrl) can also vary between teams, based on where they might be hosted, and you need both.
It sounds like, from the link you sent, that you already have a bot? If so, your bot can retrieve both of these required parameters. One way is that, whenever a user sends a message to the bot, to get the ServiceUrl and TeamId that are sent in the incoming "activity" object that. However, if you want it even earlier than this (i.e. before a user even sends a message to the bot), have a look at the conversationUpdate event here which will fire right when the bot is first added to the conversation.
Does that help?

Dialogflow v2 user input and fulfillment

I am writing a Dialogflow v2 chatbot with Actions on Google.
I am asking for users to create a list and then have the option for ordering them.
I need to get a few pieces of information from the user. Her name, phone number and address.
Then I need the name of the vendor and their mobile number where the order will be forwarded.
If they have already given their name, I want to show it to them and have them confirm it.
The problem is that everything is an intent.
As an example they say Order from my list. I have to ask them for a store name e.g. Walmart. Now the problem is that I may not have all the vendors in an entity list. And if they just say Walmart, how do I know if it's a vendor name. I know I could have a follow up intent but not sure what happens when they don't say the right thing.
Basically, this is how I want the conversation to go.
They create a list which I have working.
Then they say order from list
Chatbot ask for the name of the store and mobile number to order from
Chatbot checks the name in the database and if doesn't exist adds it.
Asks for name, number address of the user
Shows the order, the vendor and the user's name and address
Passes this information to the server fulfillment hook.
Next time it needs to sense that it knows the user name, address and number and ask the user to confirm.
In simple terms, you would need to rely on contexts and webhook for validating the store name.
If the store is not valid, reset the context (same as input) and politely ask the user to provide the right store name.
Maintain a counter in parameters to keep track of the number of wrong attempts.
Increment that counter when wrong, reset when correct.
If the counter reaches 3 or 4, politely reply back that you could not serve them this that vendor and ask them to try the app later.
If this assistant app is US based you may need to add Transaction API as well to show the final order and confirm back to the user. Transaction API is available in the US as of now so keep that in mind.

Track multiple context for the same Bot

We have a bot that will be used by different customers and depending on their database, sector of activity we're gonna have different answers from the bot and inputs from users. Intents etc will be the same for now we don't plan to make a custom bot for each customer.
What would be the best way to separate data per customer within Chatbase?
I'm not sure if we should use
A new API key for each customer (Do we have a limitation then?)
Differentiate them by the platform filter (seems to not be appropriated)
Differentiate them by the version filter (same it would feel a bit weird to me)
Using Custom Event, not sure how though
Example, in Dialogflow we pass the customer name/id as a context parameter.
Thank you for your question. You listed the two workarounds I would suggest, I will detail the pros/cons:
New API Key for each customer: Could become unwieldy to have to change bots everytime you want to look at a different users' metrics. You should also create a general api (bot) where you send all messages in order to get the aggregate metrics. This would mean making two api calls per message.
Differentiate by version filter: This would be the preferred method, however it could lengthen load times for your reports as your number of users grows. The advantage would be that all of your metrics are in one place, and they will be aggregated while only having to send one api call per message.

sending notifications to selected multiple users

In my app I have a user hierarchy in form of a tree of users
A user can send a notification to all its subordinates, including indirect.
What is the best way to achieve this with Azure Notification Hub?
I see I can choose between either registration management from device or from backend.
Leaving aside the security, I don't see too much of a difference for my scenario. I guess the tag is the user id.
If 100 users need to receive a notification, I need to call 100 times to send the notification.
Is there a better way?
Yes, in general you are right - call 100 times. Do not use 'tag1 || tag2 ...' expression to reduce number of calls because it was originally designed for broadcast.
But for the particular case it is often possible to figure out much better way to implement the things based on some limitations (number of users, max hierarchy depth etc...) and other factors. So you could describe you application in more detailed way right here or contact Microsoft support or just email me directly or we even could setup phone or Skype meeting. What does work best for you?

Resources