diff --git a/plugins/workday-update-contact-information/.codeblocks/block_0.sh b/plugins/workday-update-contact-information/.codeblocks/block_0.sh new file mode 100644 index 00000000..42a3090f --- /dev/null +++ b/plugins/workday-update-contact-information/.codeblocks/block_0.sh @@ -0,0 +1,6 @@ +curl --location 'https:///ccx/api/wql/v1//data' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{ + "query": "SELECT workdayID, fullName, businessTitle, email_PrimaryWorkOrPrimaryHome as email, employeeID FROM allWorkers WHERE email_PrimaryWorkOrPrimaryHome = %27{{email}}%27" +}' diff --git a/plugins/workday-update-contact-information/.codeblocks/block_1.sh b/plugins/workday-update-contact-information/.codeblocks/block_1.sh new file mode 100644 index 00000000..7b2a0caa --- /dev/null +++ b/plugins/workday-update-contact-information/.codeblocks/block_1.sh @@ -0,0 +1,4 @@ +curl --location --request POST 'https:///ccx/api/staffing/v4//workers/{WORKER_ID}/homeContactInformationChanges' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{}' diff --git a/plugins/workday-update-contact-information/.codeblocks/block_2.sh b/plugins/workday-update-contact-information/.codeblocks/block_2.sh new file mode 100644 index 00000000..2726923d --- /dev/null +++ b/plugins/workday-update-contact-information/.codeblocks/block_2.sh @@ -0,0 +1,3 @@ +curl --location 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/phoneNumbers' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' diff --git a/plugins/workday-update-contact-information/.codeblocks/block_3.sh b/plugins/workday-update-contact-information/.codeblocks/block_3.sh new file mode 100644 index 00000000..141b3e38 --- /dev/null +++ b/plugins/workday-update-contact-information/.codeblocks/block_3.sh @@ -0,0 +1,6 @@ +curl --location --request PATCH 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/phoneNumbers/{SUBRESOURCE_ID}' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{ + "completePhoneNumber": "{NEW_PHONE_NUMBER}" +} diff --git a/plugins/workday-update-contact-information/.codeblocks/block_4.sh b/plugins/workday-update-contact-information/.codeblocks/block_4.sh new file mode 100644 index 00000000..26a3fc32 --- /dev/null +++ b/plugins/workday-update-contact-information/.codeblocks/block_4.sh @@ -0,0 +1,4 @@ +curl --location --request POST 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/submit' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{}' diff --git a/plugins/workday-update-contact-information/README.md b/plugins/workday-update-contact-information/README.md index 82ca7418..c3da557b 100644 --- a/plugins/workday-update-contact-information/README.md +++ b/plugins/workday-update-contact-information/README.md @@ -1,8 +1,10 @@ --- description: A plugin that allows for the user to keep their contact information up to date. -fidelity: IDEA +fidelity: GUIDE name: Update Contact Information +difficulty_level: INTERMEDIATE +time_in_minutes: 30 purple_chat_link: https://developer.moveworks.com/creator-studio/developer-tools/purple-chat-builder/?workspace=%7B%22title%22%3A%22My+Workspace%22%2C%22botSettings%22%3A%7B%22name%22%3A%22%22%2C%22imageUrl%22%3A%22%22%7D%2C%22mocks%22%3A%5B%7B%22id%22%3A8613%2C%22title%22%3A%22New+Mock%22%2C%22transcript%22%3A%7B%22messages%22%3A%5B%7B%22from%22%3A%22USER%22%2C%22text%22%3A%22I+need+to+update+my+phone+number+in+Workday.%22%7D%2C%7B%22from%22%3A%22ANNOTATION%22%2C%22text%22%3A%22Triggers+the+phone+number+update+process+in+Workday.%22%7D%2C%7B%22from%22%3A%22BOT%22%2C%22text%22%3A%22Sure%2C+I+can+help+with+updating+your+phone+number+in+Workday.+Please+provide+your+new+phone+number.%22%7D%2C%7B%22from%22%3A%22USER%22%2C%22text%22%3A%22555-123-4567%22%7D%2C%7B%22from%22%3A%22BOT%22%2C%22text%22%3A%22%3Cp%3ELet%27s+confirm+your+new+phone+number+before+updating+in+Workday.%3Cbr%3E%3C%2Fp%3E%22%2C%22cards%22%3A%5B%7B%22title%22%3A%22%3Cp%3EPhone+Number+Update%3Cbr%3E%3C%2Fp%3E%22%2C%22text%22%3A%22%3Cp%3E%3Cb%3ENew+Phone+Number%3A+%3C%2Fb%3E555-123-4567%3Cbr%3E%3C%2Fp%3E%22%2C%22buttons%22%3A%5B%7B%22style%22%3A%22PRIMARY%22%2C%22text%22%3A%22Confirm+Update%22%7D%2C%7B%22text%22%3A%22Edit%22%7D%2C%7B%22text%22%3A%22Cancel%22%7D%5D%7D%5D%7D%5D%2C%22settings%22%3A%7B%22colorStyle%22%3A%22LIGHT%22%2C%22startTime%22%3A%2211%3A43%2BAM%22%2C%22defaultPerson%22%3A%22GWEN%22%2C%22editable%22%3Atrue%2C%22botName%22%3A%22%22%2C%22botImageUrl%22%3A%22%22%7D%7D%7D%5D%7D solution_tags: - HR @@ -12,3 +14,101 @@ systems: - workday --- +## Introduction + +The **Update Contact Information** plugin allows employees to quickly and easily update their home contact number through the Moveworks AI Assistant. This eliminates the need to manually navigate Workday, ensuring that personal contact information stays current with minimal effort. + +This guide will walk you through installing and configuring the plugin in **Agent Studio** in just a few minutes. Let’s get started! + +## **Prerequisites** + +- Access to Agent Studio + +## **What are we building?** + +### Agent Design + +This [purple chat](https://developer.moveworks.com/creator-studio/developer-tools/purple-chat?conversation=%7B%22startTimestamp%22%3A%2211%3A43%2BAM%22%2C%22messages%22%3A%5B%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22I+need+to+update+my+phone+number+in+Workday.%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22reasoningSteps%22%3A%5B%7B%22status%22%3A%22success%22%2C%22richText%22%3A%22Triggers+the+phone+number+update+process+in+Workday.%22%7D%5D%7D%2C%7B%22richText%22%3A%22Sure%2C+I+can+help+with+updating+your+phone+number+in+Workday.+Please+provide+your+new+phone+number.%22%7D%5D%7D%2C%7B%22role%22%3A%22user%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22555-123-4567%22%7D%5D%7D%2C%7B%22role%22%3A%22assistant%22%2C%22parts%22%3A%5B%7B%22richText%22%3A%22%3Cp%3ELet%27s+confirm+your+new+phone+number+before+updating+in+Workday.%3Cbr%3E%3C%2Fp%3E%22%7D%2C%7B%22richText%22%3A%22%3Cb%3E%3Cp%3EPhone+Number+Update%3Cbr%3E%3C%2Fp%3E%3C%2Fb%3E%3Cbr%3E%3Cp%3E%3Cb%3ENew+Phone+Number%3A+%3C%2Fb%3E555-123-4567%3Cbr%3E%3C%2Fp%3E%22%7D%2C%7B%22buttons%22%3A%5B%7B%22style%22%3A%22filled%22%2C%22buttonText%22%3A%22Confirm+Update%22%7D%2C%7B%22style%22%3A%22outlined%22%2C%22buttonText%22%3A%22Edit%22%7D%2C%7B%22style%22%3A%22outlined%22%2C%22buttonText%22%3A%22Cancel%22%7D%5D%7D%5D%7D%5D%7D) shows the experience we are going to build. + +## **Installation Steps** + +We recommend creating the connector for **Workday** first, prior to installing this plugin. Please follow the [**Workday Connector**](https://developer.moveworks.com/marketplace/package/?id=workday&hist=home%2Cbrws#how-to-implement) guide to set up the connector. +For this plugin, ensure the Workday integration system user has the following permissions + +**Required Permissions:** + +- View and Modify access to Person Data: Home Phone + +Once the connector is configured, refer to our [**plugin installation documentation**](https://help.moveworks.com/docs/ai-agent-marketplace-installation) for more details on how to install a plugin in Agent Studio. + +## **Appendix** + +### **API#1: Get Worker Details by Email** + +```bash +curl --location 'https:///ccx/api/wql/v1//data' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{ + "query": "SELECT workdayID, fullName, businessTitle, email_PrimaryWorkOrPrimaryHome as email, employeeID FROM allWorkers WHERE email_PrimaryWorkOrPrimaryHome = %27{{email}}%27" +}' +``` + +**Request Body Parameters:** + +- `email` (string) – The primary home email address of the worker used to look up their Workday ID + +### **API #2: Initialize Home Contact Change Event** + +```bash +curl --location --request POST 'https:///ccx/api/staffing/v4//workers/{WORKER_ID}/homeContactInformationChanges' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{}' +``` + +**Query Parameters:** + +- `WORKER_ID` (string) – Initialize home contact change event for a specific worker ID + +### **API #3: Get Worker Subresource Id** + +```bash +curl --location 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/phoneNumbers' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' +``` + +**Query Parameters:** + +- `CHANGE_ID` (string) – Initialized home contact change event ID for the specific worker + +### **API #4: Update Home Contact Information** + +```bash +curl --location --request PATCH 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/phoneNumbers/{SUBRESOURCE_ID}' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{ + "completePhoneNumber": "{NEW_PHONE_NUMBER}" +} +``` + +**Query Parameters:** + +- `CHANGE_ID` (string) – Initialized home contact change event id for the specific worker +- `SUBRESOURCE_ID` (string) – Initialized home contact change event person ID +- `NEW_PHONE_NUMBER` (string) – Input for updating the new phone number + +### **API #5: Submit Home Contact Information** + +```bash +curl --location --request POST 'https:///ccx/api/person/v4//homeContactInformationChanges/{CHANGE_ID}/submit' \ +--header 'Authorization: Bearer ' \ +--header 'Content-Type: application/json' \ +--data '{}' +``` + +**Query Parameters:** + +- `CHANGE_ID` (string) – Initialized home contact change event id for the specific worker \ No newline at end of file