Repository navigation
Add time_to_first_response_sec and first_human_admin_response_at - #88
Open
mariamameetcleo wants to merge 1 commit into
Open
mariamameetcleo wants to merge 1 commit into
mariamameetcleo wants to merge 1 commit into
Conversation
Contributor
|
@mariamameetcleo thanks for opening this PR! Could you also open an Issue (Feature Request) on this repo highlighting the proposed feature. This will help us understand the motivation and use case of this proposal as well as tracking and linking the issue to this PR. Thanks! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds second-granularity first response time and an optional human-admin first response timestamp to the Intercom conversation metrics models.
time_to_first_response_seconintercom__conversation_metrics— uses the samedbt.datediffsource astime_to_first_response_minutes, without dividing by 60, so sub-minute responses are preserved.first_human_admin_response_atonint_intercom__conversation_part_aggregates(passed through tointercom__conversation_metrics) — same admin-response filters asfirst_admin_response_at, with optional exclusion of automated admin author IDs via a new project variable.time_to_first_response_minutesbug fix — cast the datediff result tonumericbefore dividing by 60 to avoid integer truncation on destinations whereinteger / integertruncates (e.g. sub-60-second responses becoming0).New variable
When empty (default),
first_human_admin_response_atmatchesfirst_admin_response_at. When populated with Intercom adminauthor_idvalues (e.g. bot agents), those admins are excluded from the human first-response timestamp.Motivation
Consumers need seconds-based response SLAs without losing precision for fast replies. Teams using automated admin agents also need a human-only first response timestamp without forking the package.
Test plan
dbt run --select int_intercom__conversation_part_aggregates intercom__conversation_metricsagainst integration teststime_to_first_response_sec > 0whentime_to_first_response_minutes = 0for sub-minute responsesfirst_human_admin_response_atrespectsintercom__first_response_excluded_admin_author_idsMade with Cursor