Good morning. I am currently developing a Python script to extract historical email interaction data for our reporting division. We require precise metrics on agent productivity. I am utilizing the /api/v2/analytics/conversations/details/query endpoint to retrieve the conversation records. However, I am experiencing difficulty differentiating between an email message sent manually by an agent and an automated response generated by an Architect inbound email flow. The JSON payload contains multiple participant records, but the system auto-replies appear to register under the agent’s participant structure if the auto-reply fires during an active session. Is there a specific property or segment type within the conversation model that definitively identifies system-generated emails versus human-generated emails?
Do not look at the agent participant structure. Automated replies generated by Architect flows are attributed to the workflow participant, not the user participant. When parsing the JSON payload, check the participantType attribute.
If an email is sent by a flow, participantType will equal workflow. If an agent manually types an email, the participantType is user.
You must filter the sessions array based on this attribute.
Greetings! To expand upon the previous excellent advice, you must carefully analyze the session metrics within those specific participant blocks. Even when you correctly identify the user participant block, you need to track the exact directionality of the media segments. An agent might receive an email, transfer it, or reply to it.
You should specifically look for the outbound direction property within the messages media type array. Furthermore, if you are attempting to optimize agent productivity metrics, you must ensure you are not accidentally counting auto-acknowledgements sent by an outbound campaign sequence.
Always correlate the participantType with the direction and the specific disconnectType to build a truly accurate model of human effort!