Skip to content

Commit 7cb3093

Browse files
Merge pull request #31690 from MicrosoftDocs/main
[AutoPublish] main to live - 04/27 08:10 PDT | 04/27 20:40 IST
2 parents 4dab2ee + 819a3df commit 7cb3093

2 files changed

Lines changed: 128 additions & 58 deletions

File tree

copilot/employee-self-service/facilities-fm-create-ticket.md

Lines changed: 64 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -115,88 +115,102 @@ The ticket creation process uses two AI prompts: one to identify the problem cat
115115

116116
To route facilities issues to the right technician, extract the problem category from the user's description.
117117

118-
- Create a new prompt in Copilot Studio. Go to [Power Apps](https://make.powerapps.com/) and select AI Hub > Prompts > Build your own prompt.
119-
- Copy the prompt instructions from the Copilot Studio Samples repository: [Extract Problem category](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/Extract%20Problem%20category.md?plain=1), and paste them into the Instructions section. Adjust the instructions as needed for your scenario.
120-
- Add two input text parameters by selecting **Add content: Problem Description** (next to the Problem Description input) and **Categories** (next to the Reference Categories Data input), as shown in the screenshot.
118+
1. Create a new prompt in Copilot Studio. Go to [Power Apps](https://make.powerapps.com/) and select AI Hub > Prompts > Build your own prompt.
119+
1. Copy the prompt instructions from the Copilot Studio Samples repository: [Extract Problem category](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/Extract%20Problem%20category.md?plain=1), and paste them into the Instructions section. Adjust the instructions as needed for your scenario.
120+
1. Add two input text parameters by selecting **Add content: Problem Description** (next to the Problem Description input) and **Categories** (next to the Reference Categories Data input), as shown in the screenshot.
121121

122-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-prompt.png" alt-text="Power Apps prompt builder showing instructions to extract a problem category, with Problem Description and Categories input fields.":::
122+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-prompt.png" alt-text="Screenshot that shows the Power Apps prompt builder displaying instructions to extract a problem category, with Problem Description and Categories input fields.":::
123123

124-
- Update the Categories input by adding or editing the list of problem categories for your organization. If your categories are stored in Dataverse, you can use that data instead.
124+
1. Update the Categories input by adding or editing the list of problem categories for your organization. If your categories are stored in Dataverse, you can use that data instead.
125125

126-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-prompt-edit.png" alt-text="Expanded “Categories” field showing an editable, comma-separated list (for example, plumbing, electrical, cleaning).":::
126+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-prompt-edit.png" alt-text="Screenshot that shows the expanded _Categories_ field showing an editable, comma-separated list (for example, plumbing, electrical, cleaning).":::
127127

128-
- Test the prompt.
129-
- Enter a sample **Problem Description** and choose a model. For consistent behavior, use the same model as your Employee Self-Service agent. Select **Test** to confirm the category returned for your scenarios.
130-
- Optionally, try other available models and compare results before you standardize on one.
128+
1. Test the prompt.
129+
1. Enter a sample **Problem Description** and choose a model. For consistent behavior, use the same model as your Employee Self-Service agent. Select **Test** to confirm the category returned for your scenarios.
130+
1. Optionally, try other available models and compare results before you standardize on one.
131131

132-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-problem-desc.png" alt-text="Prompt test panel with a sample description entered and the model returning the matched category in the output pane.":::
132+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-category-problem-desc.png" alt-text="Screenshot that shows the prompt test panel with a sample description entered and the model returning the matched category in the output pane.":::
133133

134-
- Save the prompt as **Prompt to Extract Problem Category**.
134+
1. Save the prompt as **Prompt to Extract Problem Category**.
135135

136136
### *AI prompt to extract location information*
137137

138138
To dispatch facility services to the right place, extract location details from the user's request.
139139

140-
- Create a new prompt in Copilot Studio. Go to [Power Apps](https://make.powerapps.com/) and select AI Hub > Prompts > Build your own prompt.
141-
- Copy the prompt instructions from the sample: [Extract Location Information](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/Extract%20Location%20Information.md?plain=1), and paste them into the Instructions section. Adjust the instructions as needed for your scenario.
142-
- Add the input text parameter Facilities Description next to the Facilities Description input by selecting **Add content**, as shown in the screenshot.
140+
1. Create a new prompt in Copilot Studio. Go to [Power Apps](https://make.powerapps.com/) and select **AI Hub** > **Prompts** > **Build your own prompt**.
141+
1. Copy the prompt instructions from the sample: [Extract Location Information](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/Extract%20Location%20Information.md?plain=1), and paste them into the Instructions section. Adjust the instructions as needed for your scenario.
142+
1. Add the input text parameter Facilities Description next to the Facilities Description input by selecting **Add content**, as shown in the screenshot.
143143

144-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-location-prompt.png" alt-text="Power Apps prompt builder showing instructions to extract location details, with a “Facilities Description input field.":::
145-
- Test the prompt and save it as **Extract Location Information**.
144+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-extract-location-prompt.png" alt-text="Screenshot that shows the Power Apps prompt builder with instructions to extract location details, with the Facilities Description input field.":::
145+
1. Test the prompt and save it as **Extract Location Information**.
146146

147147
## Create a Power Automate flow
148148

149149
In this example, the Facilities Management ticketing system is built on Dynamics 365 (Field Service). The flow uses the Dataverse connector to create a ticket in the corresponding Dataverse tables.
150150

151151
Use the following steps to create an agent flow that the topic can call.
152152

153-
- In Copilot Studio, create a new agent flow under Flows.
153+
1. In Copilot Studio, create a new agent flow under Flows.
154154

155-
- Add the trigger **When an agent calls the flow** and the action **Respond to the agent**.
155+
1. Add the trigger **When an agent calls the flow** and the action **Respond to the agent**.
156156

157-
- Define the input variables the topic passes to the flow (for example: problem category, location, and description).
157+
1. Define the input variables the topic passes to the flow (for example: problem category, location, and description).
158158

159-
- Add an action to create the ticket by calling your backend. Use the Dataverse connector (or an HTTP action if your system exposes an API).
159+
1. Add an action to create the ticket by calling your backend. Use the Dataverse connector (or an HTTP action if your system exposes an API).
160160

161-
- Capture the result (for example: ticket ID, status, and message) and return it in Respond to the agent.
161+
1. Capture the result (for example: ticket ID, status, and message) and return it in Respond to the agent.
162162

163163
## Create a topic
164164

165165
Steps:
166166

167-
- Create a topic named **Create Facilities Management Ticket**.
168-
- In Copilot Studio, select **Add a topic > From blank**.
169-
- Once inside the topic, select **Open code editor**.
170-
- Copy the topic YAML from the sample repository and paste it into the code editor: [topic.yaml](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/topic.yaml), and close code editor.
171-
- In the topic workflow editor, locate the **Prompt Location** reference. Select the double-arrow button to open **Add a tool**, and then choose the **Extract Location Information prompt** you created earlier.
172-
173-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-add-location-prompt.png" alt-text="Copilot Studio topic editor with the “Add a tool” panel open and “Extract Location Information” selected.":::
174-
- Repeat the previous step for the problem category prompt and the action (the flow).
175-
- Resolve any validation errors, and then select **Save**.
176-
177-
- Validate.
178-
- Open the visual representation of the topic and verify the end-to-end flow.
179-
- Run Topic checker to identify any static issues.
180-
- Optionally, follow the next section (Review the topic workflow) for a guided walkthrough of what to verify.
181-
- Test the topic.
182-
- In Copilot Studio, select Test to open the test chat.
183-
- Enter a sample request such as There's a water leak in the first-floor bathroom.
184-
- Complete any required fields in the ticket form, and then submit.
185-
- After submission, the Employee Self-Service agent confirms that the Facilities Management ticket was created.
167+
1. Create a topic named **Create Facilities Management Ticket**.
168+
169+
a. In Copilot Studio, select **Add a topic > From blank**.
170+
171+
b. Once inside the topic, select **Open code editor**.
172+
173+
c. Copy the topic YAML from the sample repository and paste it into the code editor: [topic.yaml](https://github.com/microsoft/CopilotStudioSamples/blob/main/EmployeeSelfServiceAgent/Facilities/EmployeeCreateFacilitiesManagementTicket/topic.yaml), and close code editor.
174+
175+
d. In the topic workflow editor, locate the **Prompt Location** reference. Select the double-arrow button to open **Add a tool**, and then choose the **Extract Location Information prompt** you created earlier.
176+
177+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-add-location-prompt.png" alt-text="Screenshot that shows the Copilot Studio topic editor with the _Add a tool_ panel open and Extract Location Information selected.":::
178+
179+
e. Repeat the previous step for the problem category prompt and the action (the flow).
180+
181+
f. Resolve any validation errors, and then select **Save**.
182+
183+
1. Validate.
184+
185+
a. Open the visual representation of the topic and verify the end-to-end flow.
186+
187+
b. Run Topic checker to identify any static issues.
188+
189+
c. Optionally, follow the next section (Review the topic workflow) for a guided walkthrough of what to verify.
190+
191+
1. Test the topic.
192+
193+
a. In Copilot Studio, select Test to open the test chat.
194+
195+
b. Enter a sample request such as There's a water leak in the first-floor bathroom.
196+
197+
c. Complete any required fields in the ticket form, and then submit.
198+
199+
d. After submission, the Employee Self-Service agent confirms that the Facilities Management ticket was created.
186200

187201
## Review the topic workflow
188202

189-
- Review the Trigger node text (the description shown to users). Adjust it as needed for your scenario.
203+
1. Review the Trigger node text (the description shown to users). Adjust it as needed for your scenario.
190204

191-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-codeeditor-trigger-queries.png" alt-text="Topic editor showing the Trigger node with example phrases (for example, “report a water leak,” “request a repair”).":::
192-
- Confirm the next node stores the user's natural language input in a variable, and that the following message acknowledges receipt.
193-
- Verify the prompt node that extracts location information and confirm it maps inputs/outputs correctly.
194-
- Verify the prompt node that extracts the problem category and confirm it returns the expected category values.
195-
- Review the Adaptive Card node and ensure it shows problem category, location, and description as required fields. Users should be able to edit values and select Submit or Cancel.
205+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-codeeditor-trigger-queries.png" alt-text="Screenshot that shows the Topic editor with the Trigger node and example phrases such as _report a water leak_ and _request a repair_.":::
206+
1. Confirm the next node stores the user's natural language input in a variable, and that the following message acknowledges receipt.
207+
1. Verify the prompt node that extracts location information and confirm it maps inputs/outputs correctly.
208+
1. Verify the prompt node that extracts the problem category and confirm it returns the expected category values.
209+
1. Review the Adaptive Card node and ensure it shows problem category, location, and description as required fields. Users should be able to edit values and select Submit or Cancel.
196210

197-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-adaptive-card.png" alt-text="Adaptive Card ticket form in chat with fields for category, location, and description, plus Submit and Cancel buttons.":::
211+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-topic-adaptive-card.png" alt-text="Screenshot that shows an Adaptive Card ticket form in chat with fields for category, location, and description, and Submit and Cancel buttons.":::
198212

199-
- Confirm the topic branches based on the selected action. For **Submit**, verify it calls the flow you created earlier (under Create a Power Automate flow) and handles the returned response.
213+
1. Confirm the topic branches based on the selected action. For **Submit**, verify it calls the flow you created earlier (under Create a Power Automate flow) and handles the returned response.
200214

201215
## FAQs
202216

@@ -220,11 +234,11 @@ Review the following areas:
220234

221235
- **AI prompt:** Make sure the Location and Category prompt outputs contain the values you expect. To troubleshoot, temporarily display the output variables by using a Send a message node.
222236

223-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-faq-prompt.png" alt-text="Topic workflow diagram with a “Send a message” node showing extracted location and category variables for debugging.":::
237+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-faq-prompt.png" alt-text="Screenshot that shows the topic workflow diagram with a _Send a message_ node showing extracted location and category variables for debugging.":::
224238

225239
- **Flow:** Check the flow run history for failed runs and validate connector configuration, inputs, and returned outputs.
226240

227-
:::image type="content" source="media/facilities-fm-create-facilities-ticket-faq-flow.png" alt-text="Power Automate run history listing recent runs with status, start time, and duration.":::
241+
:::image type="content" source="media/facilities-fm-create-facilities-ticket-faq-flow.png" alt-text="Screenshot of the Power Automate run history listing recent runs with status, start time, and duration.":::
228242

229243
- **Error handling logic:** Verify your conditional branches cover common failure cases and that each branch returns a clear, actionable message.
230244

0 commit comments

Comments
 (0)