Quickstart #2: Slots & Resolvers
Quickstart #2: Slots & Resolvers
Quickstart #2: Slots & Resolvers
In this Quickstart guide, you’ll build on the core concepts covered in Quickstart #1 by building a more complex plugin that enables a user to find and update a feature request. As part of the building process you’ll learn how to:
The Plugin you’re about to build solves a simple, but real-world problem: enable users to find and update a feature request.
Before starting to build, we always recommend that you first map out the desired end user experience and the overall building blocks of the Conversational Process.
Here is an example of the end-user experience we hope to enable:

To get to this experience, you can set up a Data Type to represent a “feature request” object, and your core Conversational Process should consist of one Activity (powered by an HTTP Action) and two Slots required in order to run the Activity:

You’ll build an end-to-end working Plugin via these phases:
Let’s get started!
If you’ve already completed the Purple Suite Setup and have your connector configured, skip to Phase 1A.
Follow the Purple Suite Setup guide to:
<fullname>_<descriptive_name>
lucasrollo_Submit_PTO_ActionLet’s first set up an HTTP Action that will fetch available feature requests. This Action doesn’t require any dynamic inputs, and will just query an external system for a list of feature requests.
Set the following title and description for your Action (be sure to replace “firstname” and “lastname” with your corresponding information).

Enter the details of your API:
Click on the “Import” icon to the right of the “TEST” button.

Paste (don’t click “Import” yet) the following almost-ready cURL command:
Replace YOUR_PAT and YOUR_INSTANCE_ID in the pasted command with your actual API Token (PAT) and Instance ID from the Purple Suite setup.
Click “Import” (your Action should now be auto-populated with details).
Add your Connector:
Navigate to the “Connector” tab.
Select “Inherit from existing connector”.
Select the Connector you created in Phase 0 (e.g. firstname_lastname_moveworks_purple).

In the next section, we’ll build the final Action that this Plugin requires: an Action to update the status of the feature request object in the external database.
<fullname>_<descriptive_name>
lucasrollo_Submit_PTO_ActionNow, we’ll build an Action that can apply a status update to a single feature request. This Action will require two dynamic inputs (feature_request_id and new_status), and should update the feature request record in your instance’s database.
Set the following title and description for your Action (be sure to replace “firstname” and “lastname” with your corresponding information).
Enter the details of your API:
Click on the “Import” icon to the right of the “TEST” button.

Paste (don’t click “Import” yet) the following almost-ready cURL command:
Replace YOUR_PAT and YOUR_INSTANCE_ID in the pasted command with your actual API Token (PAT) and Instance ID from the Purple Suite setup.
Click “Import” (your Action should now be auto-populated with details).
Add your Connector:
Navigate to the “Connector” tab.
Select “Inherit from existing connector”.
Select the Connector you created in Phase 0 (e.g. firstname_lastname_moveworks_purple)

Define 2 formal input arguments to represent the “feature request id” and “new status” inputs that this Action requires:
Click on the “Input Args” button near the top right corner of the editor.

Click “Create New” in the “Input Arguments” pop up.
Fill out the following details for your feature_request_id argument:
Hit “Save”.
Click “Create New” again in the “Input Arguments” pop up.
Fill out the following details for your new_status argument:
Hit “Save” and hit the “X” icon to close this “Input Arguments” pop up.
You’re ready to move on — time to create your first Data Type to represent feature request objects.
<fullname>_<descriptive_name>
lucasrollo_Submit_PTO_ActionTo power the process of updating a feature request, creating a formal Data Type to represent a “feature request” object can help us encapsulate the properties of a feature request. Furthermore, one of the critical properties of this Data Type is that there’s a particular way to fetch values for the object: that’s what the Resolver Strategy you’re also about to build will take care of!
We’ll build the “feature request” Data Type with its Resolver Strategy in this phase:
Set the following title and description for your Data Type (be sure to replace “firstname” and “lastname” with your corresponding information). Note that the title will autofix itself to the appropriate formal type name (in u_ prefixed format).
Provide the schema for an object of this type:
Click “Import JSON” near the top right corner of the editor.

