arrow_back

Managing Environments with Dialogflow CX

Acceder Unirse
Test and share your knowledge with our community!
done
Get access to over 700 hands-on labs, skill badges, and courses

Managing Environments with Dialogflow CX

Lab 1 hora 30 minutos universal_currency_alt 1 crédito show_chart Intermedio
Test and share your knowledge with our community!
done
Get access to over 700 hands-on labs, skill badges, and courses

SCBL095

Lab objectives

In this lab, you will explore the management of Dialogflow environments. By the end of this lab, you will be able to:

  • Create versions of your virtual agent.
  • Create environments where your virtual agent will be published.
  • Load a saved version of your virtual agent to an environment.
  • Change which version is loaded to an environment.

Resources

The following are some resources intended to help you complete the lab components:

  • Download and use the following sample virtual agent during the lab:
  • Download and refer to the following when you want to compare your work with the sample solution to this lab:

Setup and requirements

Setting up the lab

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources will be made available to you.

This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.

What you need

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
  • Time to complete the lab.

Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.

Note: If you are using a Pixelbook, open an Incognito window to run this lab.

Task 1. Getting started with Dialogflow CX

In this task, you'll get logged into Dialogflow CX and create a new agent.

Note: Name your virtual agent 'Flight Booker' when you get to that point in the steps.

Assumption: You've already logged into Google Cloud before continuing with the steps below.

  1. In an new incognito window, navigate to Dialogflow.

  2. Click on Sign-in with Google.

  3. Select the student account that you started the lab with.

Next, you explicitly specify that you want to use Dialogflow CX instead of Dialogflow ES.

  1. In the menu bar at the left, click on Dialogflow CX.

    A new page for Dialogflow CX opens and a blue Dialogflow icon appears. On this page, you should see a pop-up asking you to select a project.

  2. Search the list in the pop-up for the project that matches your assigned Project ID for this lab. Click on your project ID.

Note: If you don't see your Project ID listed, look at the user on the right side to confirm that you are using Dialogflow CX as "student".

Dialogflow CX title bar highlighting the project box and the user avatar

You will now see a page telling you "To use Dialogflow CX with this project, enable the following APIs".

  1. Click on Enable API.

    It shouldn't take more than half a minute or so for this activity to complete.

    If it seems this task is taking a long time, refresh the page.

    Once complete, you will be on the Dialogflow CX Agents page.

  2. Click on Create agent.

  3. If prompted with Get started with Dialogflow CX click Build your own.

  4. Enter a name for the agent (e.g., "Cloudio-cx").

  5. Set the location to .

  6. Ensure timezone and default language are set appropriately.

  7. Click Create.

    Once the agent is created, you will see the design and configuration portion of the Dialogflow CX UI.


Task 2. Importing a .blob virtual agent file

In this task, you will import a virtual agent from an earlier lab.

  1. Select View all agents from the Agent dropdown menu at the top.

  2. Click the context menu (three vertical dots) to the right of your virtual agent.

  3. Select Restore from the expanded menu options.

  4. Select the Cloud Storage radio button if not already selected.

  5. Enter gs://cloud-training/T-CECCAI-I/T-CCAICDCX-I/lab-solns/Cloudio-cx-speak-to-person.blob for URI.

  6. Click Restore.

    Refer to the Dialogflow CX restore documentation as needed.

Now you have a virtual agent that has everything completed from an earlier lab.

Note: If you'd like to retain a copy of the sample agent, download gsp929-start-agent.blob to your local hard drive.


Task 3. Creating environments

  1. Click on the Manage tab in the main menu.

  2. Select Environments on the left side.

  3. Click + Create to create a new environment.

  4. Enter QA for the display name.

  5. Click Save.

    You'll see a message saying There should be a version config of 'Default Start Flow' in the environment.. Why do you think this is?

    Hint: we haven't yet created a published version of the Default Start Flow (or any other flow for that matter).

  6. Select Versions in the main menu.

  7. Click on Default Start Flow.

  8. Click + Create to create a version of the flow.

  9. Enter Cloudio main v1 basic chat bot for the display name.

  10. Click Save.

    You should now see the Default Start Flow in the Versions list with the number of # versions equal to 1.

  11. Select Environments to return to configuring a new environment.

  12. Click + Create.

  13. Enter QA for the display name.

  14. Choose Cloudio main v1 basic chat bot from the Version dropdown list next to the Default Start Flow.

  15. Click Save.

    You may see a message such as

Version 'projects/qwiklabs-gcp-03-407df58d36b0/locations/us-central1/agents/e2779218-b813-4844-a0ea-ec2ef504636d/flows/00000000-0000-0000-0000-000000000000/versions/1' is not ready to serve because its training is RUNNING. Wait for training to finish or fix the version if its training failed.

This is caused when Dialogflow is still capturing and training your versioned agent. Try saving again after waiting a few moments.

You should now see your new QA environment in the list.


Task 4. Managing environments

Next, you can test out your versioned virtual agent in the environment you created.

  1. Click on Test Agent in the upper right to open the simulator pane.

  2. Select QA from the Environment dropdown.

  3. Enter Is there a customer service rep I can talk to? in the Talk to agent box.

    You should get a response from the agent saying "Please stand by while I connect you with a customer service representative."

    This is one of the ways you can run test cases in different environments.

    Next, you'll make a change to your virtual agent and save it as a new version.

  4. Click on the Build tab from the main menu.

  5. Click on the Speak to Person page.

  6. Click on the Entry fulfillment that says Please stand by while I connect you with a customer service representative..

  7. Change the Agent says prompt to I'll get you to a live agent right away.

  8. Click Save.

  9. Go back to Manage and Versions.

  10. Repeat the versioning steps above to create a new version of your Default Start Flow called Cloudio main v2 basic chat bot.

  11. Repeat the steps above to create a new environment called Dev that uses the new version of your Default Start Flow.

    You should now see the number of versions incremented to 2 for the Default Start Flow in the Versions list.

    Note: You may again get an error similar to the following, so just wait a few moments and try saving again. "Version 'projects/qwiklabs-gcp-00-fe6cab958249/locations/us-central1/agents/6792c492-5f79-4ccf-8f17-e757b34f38b9/flows/00000000-0000-0000-0000-000000000000/versions/2' is not ready to serve because its training is RUNNING. Wait for training to finish or fix the version if its training failed."
  12. Click on QA in your Environments section.

  13. Select your Cloudio main v2 basic chat bot from the dropdown.

  14. Click Save.

    Now your latest version of your flow is loaded to the QA environment.

    Next you'll go back to the simulator to test your new Cloudio main v2 basic chat bot version.

  15. Select Dev from the Environment dropdown in the simulator.

  16. Enter Is there a customer service rep I can talk to? in the Talk to agent box.

    You should get a response from the agent saying I'll get you to a live agent right away. indicating that it was running the v2 of your agent.

    Note: You could have run the test against your virtual agent in Draft. By selecting a specific environment, the test is running the version of your virtual agent loaded to the specified environment (which may be different from what you're currently working on in Dialogflow in Draft mode). Another benefit is you can test different versions without going through the process of retraining the model (which can take some time for larger, more complex virtual agents).

That's it! Now you can manage different versions and run tests in different environments.


End your lab

When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.

You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.

The number of stars indicates the following:

  • 1 star = Very dissatisfied
  • 2 stars = Dissatisfied
  • 3 stars = Neutral
  • 4 stars = Satisfied
  • 5 stars = Very satisfied

You can close the dialog box if you don't want to provide feedback.

For feedback, suggestions, or corrections, please use the Support tab.

Copyright 2023 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.