Skip to content

Commit 1071f6d

Browse files
Merge pull request #125 from ServiceNow/patrice/dynamic-guidance
Add dynamic guidance tasks
2 parents 0e62399 + fb7a157 commit 1071f6d

32 files changed

+2165
-13
lines changed

src/browsergym/workarena/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,17 @@
2323
from .tasks.knowledge import __TASKS__ as KB_TASKS
2424
from .tasks.list import __TASKS__ as LIST_TASKS
2525
from .tasks.navigation import __TASKS__ as NAVIGATION_TASKS
26+
from .tasks.navigation import __DYNAMIC_GUIDANCE_TASKS__ as NAVIGATION_DYNAMIC_GUIDANCE_TASKS
2627
from .tasks.service_catalog import __TASKS__ as SERVICE_CATALOG_TASKS
2728
from .tasks.service_catalog import __DYNAMIC_GUIDANCE_TASKS__ as SERVICE_CATALOG_DYNAMIC_GUIDANCE_TASKS
2829
from .tasks.case import __TASKS__ as CASE_TASKS
2930
from .tasks.role import __TASKS__ as ROLE_TASKS
31+
from .tasks.interaction import __TASKS__ as INTERACTION_TASKS
32+
from .tasks.change_request import __TASKS__ as CHANGE_REQUEST_TASKS
33+
from .tasks.customer_account import __TASKS__ as CUSTOMER_ACCOUNT_TASKS
34+
from .tasks.incident import __TASKS__ as INCIDENT_TASKS
35+
from .tasks.license import __TASKS__ as LICENSE_TASKS
36+
from .tasks.ritm import __TASKS__ as RITM_TASKS
3037
from .tasks.compositional.base import CompositionalTask
3138

3239
ALL_WORKARENA_TASKS = [
@@ -50,8 +57,15 @@
5057

5158
ALL_WORKARENA_DYNAMIC_GUIDANCE_TASKS = [
5259
*SERVICE_CATALOG_DYNAMIC_GUIDANCE_TASKS,
60+
*NAVIGATION_DYNAMIC_GUIDANCE_TASKS,
5361
*CASE_TASKS,
5462
*ROLE_TASKS,
63+
*INTERACTION_TASKS,
64+
*CHANGE_REQUEST_TASKS,
65+
*CUSTOMER_ACCOUNT_TASKS,
66+
*INCIDENT_TASKS,
67+
*LICENSE_TASKS,
68+
*RITM_TASKS,
5569
]
5670

5771

@@ -106,6 +120,17 @@
106120
"workarena.servicenow.multi-chart-value-retrieval": "dashboard",
107121
"workarena.servicenow.single-chart-value-retrieval": "dashboard",
108122
"workarena.servicenow.single-chart-min-max-retrieval": "dashboard",
123+
# dynamic guidance tasks
124+
"workarena.servicenow.order-iphone": "service catalog",
125+
"workarena.servicenow.order-mobile-phone": "service catalog",
126+
"workarena.servicenow.order-software": "service catalog",
127+
"workarena.servicenow.order-software-access": "service catalog",
128+
"workarena.servicenow.order-reset-password": "service catalog",
129+
"workarena.servicenow.order-packaging-and-shipping": "service catalog",
130+
"workarena.servicenow.order-paper-supplies": "service catalog",
131+
"workarena.servicenow.order-misc-hardware": "service catalog",
132+
"workarena.servicenow.order-misc-hardware-with-business-justification": "service catalog",
133+
"workarena.servicenow.order-reset-password": "service catalog",
109134
}
110135

111136

src/browsergym/workarena/api/requests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,12 @@ def get_request_items(instance: SNowInstance, sys_id: str) -> list[dict]:
125125
"sysparm_fields": ",".join(
126126
[
127127
"sys_id",
128+
"cat_item",
128129
"short_description",
129130
"quantity",
130131
]
131132
),
133+
"sysparm_display_value": "true",
132134
},
133135
)["result"]
134136

src/browsergym/workarena/config.py

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
# Path to the Menu navigation task configuration
2121
ALL_MENU_PATH = str(resources.files(data_files).joinpath("task_configs/all_menu.json"))
22+
ALL_MENU_CUSTOM_GOAL_PATH = str(resources.files(data_files).joinpath("task_configs/go_to_page.json"))
2223

