Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update replies metrics to fit proper Zendesk definition #102

Merged
merged 4 commits into from
Jul 11, 2023

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Jul 5, 2023

PR Overview

This PR will address the following Issue/Feature: [#99]

This PR will result in the following new package version:
10.3. Not breaking; no field names are changed in the final end model, just the logic derived to compute the values of the field.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR: Fixed the total_agent_replies field in zendesk__ticket_metrics so the value is derived from public agent comments logic, and also ignores ticket creation comments from an agent, matching the Zendesk definition.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • [NA] dbt run –vars (if applicable)

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

The original field we were pulling for replies was incorrect, so we modified the logic so that it accurately reflected the definition in Zendesk:

The metric Agent replies represents all public comments added to a ticket by an agent, excluding ticket creation. For example, when an agent creates a ticket with a public comment, that first comment isn't counted. This may result in the public agent comment total being higher than the agent replies value.

So there are two scenarios to account for:

  1. If an admin or agent creates a ticket, the replies is one less than the number of public agent comments.
  2. If an end-user creates a ticket, the replies is equivalent to the number of public agent comments.

Tracking several individual tickets in our internal data that followed either of these scenarios, then testing the entire end model as a whole that these two cases held, provided the necessary validation that our fix solved this issue.

The proper queries for validating these two scenarios are provided in Height.

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • [NA] README updates have been applied (if applicable)
  • [NA] DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

💬

@fivetran-avinash fivetran-avinash self-assigned this Jul 5, 2023
@fivetran-avinash fivetran-avinash linked an issue Jul 5, 2023 that may be closed by this pull request
4 tasks
@fivetran-avinash fivetran-avinash marked this pull request as ready for review July 5, 2023 19:55
@fivetran-avinash fivetran-avinash changed the base branch from main to release/v0.11.0 July 7, 2023 21:51
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

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

Great work on this investigation and PR @fivetran-avinash! This looks good to go from a code perspective. If you end up finding more niche examples in your investigation, I would recommend opening an issue (not necessarily a bug or a feature but more of an "open investigation") which highlights these niche scenarios. This way we can track them and get community input before making a more widespread update in the future.

@fivetran-avinash fivetran-avinash merged commit d6143c2 into release/v0.11.0 Jul 11, 2023
@fivetran-avinash fivetran-avinash deleted the bug/fixing-agent-replies-definition branch July 11, 2023 23:59
@fivetran-reneeli fivetran-reneeli mentioned this pull request Jul 12, 2023
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Numbers not matching between Agent Replies and count_agent_comments
2 participants