Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Implement a Push Notification in an existing Action on Google

  • Integrate the existing Action on Google with Google Shopping Express

 

Project Background

  • This project aims at creating an Action in Google Assistant with Fulfillment through Azure based services.

  • The Action will allow users to register themselves with a service

  • Primarily, the service will notify the user when their printer is low on ink. The user would have shared their printer details with the service earlier (out of scope for this project)

  • The user can also use our Action to shop for new ink and toner cartridges.

 

Technology Stack

  • Actions on Google (Conversational workflow / DialogFlow)

  • Nodejs

You DON’T need Azure for this contest. You can use the inline code editor for Fulfillment

 

Code access

We will share the assets for an Action on Google that we created in the first contest. This currently uses Firebase for Fulfillment and not Azure. We will share this in the contest forum.

 

Individual requirements

Implement a Push Notification in an existing Action on Google (Major Requirement)

  • For the existing Action on Google, we would like you to implement a Push Notification, where our app can notify the user when they are low on ink.

  • The old workflow / conversation is as follows (Current conversation - which will be updated as part of this contest):

    • Step 1: The bot will greet the user

    • Step 2: The user will indicate that they wish to register

    • Step 3: The app / bot will ask for permission from the user to read their google account email address.

    • Step 4: Once permission is granted, the bot will proceed to check the retrieved email address against a list of existing users. If permission is not granted, the bot does not proceed any further and lets the user know that they need to give permission to proceed.

    • Step 5: When permission is granted and if a match is found, it “registers” the user. If the user was already registered, it lets the user know.

    • Step 6: If a match is not found, it lets the user know. No “registration” of the user takes place in this scenario

  • The new workflow will be as follows (You need to update the conversation to match below):

    • At Step 5 above, once the user has registered, instead of ending the conversation, the bot will now tell the user that they can notify the user when their ink is low. Instead of ending the conversation with “Thank you for using Smart Toner”, the bot will now say “I can alert you when your printer is running low on ink. Would you like that?”. Display a suggested chip that says “Yes, I would like receive the alert”.

    • When the user opts-in, you will remember the user’s decision in the userStorage object. If the user does not opt-in, the next time the user triggers the registration intent, you need to check this object and prompt the user. Note that the user can register AND not opt-in for the push notifications. The next time the user decides to register, the bot will inform the user that they have already registered and follow it up by asking the user if they wish to be notified when they are low on ink.

    • When the user opts-in, store the user id and the intent along with the user details (just like how we set the value for isRegistered field to “Y”, create two new fields to store the userid and intent, which are populated only when the user opts-in to receive alerts).

Create new Intent to register to receive notifications when ink is low (Major Requirement)

  • You also need to explicitly support an intent, like the registration intent, where the user will invoke the bot and will want to be notified when their printer is low on ink. They can either invoke the action, then trigger the intent or invoke the action by specifying the intent directly.

  • Provide a nodejs script, that we will run locally. We will update it with the userid and intent and other configurations as needed and run the script, which will send a push notification to the corresponding user. The text of the notification does not matter as long as the user gets a notification. Kindly describe in a README or your deployment guide on how to execute your script and the configuration needed

Integrate the existing Action on Google with Google Shopping Express (Major Requirement)

  • When the user receives the notification from the earlier requirement, they may respond to it by invoking the PurchaseToner intent which can be as simple as “I wish to purchase toner”.

  • When this intent is detected, the bot needs to:

    • Store the current time (as orderedTime) and status (as order status) with a value of “done” for that user in the mock database (create two new fields to store this information)

    • Invoke the Google Content API for Shopping. In particular, the bot needs to make this request. While the API returns back with the merchant info, the bot will instead respond with “Order for 1 toner cartridge has been placed.” and end the session. Kindly prove that the request to Content API was a success.

    • For now, we will only get the merchant info, to prove that integration with Google Shopping Express works.

  • You need to create your own merchant account during development. You can follow this guide.

 

Deployment guide and validation document

Update the provided deployment guide. You don’t have to submit a PDF version. Only the Word document needs to be updated with any new steps needed as part of this contest

 

Important Notes

  • Follow existing conventions used in the current Action on Google

  • You are building the Action for Google Assistant, intended for use on Google Home devices.

  • You need to support scenarios where the user might not give the correct response or if the user’s intent is not understood clearly. Guide the user to register themselves successfully.

  • The source code that you share, that needs to be copied to the inline editor - lint the code using standard lint.



Final Submission Guidelines

Zip the source code that needs to be copied over to the inline editor (NOTE that it contains a package.json file too, that you have to share). The exported agent itself will be a zip file. And then there is the Deployment Guide. Archive all three files into a single .zip file and upload to Topcoder.

 

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30094220