Google Assistant | Register user with our Action

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Create an Action and Fulfillment for Google Assistant to register a user with our client’s internal database

 

Project Background

  • This project aims at creating an Action &  Fulfillment in Google Assistant

  • 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

 

Code access

This is the first contest in the series and thus there is no source code to share

 

Individual requirements

Create an Action & Fulfillment to register a user with our client’s internal database (Major Requirement)
 

  • Create Actions Project using the Conversational workflow (DialogFlow).

  • In this, create an action through DialogFlow which will allow a user to register themselves with our client.

  • The details of this action are as follows:

    • The invocation name will be Smart Toner

    • The Default Welcome Intent’s response will be “Hello, this is Smart Toner here. How can I help you?”.

    • Additionally, declare a Registration Intent, where the user will intend to register themselves. In its basic form, the user will say “I wish to register”. However, you need to come up with multiple training phrases that the user can say to trigger this intent. Kindly note that the user could also invoke the action with the registration intent itself (Ok Google, tell Smart Toner  that I wish to register), in which case, instead of the Default Welcome Intent, you will trigger the workflow for the Registration Intent immediately.

    • The registration intent needs the email address of the user. For this, you will proceed with the Account Linking based on the Google Sign-In workflow. This means that once the user indicates their intent to register, one of two things will happen:

      • If this is the first time that the user is using the Action, you will proceed to inform the user that they need an account with Smart Toner. The reason to create an account with Smart Toner will be “To fetch the email address used when you registered your printer”. If the user gives their consent, proceed to retrieve their email address. You do not have to store the email address, only retrieve it and then proceed with the “registration” described further below.

      • If the user has consented to sharing their email address before with our Action, then you should already have their email address information in your conversation object. Use it and proceed with the “registration” described further below.

    • If the user attempts to do anything else beside register, you need to respond to the user with “I am sorry, I did not understand that. I can only register you with our Smart Toner service at the moment. Please say `I wish to register` to begin the registration process.”

  • Registration of a user is through Fulfillment. Use the Inline Editor and write your fulfillment code in nodejs here.

    • The code starts off with initializing a variable with a bunch of users in it. Each user will have multiple attributes, namely email address, first name, last name and an attribute named “isRegistered”. This will be our “database”. In the next contest, we will integrate an actual database, but for now, we will be mocking it. You need to store 10 or more users in this.

    • Next, for the registration intent, once we have the email address with us, we will “query” the mock database for an entry with the provided email address.

    • If an entry is found, we will check the isRegistered column.

    • If the isRegistered column has a value of “Y”, we will respond to the user with “Thank you. We find that email address ${email_address} has already been registered”. Here email_address refers to the email address of the user which you need to substitute.

    • If the isRegistered column has no value, we will change its value to “Y” and then respond to the user with “Thank you. ${email_address} is now registered.

    • If no entry is found with the provided email address, we will proceed to respond to the user with “Thank you. However, we could not find ${email_address} in our records. We could not complete the registration process.”.

    • Note that you will NOT add any user to the list of users, only check if the user with that email address exists in your list or not.

    • Irrespective of which scenario plays out and which response is sent to the user, after responding to the user, end the conversation with “Thank you for using Smart Toner”.

 

Deployment guide and validation document

You will be sharing the source code that we need to copy into the inline editor for Fulfillment. You will have to describe the steps to import your agent. Finally, the agent itself needs to be connected to Actions on Google, along with a description of how to demo / simulate the assistant with your solution (with account linking).

 

Thus, provide a deployment guide that walks us through each of the above steps to deploy your solution. You have to start from the beginning - creating an Actions project, and end with how to test / simulate your solution to verify it. You can provide a markdown based or a Word based document too. Kindly provide images in your deployment guide.

 

Important Notes

  • 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: 30092849