> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.moveworks.com/llms.txt.
> For full documentation content, see https://help.moveworks.com/llms-full.txt.

# Quickstart #3: Build a Plugin That Follows a Process

# Learning Objectives

This Quickstart guide walks you through building a plugin that **helps users submit purchase requests**. The plugin follows a multi-step process: collect details, classify the request, and either submit it or send the user down a different path. You'll learn how to:

* Use a [Decision Policy](/agent-studio/conversation-process/control-flow) to control branching logic in a Conversational Process.
* Use multiple types of [Activities](/agent-studio/conversation-process/activities) in a Conversational Process to handle different tasks.
* Design a plugin that uses several [Slots](/agent-studio/conversation-process/slots) with simple [Validation Policies](/agent-studio/conversation-process/slots#slot-validation-policy).

# Prerequisites

1. Access to the "Agent Studio" App.
2. Completed [Quickstart #1: Build Your First Plugin](/agent-studio/quickstart-guide/quickstart-build-your-first-plugin).

# What you'll build

You'll build a purchase request submission plugin. It asks the user for details about the purchase request they want to submit, compares the details against historical purchase requests, and either submits it if it can be classified as "OpEx" or rejects it if it's classified as "CapEx".

Here is an example of the **end-user experience** we hope to enable:

![](https://files.readme.io/637aa418b723194dd8f85c859df5210a3d4e868514d82a421814df538ec4380c-purple-chat_3.png)

To build this, here's one way to decompose the work into a **Conversational Process**, consisting of a few *Activities* (both Action-based and Content-based), a *Decision Policy*, and a few *Slots* to power the data needed in this process:

![](https://files.readme.io/0c32f7796223116002c5711b2d2e7a2243e66e4b400c40f92078e2b071155526-Screenshot_2025-04-12_at_16.24.19.png)

In this guide, you'll work your way through these main phases:

1. Set up **2 [HTTP Actions](/agent-studio/actions)**: one to fetch historical purchase requests, and another to submit a new one.
2. Build the **Conversational Process**, complete with 4 Slots, 5 different Activities, and 1 Decision Policy, as illustrated above.
3. Add the Conversational Process to your AI Assistant by launching a **Plugin**.

*Let's get started!*

# Phase 0: Set Up the Purple Suite

<Callout intent="info" title="Already set up?">
  If you've already completed the [Purple Suite Setup](/agent-studio/quickstart-guide/purple-suite-setup) and have your connector configured, skip to Phase 1A.
</Callout>

Follow the [Purple Suite Setup](/agent-studio/quickstart-guide/purple-suite-setup) guide to:

1. Create a Purple Suite instance at [marketplace.moveworks.com/purple-suite](https://marketplace.moveworks.com/purple-suite)
2. Get your **Instance ID** and **API Token (PAT)**
3. Set up a connector in Agent Studio with API Key auth

# Phase 1A: Set up your "Get Historical Purchases" Action

<Callout intent="error" title="️ Import building notes if you are using the Moveworks Developer Labs environment">
  1. If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with `<fullname>_<descriptive_name>`
     1. For example: `lucasrollo_Submit_PTO_Action`
  2. When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
</Callout>

Let's first set up an [HTTP Action](/agent-studio/actions/http-actions) that will retrieve historical purchase requests. This Action doesn't require any dynamic inputs, and will just query an external system for a list of purchase requests.

<Steps>
  <Step title="Navigate to Agent Studio">
    Navigate to the App Picker in the top right corner. Click on "Agent Studio".

    ![](https://files.readme.io/438f1d36c6c956eb17f6e93d3ca28966a783e67a75a8e1dddcd741594258a4f8-CleanShot_2025-04-14_at_08.48.272x.png)
  </Step>

  <Step title="Create a new HTTP Action">
    Navigate to a new HTTP Action.

    ![](https://files.readme.io/f766e3b729ab041efe71fc7f811d7086cab20363a6e32e74738aa10c75965e6f-Screenshot_2025-04-11_at_22.27.04.png)
  </Step>

  <Step title="Set the title and description">
    Set the following title and description for your Action (be sure to replace "firstname" and "lastname" with your corresponding information).

    | Field           | Value to enter (replace "firstname" & "lastname" with your info) |
    | :-------------- | :--------------------------------------------------------------- |
    | **Title**       | `firstname_lastname_get_historical_purchases`                    |
    | **Description** | `Fetches a list of historical purchase requests`                 |
  </Step>

  <Step title="Import the API details">
    Enter the details of your API:

    1. Click on the "Import" icon to the right of the "TEST" button.

       ![](https://files.readme.io/211a66734c7e49958b56459da201f7c13d5db1969a9aa20538baef768b0bd03d-Screenshot_2025-04-11_at_15.39.40.png)

    2. Paste the following cURL command:

       ```shell
       curl -X GET "https://marketplace.moveworks.com/api/purple-suite/erp/purchase_orders" \
         -H "Authorization: Bearer YOUR_PAT" \
         -H "X-Instance-ID: YOUR_INSTANCE_ID"
       ```

    3. Click "Import" (your Action should now be auto-populated with details).
  </Step>

  <Step title="Add your connector">
    Navigate to the "Connector" tab, and select your existing Moveworks Purple Connector (set up in Phase 0).

    ![](https://files.readme.io/1cb57a734bacebaf642886e3960a0cf0eab133646ab10288e2e85317dffd513d-Screenshot_2025-04-12_at_02.48.16.png)
  </Step>

  <Step title="Test your action">
    Test your Action:

    1. Click on the "TEST" icon (to the right of the endpoint URL definition).
    2. Inspect the Console to verify that you receive a successful response:

       ![](https://files.readme.io/4fc1ade462018ae2d7c21fe1c60dfec6da1964fa17b5901337fbf1f52f5f6bf6-Screenshot_2025-04-12_at_16.56.14.png)
  </Step>

  <Step title="Publish">
    Hit "Publish".
  </Step>
</Steps>

<Callout intent="success" title="You've just set up 1 out of 2 custom Actions needed for this process!">
  This Action will fetch the critical history of past purchase requests (that later you'll compare a user's new request against). Next up: setting up an action to actually submit new purchase requests.
</Callout>

# Phase 1B: Set up your "Submit Purchase Request" Action

<Callout intent="error" title="️ Import building notes if you are using the Moveworks Developer Labs environment">
  1. If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with `<fullname>_<descriptive_name>`
     1. For example: `lucasrollo_Submit_PTO_Action`
  2. When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
</Callout>

The next (and final) Action to set up will add a new purchase request object (and will actually update the purchase record database in your instance!). This Action will require three dynamic inputs: `item_name`, `quantity`, and `justification`.

<Steps>
  <Step title="Create a new HTTP Action">
    Navigate to a new HTTP Action.
  </Step>

  <Step title="Set the title and description">
    Set the following title and description for your Action (be sure to replace "firstname" and "lastname" with your corresponding information).

    | Field           | Value to enter (replace "firstname" & "lastname" with your info) |
    | :-------------- | :--------------------------------------------------------------- |
    | **Title**       | `firstname_lastname_submit_purchase_request`                     |
    | **Description** | `Submits a new purchase request to Procurement`                  |
  </Step>

  <Step title="Import the API details">
    Enter the details of your API:

    1. Click on the import button to the right of the "TEST" button.

       ![](https://files.readme.io/211a66734c7e49958b56459da201f7c13d5db1969a9aa20538baef768b0bd03d-Screenshot_2025-04-11_at_15.39.40.png)
    2. Paste the following cURL command:

       ```shell
       curl -X POST "https://marketplace.moveworks.com/api/purple-suite/erp/purchase_orders" \
         -H "Authorization: Bearer YOUR_PAT" \
         -H "X-Instance-ID: YOUR_INSTANCE_ID" \
         -H "Content-Type: application/json" \
         -d '{
             "vendor": "{{item_name}}",
             "totalAmount": 1200.00,
             "lineItems": {{quantity}},
             "status": "draft",
             "currency": "USD"
         }'
       ```
    3. Click "Import" (your Action should now be auto-populated with details).
  </Step>

  <Step title="Add your connector">
    Navigate to the "Connector" tab, and select your existing Moveworks Purple Connector (set up in Phase 0).

    ![](https://files.readme.io/1cb57a734bacebaf642886e3960a0cf0eab133646ab10288e2e85317dffd513d-Screenshot_2025-04-12_at_02.48.16.png)
  </Step>

  <Step title="Define input arguments">
    Define 3 formal input arguments to represent the "item name", and "quantity", and "business justification" inputs that this Action requires:

    1. Click on the "Input Args" button near the top right corner.
    2. Click "Create New" in the "Input Arguments" pop up.
    3. Fill out the following details for your `item_name` argument:

       | Field label       | Value to enter/select                  |
       | :---------------- | :------------------------------------- |
       | **Argument Name** | `item_name`                            |
       | **Data Type**     | *Select "string"*                      |
       | **Example Value** | `pen`                                  |
       | **Description**   | `The name of the item to be purchased` |
       | **Required**      | *Check the box*                        |
    4. Hit "Save".
    5. Click "Create New" again in the "Input Arguments" pop up.
    6. Fill out the following details for your `quantity` argument:

       | Field label       | Value to enter/select                              |
       | :---------------- | :------------------------------------------------- |
       | **Argument Name** | `quantity`                                         |
       | **Data Type**     | *Select "Number"*                                  |
       | **Example Value** | `20`                                               |
       | **Description**   | `The quantity of the item in the purchase request` |
       | **Required**      | *Check the box*                                    |
    7. Hit "Save".
    8. Click "Create New" again in the "Input Arguments" pop up.
    9. Fill out the following details for your `justification` argument:

       | Field label       | Value to enter/select                                                |
       | :---------------- | :------------------------------------------------------------------- |
       | **Argument Name** | `justification`                                                      |
       | **Data Type**     | *Select "string"*                                                    |
       | **Example Value** | `Needed to refill supply closet`                                     |
       | **Description**   | `The business justification for the item(s) in the purchase request` |
       | **Required**      | *Check the box*                                                      |
    10. Hit "Save" and hit the "X" icon to close this "Input Arguments" pop up.
  </Step>

  <Step title="Test your action">
    Test your Action:

    1. Click on the "TEST" icon (to the right of the endpoint URL definition).
    2. Inspect the Console to verify that you receive a successful response:

       ![](https://files.readme.io/64ca2aecebc890a82029c8a226b960fd1370cd0694a3cf92269fa7cad5f0f178-Screenshot_2025-04-12_at_17.23.09.png)
  </Step>

  <Step title="Publish">
    Hit "Publish".
  </Step>
</Steps>

<Callout intent="success" title="Nice, your Actions are all set up and ready to go!">
  Time to construct your Conversational Process.
</Callout>

# Phase 2: Build your Conversational Process

<Callout intent="error" title="️ Import building notes if you are using the Moveworks Developer Labs environment">
  1. If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with `<fullname>_<descriptive_name>`
     1. For example: `lucasrollo_Submit_PTO_Action`
  2. When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
</Callout>

Here's a reminder of the bird's eye view for this Submit Procurement Purchase Request Conversational Process:

![](https://files.readme.io/9eca3d3718c39e3821d22d7397979bb521a98157523910b5171b8f73e2a6768e-Screenshot_2025-04-12_at_16.24.19.png)

Let's build it!

<Steps>
  <Step title="Create a new Conversational Process">
    Navigate to a new Conversational Process (navigate to the library and click "Create").
    ![](https://files.readme.io/cf672292d3288b63d4346bbc1485e470afb98eefb4dbb74b1f8a410de724a806-Screenshot_2025-04-11_at_22.25.42.png)
  </Step>

  <Step title="Set the title and description">
    Set the following title and description for your Conversational Process (be sure to replace "firstname" and "lastname" with your corresponding information).

    | Field           | Value to enter (replace "firstname" & "lastname" with your info) |
    | :-------------- | :--------------------------------------------------------------- |
    | **Title**       | `firstname_lastname_support_procurement_purchases_process`       |
    | **Description** | `This will help users submit a Procurement purchase request.`    |
  </Step>

  <Step title="Add the four Slots">
    Add the FOUR **Slots** that this process will need: `item_name`, `quantity`, `business_justification`, and `is_purchase_for_organization_acknowledgement`. 📖 *[Learn more about Slots](/agent-studio/conversation-process/slots)*.

    1. Click on the "Slots" button near the top right corner of the editor.

       ![](https://files.readme.io/66a573184d7a15edd6172d4e958100d15df2d029eb27559f307fcace224f741f-Screenshot_2025-04-11_at_22.34.38.png)
    2. Click "Create New" in the "Slots" pop up.
    3. Fill out the following details for your first `item_name` Slot:

       | Field label                     | Value to enter/select                                   |
       | :------------------------------ | :------------------------------------------------------ |
       | **Name**                        | `item_name`                                             |
       | **Data Type**                   | *Select "string"*                                       |
       | **Slot Description**            | `The name of the item that the user wants to purchase.` |
       | **Slot Validation Policy**      | *Leave blank*                                           |
       | **Slot Validation Description** | *Leave blank*                                           |
       | **Slot Inference Policy**       | *Leave as is (Infer slot value if available)*           |
    4. Hit "Save"  (scroll to the bottom of the popup).
    5. Click "Create New" again in the "Slots" pop up to build your second Slot.
    6. Fill out the following details for your `business_justification` Slot:

       | Field label                     | Value to enter/select                                              |
       | :------------------------------ | :----------------------------------------------------------------- |
       | **Name**                        | `business_justification`                                           |
       | **Data Type**                   | *Select "string"*                                                  |
       | **Slot Description**            | `A justification from the user on why this purchase is necessary.` |
       | **Slot Validation Policy**      | *Leave blank*                                                      |
       | **Slot Validation Description** | *Leave blank*                                                      |
       | **Slot Inference Policy**       | *Leave as is (Infer slot value if available)*                      |
    7. Hit "Save"  (scroll to the bottom of the popup).
    8. Click "Create New" again in the "Slots" pop up to build your third Slot.
    9. Fill out the following details for your `quantity` Slot:

       | Field label                     | Value to enter/select                                                         |
       | :------------------------------ | :---------------------------------------------------------------------------- |
       | **Name**                        | `quantity`                                                                    |
       | **Data Type**                   | *Select "number"*                                                             |
       | **Slot Description**            | `The number of units of the item that the user wants to purchase.`            |
       | **Slot Validation Policy**      | `value > 0`                                                                   |
       | **Slot Validation Description** | `The quantity for the item in the purchase request must be greater than zero` |
       | **Slot Inference Policy**       | *Leave as is (Infer slot value if available)*                                 |
    10. Hit "Save"  (scroll to the bottom of the popup).
    11. Click "Create New" again in the "Slots" pop up to build your fourth and final Slot.
    12. Fill out the following details for your `is_purchase_for_organization_acknowledgement` Slot:

        | Field label                     | Value to enter/select                                                                                                                  |
        | :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------- |
        | **Name**                        | `is_purchase_for_organization_acknowledgement`                                                                                         |
        | **Data Type**                   | *Select "boolean"*                                                                                                                     |
        | **Slot Description**            | `An explicit acknowledgement from the user that this purchase is for the organization and not for personal use.`                       |
        | **Slot Validation Policy**      | `value == TRUE`                                                                                                                        |
        | **Slot Validation Description** | `The user must explicitly acknowledge "yes" to indicate that this purchase is intended for the organization and not for personal use.` |
        | **Slot Inference Policy**       | *Select "Always prompt the user"*                                                                                                      |
    13. Hit "Save" (scroll to the bottom of the popup) and hit the "X" icon to close this "Slots" pop up.
  </Step>

  <Step title="Build the first Action Activity">
    Build the first **Action Activity** that fetch a list of historical purchase requests that the process will later compare against. 📖 *[Learn more about Activities](/agent-studio/conversation-process/activities).*

    1. Click on the "+ Add a block to your process" button in the main section of the editor.
    2. Click on "Action Activity".

       ![](https://files.readme.io/9923f68921ed0d545cac8d400cc96f427e97c3d7b97c77f8c9efd5aeb19e8bd8-Screenshot_2025-04-11_at_22.54.07.png)
    3. Fill out the following details for your Action Activity, which simply hooks up the Action you created to this Action Activity:

       <table>
         <thead>
           <tr>
             <th>
               Field label
             </th>

             <th>
               Value to enter/select
             </th>
           </tr>
         </thead>

         <tbody>
           <tr>
             <td>
               **Action**
             </td>

             <td>
               \*Select the`firstname_lastname_get_historical_purchases` Action that you built in Phase 1A \*
             </td>
           </tr>

           <tr>
             <td>
               **Required Slots**
             </td>

             <td>
               *Leave blank (no Slots are needed as input to this Activity)*
             </td>
           </tr>

           <tr>
             <td>
               **Input mapping**
             </td>

             <td>
               *Leave blank (no inputs to map to)*
             </td>
           </tr>

           <tr>
             <td>
               **Output Mapping**
               (".dot\_walk\_here" box)
             </td>

             <td>
               *Leave blank (output is fine as is)*
             </td>
           </tr>

           <tr>
             <td>
               **Output Key**
             </td>

             <td>
               `historical_purchases`
             </td>
           </tr>

           <tr>
             <td>
               **Confirmation Policy**
             </td>

             <td>
               *Leave unchecked*
             </td>
           </tr>
         </tbody>
       </table>
  </Step>

  <Step title="Build the second Action Activity">
    Build the second **Action Activity**, which will utilize a Built-in Action that can generate an output according to a natural language prompt. :book: *[Learn more about the Built-in Generate Text Action](/agent-studio/actions/built-in-actions#generate_text_action).*

    1. Click on the "+" icon below the previous Activity in the main section of the Conversational Process Editor.
    2. Click on "Action Activity".
    3. Fill out the following details for your Action Activity, which mostly involves constructing a templated prompt to the Action, and mapping the predicted purchase request classification out of the model's response:

       <table>
         <thead>
           <tr>
             <th>
               Field label
             </th>

             <th>
               Value to enter/select
             </th>
           </tr>
         </thead>

         <tbody>
           <tr>
             <td>
               **Action**
             </td>

             <td>
               *Select the`mw.generate_text_action` Built-in Action*
             </td>
           </tr>

           <tr>
             <td>
               **Required Slots**
             </td>

             <td>
               *Select 1 slot:`item_name`*
             </td>
           </tr>

           <tr>
             <td>
               **Input mapping**
               (2 fields mapped)
             </td>

             <td>
               `system_prompt: $CONCAT(["'Take the '", data.item_name, "' and compare it against the '", data.historical_purchases.$STRINGIFY_JSON(), "' to determine its Opex or Capex classification. Only output Opex or Capex'"], "")  `
               `user_input: "' '"`
             </td>
           </tr>

           <tr>
             <td>
               **Output Mapping**
               (".dot\_walk\_here" box)
             </td>

             <td>
               `.openai_chat_completions_response.choices[0].message.content`
             </td>
           </tr>

           <tr>
             <td>
               **Output Key**
             </td>

             <td>
               `pr_classification`
             </td>
           </tr>

           <tr>
             <td>
               **Confirmation Policy**
             </td>

             <td>
               *Check the "Require consent from the user" box*
             </td>
           </tr>
         </tbody>
       </table>
  </Step>

  <Step title="Build the Decision Policy">
    Build your first **Decision Policy**, which will execute after the already configured 2 Activity blocks. This policy will allow the Process to branch its execution depending on the `pr_classification` returned by the generate text Action Activity. :book: *[Learn more about Decision Policies](/agent-studio/conversation-process/control-flow).*

    1. Click on the "+" square icon below the second generate text Activity in the main section of the Conversational Process Editor.
    2. Click on "Decision Policy". (No need to input anything in the panel that appears on the right).

       ![](https://files.readme.io/bf9dab05124baa8593de3230dfe9d7ff2110945f6dd8d05dc1d2b4dc37cb9b7c-Screenshot_2025-04-12_at_18.31.00.png)
    3. Increment the number of Cases by clicking on the "+" button to the right of the words "1 case".

       ![](https://files.readme.io/bc0023b28981318b05ea335ac03acbba9209a9daabf646aaaed8be8ee94bb452-Screenshot_2025-04-12_at_18.32.32.png)
    4. Click on the *first* Case entry under the Decision Policy and enter the below DSL rule in the panel that appears on the right:

       ![](https://files.readme.io/f4ea9279552fe304dfa0f0dbd31d0be2ad1e8cb342adcea5d2b196799f2f3708-Screenshot_2025-04-12_at_18.35.31.png)

       ```Text DSL
       data.pr_classification.$LOWERCASE() == "opex"
       ```
    5. Click on the *second* Case entry under the Decision Policy and enter the below DSL rule in the panel that appears on the right:

       ![](https://files.readme.io/d5c539a7ff47cd8595735e70c743975df554da62e5f7162f7a2df3ccf08168e2-Screenshot_2025-04-12_at_18.38.57.png)

       ```
       data.pr_classification.$LOWERCASE() == "capex"
       ```
  </Step>

  <Step title="Create the OpEx Action Activity">
    Create the Action Activity that will execute under the *first* Decision Policy Case (`pr_classification` is `opex`).

    1. Click on the "+" icon below the *first* Case entry under the Decision Policy.

       ![](https://files.readme.io/3bcd2ff69cd038d21f86d26af855592e895efc9537ee87245fd97be2ec220376-Screenshot_2025-04-12_at_18.41.40.png)
    2. Select "Action Activity".
    3. Fill out the following details for your Action Activity, which will connect your slots to the input(s) of the HTTP Action (and mapping the result of the Action back to the Conversational Process).

       <table>
         <thead>
           <tr>
             <th>
               Field label
             </th>

             <th>
               Value to enter/select
             </th>
           </tr>
         </thead>

         <tbody>
           <tr>
             <td>
               **Action**
             </td>

             <td>
               \*Select the`firstname_lastname_submit_purchase_request` Action that you built in Phase 1B \*
             </td>
           </tr>

           <tr>
             <td>
               **Required Slots**
             </td>

             <td>
               *Select all 4 Slots:`item_name`, `quantity`, `business_justification`, and `is_purchase_for_organization_acknowledgement`*
             </td>
           </tr>

           <tr>
             <td>
               **Input mapping**
               (3 fields mapped)
             </td>

             <td>
               `item_name: data.item_name`
               `justification: data.business_justification`
               `quantity: data.quantity`
             </td>
           </tr>

           <tr>
             <td>
               **Output Mapping**
               (".dot\_walk\_here" box)
             </td>

             <td>
               *Leave blank (output is fine as is)*
             </td>
           </tr>

           <tr>
             <td>
               **Output Key**
             </td>

             <td>
               `submitted_pr_result`
             </td>
           </tr>

           <tr>
             <td>
               **Confirmation Policy**
             </td>

             <td>
               *Check the "Require consent from the user" box*
             </td>
           </tr>
         </tbody>
       </table>

       1. Note that even though `is_purchase_for_organization_acknowledgement` is not technically needed to invoke the submit purchase request action, marking it as a required Slot for this Activity ensures that the AI Assistant fills the Slot before executing this Activity.
  </Step>

  <Step title="Create the CapEx Content Activity">
    Create the Content Activity that will execute under the *second* Decision Policy Case (`pr_classification` is `capex`).

    1. Click on the "+" icon below the *second* Case entry under the Decision Policy.
    2. Select "Content Activity" this time.

       ![](https://files.readme.io/d49b0d9da342e99e38b4e09207f808adf307fbee690d3e6a9b5bbd9d14417a9c-Screenshot_2025-04-12_at_18.54.18.png)
    3. Keep the "Content Type" set to "Text".
    4. Paste the following text content (which will share text instructions with the user on how to submit purchase requests that fall under CapEx).
       ```text Text Content
       This request falls under CapEx. Please visit <a href="https://www.google.com">CapEx Submission Portal</a> to submit your request.
       ```
  </Step>

  <Step title="Create the default Content Activity">
    Create the Content Activity that will execute under the `default` branch (when `pr_classification` somehow is neither `opex` nor `capex`).

    1. Click on the "+" icon below the *second* Case entry under the Decision Policy.
    2. Select "Content Activity" again.
    3. Keep the "Content Type" set to "Text".
    4. Paste the following text content (which will share text instructions with the user on how to submit purchase requests that fall under CapEx).
       ```text Text Content
       Unfortunately, this purchase request could not get categorized, so it was not submitted. Please feel free to try submitting another request.
       ```
  </Step>

  <Step title="Validate">
    Click "Validate". If everything went well so far, the Console (bottom of the editor) will say "Validation successful".

    1. 💡Pro-tip: You can also use the following hotkeys to validate without pressing the button:

       | On a MacOS machine | On a Windows machine |
       | :----------------- | :------------------- |
       | Cmd + Shift + V    | Ctrl + Shift + V     |
  </Step>

  <Step title="Publish">
    Click "Publish", review details, and Click "Publish" once again.
  </Step>
</Steps>

<Callout intent="success" title="Congratulations! You've just built the main part of this Plugin: the Conversational Process.">
  Way to stick through all the steps! We're ready for the last phase: now you'll launch a **Plugin** — this packages the Conversational Process into a tool that your AI Agent can use directly.
</Callout>

# Phase 3: Launch a Plugin

<Callout intent="error" title="️ Import building notes if you are using the Moveworks Developer Labs environment">
  1. If you are working in a Moveworks lab environment, name anything you save (Plugin, Action, Data Type, etc.) with `<fullname>_<descriptive_name>`
     1. For example: `lucasrollo_Submit_PTO_Action`
  2. When launching your Plugin, make sure to only launch to yourself! You can do this by going to Your Plugin > Launch Configuration > Allow Selected Users > the email on your credential card
</Callout>

It's finally time to add your Conversational Process to a **Plugin**, where you can control the Triggering scenarios of your Plugin and specify which end users are allowed to use your Plugin.

<Steps>
  <Step title="Create a new Plugin">
    Navigate to a new Plugin (navigate to the library and click "Create").
    ![](https://files.readme.io/2538849f05fc57c0680d22e384afc549488573cf9bbb9e2445136573a31d527a-Screenshot_2025-04-11_at_22.23.36.png)
  </Step>

  <Step title="Set the title and description">
    Set the following title and description for your Plugin (be sure to replace "firstname" and "lastname" with your corresponding information).

    | Field           | Value to enter (replace "firstname" & "lastname" with your info)                                                                                                                                                                                                                                                                                                                                                            |
    | :-------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Title**       | `firstname_lastname_support_procurement_purchases`                                                                                                                                                                                                                                                                                                                                                                          |
    | **Description** | `This will help users submit a Procurement purchase request. This first compares the name of the purchase request that the user wants to submit against a list of historical purchase requests to determine whether the request is classified as "OpEx" or "CapEx". Depending on the classification, it will either submit the purchase request directly for the user or give the user more information on how to proceed.` |
  </Step>

  <Step title="Define a Conversational Trigger">
    Define a Conversational Trigger.  📖 *[Learn more about Natural Language Triggers](/agent-studio/core-concepts/conversational-plugins/natural-language-triggers).*

    1. Click on "No triggers configured".
    2. In the panel that appears on the right, either:

       1. Approve (click "Trigger") 5 of the auto-generated suggested positive examples, or
       2. Add the following recommended utterances:

          | Utterances to add                                     |
          | :---------------------------------------------------- |
          | `submit purchase request`                             |
          | `how can i submit a purchase request to procurement?` |
          | `I need to order 100 pens for the office `            |
          | `I need to submit a purchase request for a laptop`    |
          | `Can I submit a purchase order?`                      |
  </Step>

  <Step title="Choose your Conversational Process">
    Choose your Conversational Process (the one you built in Phase 2).

    1. Click on "No body configured".
    2. In the panel that appears on the right, search for and select the Conversational Process that you built in Phase 2 (should be named `firstname_lastname_support_procurement_purchases_process`)
  </Step>

  <Step title="Define your Launch Configuration">
    Define your Launch Configuration.

    1. Navigate to the "Launch Configuration" tab.

       ![](https://files.readme.io/d4019c54aae64f4d69e70c8f759774bb183bfa5cf1d821981394731cfab4f6ca-Screenshot_2025-04-12_at_00.05.14.png)
    2. In the Input field under "Allow selected users", enter your email (or multiple emails using commas to separate the email addresses).

       ![](https://files.readme.io/8bf3be36c9cca23420ce9b386d1e9bf3ec64573f5cb43d0504844ad4e5b7a015-Screenshot_2025-04-12_at_00.07.06.png)
  </Step>

  <Step title="Publish">
    Click "Publish" to launch your Plugin.
  </Step>
</Steps>

<Callout intent="success" title="Woohoo! You've finished building your Plugin — time to try it out!">
  Use one of your triggering examples (e.g. "*submit purchase request*") to access the Plugin in conversation. Try refreshing your submitted purchase requests tab in your [Purple Suite](https://marketplace.moveworks.com/purple-suite) session to see the updates take effect in real time!
</Callout>

# Reflecting on this Plugin

The plugin you just built contains a plethora of Agent Studio concepts, from different Activity types to Decision Policies. There's a lot it had to take care of:

* **Retrieve historical purchases** from an external source.
* **Perform classification on the fly** to figure out how to categorize the user's intended purchase.
* **Make an informed decision** on the best way to support the request, depending on the predicted classification.
* **Collect critical information** that's needed for submitting a purchase request.
* **Executes for the right users at the right moments** via Triggering and Launch configurations you've set up.

Congratulations on building this powerful plugin — it's now ready to help support users with their procurement purchase needs!

<Callout intent="info">
  **Next step: Test your plugin.** See our [Testing & Error Handling guide](/agent-studio/guides/testing-and-error-handling) for how to test, debug, and handle errors in production.
</Callout>