2324
# Path to the dashboard/report retrieval task configurations
2425
DASHBOARD_RETRIEVAL_MINMAX_CONFIG_PATH = str(
@@ -258,4 +259,77 @@
258259
)
259260
ASSIGN_ROLES_TO_USER_IMPLICIT_CONFIG_PATH = str(
260261
resources.files(data_files).joinpath("task_configs/assign_roles_to_user_implicit.json")
261-
)
262+
)
263+
264+
## License tasks
265+
GET_NUMBER_LICENSES_CONFIG_PATH = str(
266+
resources.files(data_files).joinpath("task_configs/get_number_licenses.json")
267+
)
268+
269+
## Change Request tasks
270+
CHANGE_CHANGE_REQUEST_APPROVER_CONFIG_PATH = str(
271+
resources.files(data_files).joinpath("task_configs/change_chg_approver.json")
272+
)
273+
274+
## Incident tasks
275+
ADD_ADDITIONAL_ASSIGNEE_TO_INCIDENT_CONFIG_PATH = str(
276+
resources.files(data_files).joinpath("task_configs/add_additional_assignee_to_incident.json")
277+
)
278+
RESOLVE_INCIDENT_CONFIG_PATH = str(
279+
resources.files(data_files).joinpath("task_configs/resolve_incident.json")
280+
)
281+
UPDATE_INCIDENT_CONFIG_PATH = str(
282+
resources.files(data_files).joinpath("task_configs/update_incident.json")
283+
)
284+
285+
## Request Item tasks
286+
CHANGE_RITM_STATUS_CONFIG_PATH = str(
287+
resources.files(data_files).joinpath("task_configs/change_ritm_status.json")
288+
)
289+
UPDATE_RITM_QUANTITY_CONFIG_PATH = str(
290+
resources.files(data_files).joinpath("task_configs/update_ritm_quantity.json")
291+
)
292+
293+
## Interaction tasks
294+
CREATE_INTERACTION_CONFIG_PATH = str(
295+
resources.files(data_files).joinpath("task_configs/create_interaction.json")
296+
)
297+
298+
## Customer account tasks
299+
FIND_CUSTOMER_ACCOUNT_MANAGER_CONFIG_PATH = str(
300+
resources.files(data_files).joinpath("task_configs/find_customer_account_manager.json")
301+
)
302+
303+
## User group tasks
304+
DEACTIVATE_USER_GROUP_CONFIG_PATH = str(
305+
resources.files(data_files).joinpath("task_configs/deactivate_user_group.json")
306+
)
307+
308+
# service catalog tasks (dynamic guidance)
309+
ORDER_IPHONE_TASK_CONFIG_PATH = str(
310+
resources.files(data_files).joinpath("task_configs/order_iphone.json")
311+
)
312+
ORDER_MOBILE_PHONE_TASK_CONFIG_PATH = str(
313+
resources.files(data_files).joinpath("task_configs/order_mobile_phone.json")
314+
)
315+
ORDER_MISC_HARDWARE_TASK_CONFIG_PATH = str(
316+
resources.files(data_files).joinpath("task_configs/order_misc_hardware.json")
317+
)
318+
ORDER_MISC_HARDWARE_WITH_BUSINESS_JUSTIFICATION_TASK_CONFIG_PATH = str(
319+
resources.files(data_files).joinpath("task_configs/order_misc_hardware_with_business_justification.json")
320+
)
321+
ORDER_PACKAGING_AND_SHIPPING_TASK_CONFIG_PATH = str(
322+
resources.files(data_files).joinpath("task_configs/order_packaging_and_shipping.json")
323+
)
324+
ORDER_RESET_PASSWORD_TASK_CONFIG_PATH = str(
325+
resources.files(data_files).joinpath("task_configs/order_reset_password.json")
326+
)
327+
ORDER_PAPER_SUPPLIES_TASK_CONFIG_PATH = str(
328+
resources.files(data_files).joinpath("task_configs/order_paper_and_supplies.json")
329+
)
330+
ORDER_SOFTWARE_TASK_CONFIG_PATH = str(
331+
resources.files(data_files).joinpath("task_configs/order_software.json")
332+
)
333+
ORDER_SOFTWARE_ACCESS_TASK_CONFIG_PATH = str(
334+
resources.files(data_files).joinpath("task_configs/order_software_access.json")
335+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"additional_assignee_list": "Elmo Gabouer",
4+
"incident_number": "INC0000002",
5+
"goal": "Add Elmo Gabouer as an additional assignee on INC0000002"
6+
},
7+
{
8+
"additional_assignee_list": "Pat Hoshaw",
9+
"incident_number": "INC0000016",
10+
"goal": "Add Pat Hoshaw as an additional assignee on INC0000016"
11+
},
12+
{
13+
"additional_assignee_list": "Norman Betance",
14+
"incident_number": "INC0000020",
15+
"goal": "Add Norman Betance as an additional assignee on INC0000020"
16+
}
17+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"change_number": "CHG0000077",
4+
"approver": "Fred Luddy",
5+
"goal": "Update change request CHG0000077 to get Fred Luddy's approval"
6+
},
7+
{
8+
"change_number": "CHG0000039",
9+
"approver": "Bow Ruggeri",
10+
"goal": "Update change request CHG0000039 to get Bow Ruggeri's approval"
11+
},
12+
{
13+
"change_number": "CHG0000086",
14+
"approver": "David Dan",
15+
"goal": "Update change request CHG0000086 to get David Dan's approval"
16+
}
17+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"ritm_number": "RITM0000002",
4+
"approval": "approved",
5+
"goal": "Change RITM0000002 approval status to approved"
6+
},
7+
{
8+
"ritm_number": "RITM0010002",
9+
"approval": "rejected",
10+
"goal": "Change RITM0010002 approval status to rejected"
11+
},
12+
{
13+
"ritm_number": "RITM0010003",
14+
"approval": "requested",
15+
"goal": "Change RITM0010003 approval status to requested"
16+
}
17+
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[
2+
{
3+
"hardware": "laptop",
4+
"hardware_issue": "The laptop screen won't turn on",
5+
"assigned_to": "Kurtis Asberry",
6+
"goal": "A customer called in about his laptop. The laptop screen won't turn on. Create an interaction based on the phone call and assign it to Kurtis Asberry"
7+
},
8+
{
9+
"hardware": "router",
10+
"hardware_issue": "The router light is on but there is no Wifi",
11+
"assigned_to": "Manifah Masood",
12+
"goal": "A customer called in about his router. The router light is on but there is no Wifi. Create an interaction based on the phone call and assign it to Manifah Masood"
13+
},
14+
{
15+
"hardware": "keyboard",
16+
"hardware_issue": "The keyboard's vowel keys are stuck",
17+
"assigned_to": "Lacy Belmont",
18+
"goal": "A customer called in about his keyboard. The keyboard's vowel keys are stuck. Create an interaction based on the phone call and assign it to Lacy Belmont"
19+
}
20+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"customer_account": "Tom Tom Networks",
4+
"contact": "Tommy Gore",
5+
"goal": "Find out who the contact for Tom Tom Networks is"
6+
},
7+
{
8+
"customer_account": "Spark Technologies",
9+
"contact": "Amy Pascal",
10+
"goal": "Find out who the contact for Spark Technologies is"
11+
},
12+
{
13+
"customer_account": "Diagonal Inc.",
14+
"contact": "Denis Koch",
15+
"goal": "Find out who the contact for Diagonal Inc. is"
16+
}
17+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"model": "Adobe Acrobat",
4+
"number_of_licenses": 600,
5+
"goal": "Get the number of licenses available for Adobe Acrobat"
6+
},
7+
{
8+
"model": "Skype",
9+
"number_of_licenses": 550,
10+
"goal": "Get the number of licenses available for Skype"
11+
},
12+
{
13+
"model": "Microsoft Office Home and Business 2010",
14+
"number_of_licenses": 71,
15+
"goal": "Get the number of licenses available for Microsoft Office Home and Business 2010"
16+
}
17+
]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"page": "the Contracts table",
4+
"url": "/now/nav/ui/classic/params/target/ast_contract_list.do",
5+
"goal": "Go to the Contracts table"
6+
},
7+
{
8+
"page": "the page that lists all SLA definitions",
9+
"url": "/now/nav/ui/classic/params/target/contract_sla_list.do",
10+
"goal": "Go to the page that lists all SLA definitions"
11+
},
12+
{
13+
"page": "where installed plugins and applications are listed",
14+
"url": "/now/app-manager/home/tab/installed/sort/install_date",
15+
"goal": "Go to where installed plugins and applications are listed"
16+
}
17+
]

0 commit comments

Comments
 (0)