demarches-normaliennes/spec/fixtures/cassettes/helpscout_conversations_reports.yml
Pierre de La Morinerie 503c393a87 helpscout: use replies_sent to compute contact rate
The `conversations_count` we previously used counts replies, but also
all conversations that were tagged or re-tagged during the month – with
made counting the actual work spent on user support brittle.

Counting the replies is a better estimation of what we get.

Unfortunately this also removes the filtering-by-tag feature. To
mitigate this, the reports are now scoped to a specific mailbox. This
allows to create extra mailboxes for conversations that should't be
counted in the stats.
2019-09-11 17:26:10 +02:00

148 lines
8.3 KiB
YAML

---
http_interactions:
- request:
method: post
uri: https://api.helpscout.net/v2/oauth2/token
body:
encoding: UTF-8
string: client_id=1234&client_secret=5678&grant_type=client_credentials
headers:
User-Agent:
- demarches-simplifiees.fr
Expect:
- ''
response:
status:
code: 200
message: OK
headers:
Access-Control-Allow-Origin:
- "*"
Cache-Control:
- no-store
Content-Type:
- application/json; charset=utf-8
Date:
- Wed, 11 Sep 2019 15:02:24 GMT
Pragma:
- no-cache
Content-Length:
- '92'
Connection:
- keep-alive
body:
encoding: UTF-8
string: '{"token_type":"bearer","access_token":"redacted","expires_in":7200}
'
http_version:
recorded_at: Wed, 11 Sep 2019 15:02:24 GMT
- request:
method: get
uri: https://api.helpscout.net/v2/reports/productivity?end=2017-12-01T00:00:00Z&mailboxes=9999&start=2017-11-01T00:00:00Z
body:
encoding: US-ASCII
string: ''
headers:
User-Agent:
- demarches-simplifiees.fr
Authorization:
- Bearer redacted
Content-Type:
- application/json; charset=UTF-8
Expect:
- ''
response:
status:
code: 200
message: ''
headers:
Access-Control-Allow-Origin:
- "*"
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Content-Type:
- application/json;charset=UTF-8
Correlation-Id:
- 23f037f4-3974-4c8f-b252-3a580e4400dc#3293935
Date:
- Wed, 11 Sep 2019 15:02:24 GMT
Expires:
- '0'
Pragma:
- no-cache
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- DENY
X-Ratelimit-Limit-Minute:
- '400'
X-Ratelimit-Remaining-Minute:
- '399'
X-Xss-Protection:
- 1; mode=block
Content-Length:
- '2551'
Connection:
- keep-alive
body:
encoding: UTF-8
string: '{"filterTags":[{"name":"administration","id":3745889},{"name":"caf","id":4276799}],"current":{"startDate":"2017-11-01T00:00:00Z","endDate":"2017-12-01T00:00:00Z","totalConversations":96,"resolutionTime":182589.09375,"repliesToResolve":1.625,"responseTime":178804,"firstResponseTime":106231,"resolved":96,"resolvedOnFirstReply":64,"closed":181,"repliesSent":187,"handleTime":402,"percentResolvedOnFirstReply":66.66666666666666,"ratings":[],"newConversations":178,"messagesReceived":293,"createdInHS":11},"responseTime":{"count":113,"previousCount":0,"ranges":[{"id":10,"count":22,"percent":19.469026548672566},{"id":3,"count":13,"percent":11.504424778761061},{"id":9,"count":13,"percent":11.504424778761061},{"id":1,"count":12,"percent":10.619469026548673},{"id":7,"count":12,"percent":10.619469026548673},{"id":2,"count":11,"percent":9.734513274336283},{"id":6,"count":11,"percent":9.734513274336283},{"id":5,"count":7,"percent":6.1946902654867255},{"id":4,"count":6,"percent":5.3097345132743365},{"id":8,"count":6,"percent":5.3097345132743365}]},"handleTime":{"count":96,"previousCount":0,"ranges":[{"id":3,"count":32,"percent":33.33333333333333},{"id":1,"count":25,"percent":26.041666666666668},{"id":2,"count":18,"percent":18.75},{"id":4,"count":11,"percent":11.458333333333332},{"id":5,"count":10,"percent":10.416666666666668}]},"firstResponseTime":{"count":113,"previousCount":0,"ranges":[{"id":10,"count":18,"percent":15.929203539823009},{"id":2,"count":14,"percent":12.389380530973451},{"id":3,"count":13,"percent":11.504424778761061},{"id":8,"count":12,"percent":10.619469026548673},{"id":9,"count":12,"percent":10.619469026548673},{"id":1,"count":11,"percent":9.734513274336283},{"id":4,"count":11,"percent":9.734513274336283},{"id":6,"count":11,"percent":9.734513274336283},{"id":7,"count":7,"percent":6.1946902654867255},{"id":5,"count":4,"percent":3.5398230088495577}]},"resolutionTime":{"count":96,"previousCount":0,"ranges":[{"id":1,"count":43,"percent":44.79166666666667},{"id":2,"count":21,"percent":21.875},{"id":5,"count":12,"percent":12.5},{"id":3,"count":11,"percent":11.458333333333332},{"id":4,"count":9,"percent":9.375}]},"repliesToResolve":{"count":96,"previousCount":0,"ranges":[{"id":1,"count":64,"percent":66.66666666666666,"resolutionTime":127669},{"id":2,"count":20,"percent":20.833333333333336,"resolutionTime":331855},{"id":3,"count":5,"percent":5.208333333333334,"resolutionTime":267573},{"id":5,"count":4,"percent":4.166666666666666,"resolutionTime":42776},{"id":4,"count":3,"percent":3.125,"resolutionTime":403874}]}}'
http_version:
recorded_at: Wed, 11 Sep 2019 15:02:24 GMT
- request:
method: get
uri: https://api.helpscout.net/v2/reports/productivity?end=2018-01-01T00:00:00Z&mailboxes=9999&start=2017-12-01T00:00:00Z
body:
encoding: US-ASCII
string: ''
headers:
User-Agent:
- demarches-simplifiees.fr
Authorization:
- Bearer redacted
Content-Type:
- application/json; charset=UTF-8
Expect:
- ''
response:
status:
code: 200
message: ''
headers:
Access-Control-Allow-Origin:
- "*"
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Content-Type:
- application/json;charset=UTF-8
Correlation-Id:
- aa56c5ae-9e2c-45c0-8af1-e344e6172af5#3277423
Date:
- Wed, 11 Sep 2019 15:02:24 GMT
Expires:
- '0'
Pragma:
- no-cache
X-Content-Type-Options:
- nosniff
- nosniff
X-Frame-Options:
- DENY
X-Ratelimit-Limit-Minute:
- '400'
X-Ratelimit-Remaining-Minute:
- '398'
X-Xss-Protection:
- 1; mode=block
Content-Length:
- '2581'
Connection:
- keep-alive
body:
encoding: UTF-8
string: '{"filterTags":[{"name":"administration","id":3745889}],"current":{"startDate":"2017-12-01T00:00:00Z","endDate":"2018-01-01T00:00:00Z","totalConversations":87,"resolutionTime":118563.57471264368,"repliesToResolve":1.6666666666666667,"responseTime":36175,"firstResponseTime":30167,"resolved":87,"resolvedOnFirstReply":55,"closed":122,"repliesSent":156,"handleTime":305,"percentResolvedOnFirstReply":63.2183908045977,"ratings":[],"newConversations":126,"messagesReceived":196,"createdInHS":16},"responseTime":{"count":93,"previousCount":0,"ranges":[{"id":1,"count":24,"percent":25.806451612903224},{"id":3,"count":14,"percent":15.053763440860216},{"id":2,"count":12,"percent":12.903225806451612},{"id":5,"count":9,"percent":9.67741935483871},{"id":4,"count":7,"percent":7.526881720430108},{"id":7,"count":7,"percent":7.526881720430108},{"id":10,"count":7,"percent":7.526881720430108},{"id":8,"count":6,"percent":6.451612903225806},{"id":9,"count":5,"percent":5.376344086021505},{"id":6,"count":2,"percent":2.1505376344086025}]},"handleTime":{"count":87,"previousCount":0,"ranges":[{"id":1,"count":36,"percent":41.37931034482759},{"id":3,"count":23,"percent":26.436781609195403},{"id":4,"count":10,"percent":11.494252873563218},{"id":5,"count":10,"percent":11.494252873563218},{"id":2,"count":8,"percent":9.195402298850574}]},"firstResponseTime":{"count":93,"previousCount":0,"ranges":[{"id":1,"count":29,"percent":31.182795698924732},{"id":2,"count":15,"percent":16.129032258064516},{"id":3,"count":11,"percent":11.827956989247312},{"id":8,"count":11,"percent":11.827956989247312},{"id":4,"count":7,"percent":7.526881720430108},{"id":5,"count":7,"percent":7.526881720430108},{"id":6,"count":5,"percent":5.376344086021505},{"id":10,"count":5,"percent":5.376344086021505},{"id":7,"count":2,"percent":2.1505376344086025},{"id":9,"count":1,"percent":1.0752688172043012}]},"resolutionTime":{"count":87,"previousCount":0,"ranges":[{"id":1,"count":57,"percent":65.51724137931035},{"id":2,"count":13,"percent":14.942528735632186},{"id":5,"count":9,"percent":10.344827586206897},{"id":4,"count":5,"percent":5.747126436781609},{"id":3,"count":3,"percent":3.4482758620689653}]},"repliesToResolve":{"count":87,"previousCount":0,"ranges":[{"id":1,"count":55,"percent":63.2183908045977,"resolutionTime":14733},{"id":2,"count":22,"percent":25.287356321839084,"resolutionTime":184942},{"id":5,"count":5,"percent":5.747126436781609,"resolutionTime":632232},{"id":3,"count":4,"percent":4.597701149425287,"resolutionTime":564288},{"id":4,"count":1,"percent":1.1494252873563218,"resolutionTime":17641}]}}'
http_version:
recorded_at: Wed, 11 Sep 2019 15:02:24 GMT
recorded_with: VCR 4.0.0