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

reply time updates #50

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

Are you a current Fivetran customer?

Fivetran created PR

What change(s) does this PR introduce?

This PR updates the logic that goes into the reply time metrics. Previously the logic only captured reply times if the customer (external_comment) was made first. However, Zendesk calculates this metric as the first agent reply time following the tickets creations. This means if an agent responds first then we will want to take this into account as well.

  • Below are the previous query results of the ref models and how they did not capture the first reply time accurately.
    • Comments enriched model shows the agent created the first response.
      image
    • Ticket reply times model only shows the one response time where the agent responded directly to the customer.
      image
    • Final model shows ticket_id = 41534 having no first reply time when in fact it should be 0 for this ticket as the agent responded first when creating the ticket.
      image
  • Below are the new code query results of the ref models and how they do capture the first reply time accurately.
    • Comments enriched now takes into account the public and non-public ticket comments to capture the first true agent response to the ticket creation.
      image
    • Reply times model now shows to reply times for the initial ticket creation response and the first customer agent response.
      image
    • The final model now accurately captures the first reply time and total reply time correctly.
      image

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide explanation how the change is non breaking below.)

While this PR does not incorporate breaking changes, it does include major code updates and will also be integrated within the next v0.7.0 release.

Is this PR in response to a previously created Issue

How did you test the PR changes?

  • CircleCi
  • Other (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

📯

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

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

lgtm!

Side note I like how the comment_counts CTE in int_zendesk__comment_metrics breaks out the different comments so it was straightforward to switch count_internal_comments to count_agent_comments in zendesk__tickets_metrics.

Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

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

looks good to me! would love to walk through it a lil during standup if we can tho, just to make sure I get what's going on

end_user_comments.ticket_id,
-- If the commentor was internal and a first comment then we want the ticket created date to be the end user comment created date
-- Otherwise we will want to end user comment created date
case when end_user_comments.commenter_role = 'internal_comment' and end_user_comments.is_first_comment
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make case when inclusive of all first comments.

Think customer made ticket Friday, no response, commented on Tuesday, response. That should be 2 days not 2 minutes.

@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the base branch from master to release/v0.7.latest October 20, 2021 16:19
@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit e48721b into release/v0.7.latest Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants