Alexa announce a response without extra Intent request - alexa-skills-kit

I am implementing a custom alexa skill that having a request which is used to post a message (eg: Bring account files) on slack chat.The user who receives the order and responding after skill closed.Is there any way to announce the user's reply (eg: will bring in 10 minutes) through alexa device without any extra intent request.

No. This is however, a much requested feature. So I recommend you vote for it here:
https://alexa.uservoice.com/forums/906892-alexa-skills-developer-voice-and-vote/suggestions/32555959-enable-and-allow-true-push-capabilities

Related

How to build in app notification service?

I'm learning backend and API development and trying to understand how to implement some features from scratch without using any paid third party service.
I want to understand this concept from design as well as implementation pov. Please share if you have any resources where I can learn how to code the below service.
How to build in app notification service like one of these from scratch ?
Notification when user likes or comments on a post (Instagram, Twitter)
Notification when someone views your profile (Linkedin)
Notication when a channel you are subscribed to uploads a video (Youtube)
These are different from push notifications like
Notification when someone sends you a message (All chat apps)
Live status via notification of your delivery (Food delivery apps)
Push notifications need not be stored permanently in any database but what happens with in app notifications? How to build such service which is scalable too.
One possible solution I could think of is this, for notification on post like
User A has made a post.
User B likes their post.
From likePost API emit an event which will notify User A that User B liked their post, listen for these real time events on client side. This can be done via sockets.
Do not store any notifications in database, just update the notifications in UI on that event emitted by likePost API or listen to real time changes in likes attribute of a User's Post table (is this possible?) and update UI.
In UI just show all such notifications by fetching from likes and comments table.
But I wonder how scalable is this approach.
I searched but couldn't find any good resources regarding this, so please if anyone could explain this or provide link to any blog or videos it will be helpful.
(P.s. I'm an undergrad student and don't have experience in system design and architectures, just started learning about these so just curious)
Thanks.
apps like Facebook, Instagram and linkedIn provides web hook of notifications. Webhooks allow you to receive real-time HTTP notifications for subscribed events. This functionality is only available for applications with an approved use case for webhooks. Webhhook received as a notification when user comment on your post or like your post, a web hook can be used to retrieve the information of post, comment and commentor etc.
I am attaching a reference of LinkedIn web-hook.
https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation

FareNabber API on Sabre - where do the notifications go

I am interested in seeing if Sabre's FareNabber is an API that works for an application I am building.
The documentation here https://developer.sabre.com/docs/read/rest_apis/air/search/fare_nabber does not explain where/how the notifications get posted to after a subscription made. All I see is the following:
FareNabber nabs the itinerary options and pushes the results to the customer for a purchase decision.
Is this an email to the customer? Is this an HTTP POST with a JSON payload to a server I provide so I can handle the actual email transmission? Where is this documented?
Re Endpoint you set this up during activation:
Note: This service requires activation, please contact your Sabre Account Representative for assistance.
Actually yes you get a JSON - its specified here: http://files.developer.sabre.com/doc/providerdoc/STPS/fare_nabber/v100/FNB_LowFareNotification.json

How to add "subscribe button" in facebook messenger bot?

I need to add a button (subscription ) in my messenger bot through which users can subscribe. and after that bot will automatically send latest post to the users at the specific time.
I was going through documentation but i am unable to find any proper documentation for it.
Can anybody please help regarding that?
Facebook don't provide a mechanism to manage subscriptions. It's up to you as a developer to choose how to implement this - for example using a button with a payload to confirm that the user wants to opt in.
You could perhaps put an Opt Out option in your persistent menu and listen for the relevant payload and unsubscribe the user.
Facebook have published some documentation about this, explaining how they expect subscription messaging to be triggered:
Person sends a message to a business or clicks on a call to action button within Messenger to request subscription messaging
Person requests subscription messaging from a business via a Send to Messenger plugin
Person signs up for SMS alerts
See the full page of documentation at https://developers.facebook.com/docs/messenger-platform/policy-overview#messaging_types for more details on their expectation

How can I test subscription renewal flows in stripe?

I want to test my application's handling of webhook events from stripe when a subscription payment has been made (or failed). Here is what I've tried so far:
Set up a new subscription
Update user's credit card to be the one that can be added to an account, but will fail to actually be charged
Change the trial end date to be in one second
Wait a few seconds expecting the webhook to be sent
However, According to the documentation:
If you have configured webhooks, the invoice will wait until one hour after the last webhook is successfully sent (or the last webhook times out after failing).
One hour is a long time to wait, since I am trying to do this as part of an automated integration test suite.
One suggestion (from IRC) is to fake out the webhook request, so that my integration test sends the event, instead of Stripe sending it. However, since Stripe doesn't include any sort of HMAC in the webhooks, I can't trust the data in the payload. So, my application just takes the event ID from the webhook payload and fetches the event from the Stripe API:
If security is a concern, or if it's important to confirm that Stripe sent the webhook, you should only use the ID sent in your webhook and should request the remaining details from the API directly.
This will obviously not work if I am trying to inject fake events for my test (by design).
What are the best practices for testing this sort of scenario?
It seems there isn't a perfect way to do this. As suggested by #koopajah in a comment, I added a configuration value in my application that will disable fetching the event from Stripe, and instead just trust the event data in the webhook. This allows me to test my flow in almost the same way as it would work on production, since the event data in the webhook and the event fetched from Stripe are identical (assuming it is an authentic webhook request :)
Unless/until Stripe includes an HMAC signature in the webhook request to authenticate that it came from them, I think this is the best way to solve the problem.
One hour is a long time to wait, since I am trying to do this as part of an automated integration test suite.
You can shorten the wait by going to the invoice and selecting the "Charge customer" button, as shown below.

How to process a google-checkout "buy-now button" transaction?

Google-checkout has a wizard that creates the html code for the button, but how do I have my website get confirmation that the transaction has been completed (or that it wasn't)?
EDIT: I have already seen pages such as https://developers.google.com/checkout/developer/Google_Checkout_HTML_API_Notification_API#Receiving_and_Processing_Notifications and the like. But I don't know how to implement them. For example: what is "HTTP Basic Authentication" , "HTTP request headers" , "HTTP 200 response code" , "POST" , etc.
So what I need is a simple (!) example with minimum code.
You would have to implement Google's Notification API. You can read about it here: Implementing the Notification HTML API.
Edit
In Response to:
Thanks. But unfortunately I don't know enough web developing to know
how to apply what is written there.
I'll be honest with you. Simple is relative and if you aren't familiar with some of the fundamental concepts as POST and request headers, it's likely you will never get a simple response.
Having said that, I believe the simplest solution for you is to manually confirm the transaction upon receipt of the confirmation email.
I envision that you would have some sort of management screen that displays a list of all 'pending' transactions. When you receive your confirmation email from Google, you would simply mark the corresponding transaction as having been completed. This is not entirely uncommon. In fact, since you are using single-item purchases using the Google button, this is probably the best option for you.
A more complex scenario (again not a simple solution), would be to create a service that will parse your emails and using some voodoo to map those emails to the corresponding transaction in your web app. This, though, is probably as advanced as implementing the Notification API.

Resources