Skip to content

Conversation

cmullenx
Copy link
Contributor

@cmullenx cmullenx commented Oct 14, 2025

COMPLETES # CAI-7180

This pull request addresses

  • Adds behavioral events for outdial ani metrics

by making the following changes

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

tested manually

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Windsurf
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@cmullenx cmullenx requested a review from a team as a code owner October 14, 2025 13:07
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4537.d3m3l2kee0btzx.amplifyapp.com


const product: MetricEventProduct = PRODUCT_NAME;

const createTaxonomyObjForUserSuccess = (target: string): BehavioralEventTaxonomy => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use them directly since they are only being used once? There's no need for a separate method, and we should maintain consistency with other events. Is there a reusability factor that I'm overlooking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea was that this function can be reused for all the user success events rather than having to duplicate objects repeatedly

},

// Outdial ANI API Events
[METRIC_EVENT_NAMES.OUTDIAL_ANI_EP_FETCH_SUCCESS]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use directly like below

product,
agent: 'user',
target: 'outdial_ani_ep_fetch',
verb: 'complete',
},

to maintain consistancy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure we could but imo the rest of the events should be refactored to use functions to stop all this duplication and keep the code dry

- adds outdial aini events metrics to behavioral events
- adds helper function to create event objects to reduce code duplication
@rsarika rsarika added the validated If the pull request is validated for automation. label Oct 14, 2025
Copy link
Contributor

@adhmenon adhmenon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need tests for this. But approving so we clear the pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants