Create a Conversational Process
In this exercise we will include the Actions and Data Type in a Conversational Process. This will allow us to have control over the logic and execution of one or more actions.
-
In Agent Studio, navigate to Conversational Process

-
On the top right, click the “CREATE” button

-
Name the conversational process with the same naming convention we used to build an action. . Add the description as seen below as well.
Or copy paste from here: firstname_lastname_create_change_request Creates a Change Request in ServiceNow and assesses risk based on historical data
-
Before we begin, we must determine the inputs we need before running the process. In this case, we need 2 inputs:
- The Configuration Item object - The Configuration Item related to the CR
- The short description - a string representing the feedback comment
-
Click on “Slots” and you should see this dialog. We will create 2 new slots and you do this by clicking “Create New”


-
When creating each slot, you will name the input variable, here I named it configuration_item. For the Data Type, choose the data type you just created for the Configuration Item. Add a clear description in “Slot Description”. Leave everything else as is and click the “X” button on the top right. We will do the same for the short description variable of type “string”.


-
Now that we have our inputs or “Slots” defined, we can proceed with building the conversational process. Click “Add a block to your process” and then “Action Activity”


-
The first step in the process will be to look up the CR close notes based on the related Configuration Item. In the “Action” section, start typing your name to see the Actions that you built and are available to you.

-
Select the “Firstname_Lastname_lookup_cr_notes_by_ci” action.
Under “Required Slots” select “configuration_item”. (or whatever you named your variables if different). This action only requires this slot as an input to perform this action.
We only collect 2 inputs at the conversational process. Because we are going to determine risk by feeding close notes to the LLM, we will imply this field rather than having the user explicitly give it to us.
Slots at the Conversational Process Level are referenced using “data.”
Since this HTTP Action requires a ci_sys_id as input, we are going to extract it from the data object we received as an input slot. Our data “Input Mapping” should look something like this

ci_sys_id: data.configuration_item.sys_id
system_prompt: ‘“Analyze the following JSON of past close notes and determine a risk level (Low, Moderate, or High). Consider the total successes and failures. Positive sentiment for 90% or more would be Low. Positive senitment at 50% or more would be Moderate. Positive sentiment at 25% would be High. Only output the recommended risk level as a single word, either High, Moderate, or Low.”’ user_input: $STRINGIFY_JSON(data.historical_data)
ci_sys_id: data.configuration_item.sys_id risk: data.risk_result.generated_output short_description: data.short_description
category: response.result.category number: response.result.number priority: response.result.priority risk: LOOKUP(): default: response.result.risk key: response.result.risk mapping: “2”: “‘High’” “3”: “‘Moderate’” “4”: “‘Low’” short_description: response.result.short_description url: $CONCAT([“https://platformdemo33.service-now.com/change_request.do?sys_id=”, response.result.sys_id], "")