Commit 7e6e5cfe authored by Jason Colyer's avatar Jason Colyer
Browse files

Need a Solution for OOO sync Slow to run (with SIG team member)

parent 219e3cec
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ Each run will update the following for the agents:
- Manager tag (a custom [User field](/handbook/security/customer-support-operations/zendesk/users/fields))
- Name
- Out of Office status (a custom [User field](/handbook/security/customer-support-operations/zendesk/users/fields))
  - US Government only
- Signature
- Select user tags (see [How does it work](#how-does-it-work) for more details)
- User region (a custom [User field](/handbook/security/customer-support-operations/zendesk/users/fields) for Zendesk Global only)
@@ -76,7 +77,6 @@ This script itself acts a bit differently depending on the Zendesk instance it i
1. It reads the contents of the [Support team YAML files](https://gitlab.com/gitlab-support-readiness/support-team)
   - Note it skips select users who should not be in the sync, either because they are not editable (the Owner) or not targets for the sync currently
1. It fetches the user information for each user found in the YAML files via Zendesk
1. It fetches a list of those on PTO (as per the `Support - Time Off` calendar's entries)
1. It loops over each agent to compare:
   - The Zendesk user data to the YAML user data, specifically:
     - If the organization they are associated to is `GitLab`
@@ -95,12 +95,10 @@ This script itself acts a bit differently depending on the Zendesk instance it i
       1. `Support EMEA` for those with a region containing `EMEA`
       1. `General` for anyone not meeting the above criteria
   - It compares the user's current Zendesk group memberships with the groups they should belong to (based on YAML data and default group logic). Groups missing from Zendesk are added; extra groups not in YAML are removed.
   - Notes if the user is changing their PTO status (i.e. coming back from or leaving for)
1. It then performs updates, using the following API endpoints:
   - [User modification](https://developer.zendesk.com/api-reference/ticketing/users/users/#update-user)
   - [Adding a group membership](https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/#create-membership)
   - [Removing a group membership](https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/#delete-membership)
1. The sync will also update all assigned tickets for team members with changes to their PTO status (so the field `Assignee OOO` reflects the change)

#### Zendesk US Government