Operations Management Portal (OMP)

Change Tracker

Intro

ChangeTracker tracks changes for the Calendar Management section of the OMP (with possibly more sections in future releases). There are two specific functions of ChangeTracker: email notifications and CloudWatch logging. Emails and logging are opt-in only so the configuration variables will need to be set either on deployment or after deployment by adding them in the Hours, Holidays or Closures api's in the AWS Lambda console under the Configuration tab → Environment variables. See the code snippet below to learn more about configuring ChangeTracker environment variables.

How notifications work under the hood

The ChangeTracker checks the OMP’s AWS Cognito user pool email list against verified emails or domains in SES, then sends the notification emails to that list through SES. Any emails that have not been verified in SES will be filtered out of the recipient list before sending. If any emails are filtered out, a yellow warning notice with the list of unverified emails or domains will be prepended to the email.

2 methods for turning the ChangeTracker feature on:

Method 1: Activation Through Code Config

export const changeTrackerConfigExample: IMixedConfig = {
  client: 'gc-2',
  stage: 'dev',
  connectInstanceId: '96b3669f-e41d-4c9b-97e9-1e252f41444f',
  retain: false,
  useLayer: true,
  loggingLevel: 'info',
  adminUserEmail: 'vfgregtest@gmail.com',
  features: { 👈 
    tenancyEnabled: false,
    permissionsManagementEnabled: true,
    configSetManagement: true,
    flowEngineManagementEnabled: true,
    calendarManagementEnabled: true,
    syncManagementEnabled: true,
    connectUserManagementEnabled: true,
    // 👇👇👇👇👇👇👇
    /* optional - turns on the changeTracker service, for the omp features that have it integrated.
    The OMP user emails or domains must first be verified in SES.
    The ChangeTracker service does not deploy any additional infrastructure in AWS. 
    Configuring change tracker here automatically sets env vars, but can be turned on/off by manually 
    setting environment variables (comments below) in the AWS lambda console for the APIs that use change tracker
    ie. HolidaysApi, HoursApi, ClosuresApi. */
    changeTracker: { 👈
      replyEmail: 'no-reply@voicefoundry.com', // optional - if not set, ct service uses the email of the user making the change
      emailNotificationsEnabled: true, // required - sets the CHANGE_TRACKER_EMAIL_NOTIFICATIONS env variable. Turns notifications on/off
      cloudWatchLoggingEnabled: true, // required - sets the CHANGE_TRACKER_CLOUDWATCH_LOGGING env variable. Turns cw logging on/off,
      local_test_email: 'vfgregtest@gmail.com', // not for deploymnet - sets CHANGE_TRACKER_LOCAL_TEST_EMAIL env variable for local development
      local_test_username: 'vfgregtest@gmail.com', // not for deploymnet - sets CHANGE_TRACKER_LOCAL_TEST_USERNAME env variable for local development
    },
  },
  // 👆👆👆👆👆
  hosting: undefined,
  corsOrigins: ['http://localhost:3000', 'https://d3jfm4jarl0et.cloudfront.net'],

  /**
   * Used for local `npm run start:api`
   */
  startApiUserPoolId: 'us-east-1_2bl3L0wnM',
};

Method 2: Activation/Deactivation Through Lambda Function Environment Variables

Screen Shot 2022-09-06 at 10.22.33 AM-20220906-162335.png
Screen Shot 2022-09-06 at 10.17.43 AM-20220906-161833.png

Example Emails

Hour email

image-20220906-160015.png


Holiday email

image-20220906-155644.png

Closure email

image-20221006-214528.png

Email with warning notice:

image-20221006-223447.png


Example CloudWatch logs

Log Groups

image-20220906-162937.png

Log Streams

image-20220906-163039.png

Stream Example

Logs the previous state and new state of the QUEUE/DNIS/CUSTOM associations…

{
    "previousState": [
        {
            "enabled": false,
            "openCheckType": "QUEUE",
            "category": "Emergency",
            "prompt": "prompt_ff0bc9af-eb4f-406a-8a42-b3234faea127",
            "key": "Test_Sales",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "name": "Flood",
            "type": "closure"
        },
        {
            "enabled": false,
            "openCheckType": "DNIS",
            "category": "Emergency",
            "prompt": "prompt_30517365-fbe4-40bd-99e2-4f3aa8e9fe7d",
            "key": "+18662234510",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "name": "Flood",
            "type": "closure"
        },
        {
            "enabled": false,
            "openCheckType": "QUEUE",
            "category": "Emergency",
            "prompt": "prompt_ff0bc9af-eb4f-406a-8a42-b3234faea127",
            "key": "Test_Customer_Care",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "name": "Flood",
            "type": "closure"
        }
    ],
    "newState": [
        {
            "key": "Test_Sales",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "type": "closure",
            "name": "Flood",
            "category": "Emergency",
            "prompt": "prompt_ff0bc9af-eb4f-406a-8a42-b3234faea127",
            "enabled": true,
            "openCheckType": "QUEUE"
        },
        {
            "key": "+18662234510",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "type": "closure",
            "name": "Flood",
            "category": "Emergency",
            "prompt": "prompt_30517365-fbe4-40bd-99e2-4f3aa8e9fe7d",
            "enabled": true,
            "openCheckType": "DNIS"
        },
        {
            "key": "Test_Customer_Care",
            "id": "closure_b158a961-3cf8-4a2c-a39d-ad059b66702f",
            "type": "closure",
            "name": "Flood",
            "category": "Emergency",
            "prompt": "prompt_ff0bc9af-eb4f-406a-8a42-b3234faea127",
            "enabled": true,
            "openCheckType": "QUEUE"
        }
    ]
}