Paste the following JSON sample object into the popup (this will allow you to auto-generate the schema):
Click “Generate”, and verify that the auto-populated schema looks correct (matches the structure of the sample object).
Configure your Resolver Strategy. This strategy will contain one Dynamic Resolver Method, which is essentially a resolver that fetches candidate options from a dynamic source (in this case, from the “fetch feature requests” HTTP Action you configured in Phase 1A).
Navigate to the “Resolver Strategy” tab.

Fill out the following details for your Resolver Strategy Method:
Awesome work. Time to finally put this Data Type and the rest of these Actions to work in a Conversational Process.
<fullname>_<descriptive_name>
lucasrollo_Submit_PTO_ActionThis Conversational Process, like the one in Quickstart #1, will also appear to be a simple single-Activity process. Its added complexity will be in the form of two Slots, where one of these Slots will be powered by the “feature request” Data Type you just created in Phase 2.
Here’s a reminder of the bird’s eye view for our Process (2 Slots, 1 Action Activity):

To build this Conversational Process:
Navigate to a new Conversational Process (navigate to the library and click “Create”).

Set the following title and description for your Conversational Process (be sure to replace “firstname” and “lastname” with your corresponding information).
Add TWO new Slots for the Process to interact with. One will represent the feature_request to update, and the other will be the target_status to set on the feature request. 📖Learn more about Slots.
Click on the “Slots” button near the top right corner of the editor.

Click “Create New” in the “Slots” pop up.
Fill out the following details for your first feature_request Slot:
Hit “Save” (scroll to the bottom of the popup).
Click “Create New” again in the “Slots” pop up to build your second Slot.
Fill out the following details for your second target_status Slot:
Before saving this slot, you’ll add an Inline Resolver Strategy to this target_status Slot. We want to power this Slot with a **Static Resolver**(aka a resolver which is backed by static multiple choice options).
Scroll to the very bottom of this Slot creation popup and click “Add Inline Resolver Strategy”.
Click ”+ Add Method”.
Fill out the following initial details for your Method.
Add the following Static Options for your Static Resolver Method. (Note: the “Raw Value” column contains the actual values that your “update feature request” HTTP Action expects in order to successfully update the status on the feature request).
Click the “X” in the top right corner of the “Strategy Definition” pop up.
Hit “Save” (scroll to the bottom of the popup) and hit the “X” icon to close this “Slots” pop up.
Build an Action Activity that will post the status update to the feature request. 📖 Learn more about Activities.
Click on the ”+ Add a block to your process” button in the main section of the editor.
Click on “Action Activity”.

Fill out the following details for your Action Activity, which mostly involves connecting your Slot to the input(s) of the HTTP Action (and mapping the result of the Action back to the Conversational Process):
Click “Validate” (Located in the top right corner. Click on the caret icon next to the Publish button). If everything went well so far, the Console (bottom of the editor) will say “Validation successful”.
💡Pro-tip: You can also use the following hotkeys to validate without pressing the button:
We’re ready for the last step: now you’ll launch a Plugin — this packages the Conversational Process into a tool that your AI Assistant can use directly.
<fullname>_<descriptive_name>
lucasrollo_Submit_PTO_ActionIn our final section, you’ll learn how to add your Conversational Process to a Plugin, and control the Triggering scenarios of your Plugin, and specify which end users are allowed to use your Plugin.
Set the following title and description for your Plugin (be sure to replace “firstname” and “lastname” with your corresponding information).
Define a Conversational Trigger. 📖 Learn more about Natural Language Triggers.
Click on “No triggers configured”.
In the panel that appears on the right, either:
Approve (click “Trigger”) 5 of the auto-generated suggested positive examples, or
Add the following recommended utterances:
Choose your Conversational Process (the one you built in Phase 2).
firstname_lastname_update_feature_request_process)Use one of your triggering examples (e.g. “update feature request”) to access the Plugin in conversation. If all goes well, you’ll be greeted with a list of feature requests to choose from.
Try refreshing your sample feature requests in your Purple Suite instance to see the updates take effect in real time!
This Plugin involved a good number of core concepts in Agent Studio, with some special focus on the concept of Resolver Strategies. You’ve created a plugin that:
Way to stick through it, and now your Plugin is ready to enable users to seamlessly keep their feature requests up to date!
Next step: Test your plugin. See our Testing & Error Handling guide for how to test, debug, and handle errors in production.