I am trying to differentiate inbound vs Outboud emails in the output of post_analytics_conversation_details_query API (and also checked get_conversation API). I see a direction field under participants. But that doesn't seem to be reliable, it always has 'Inbound'. Checked over 200 conversations). Are there any other API/fields has the correct direction for Email Conversations?
The direction will always be inbound for emails. This is because the direction is referring to the routed media in the session, and the routed media is always an inbound email. You will see a segmentType of transmitting on one of the segments if an email was sent. Details of the outbound email are accessible via its recording.
I see 'transmitting' as one of the segment types under participants --> emails where an email conversation has multiple participants. Also, if the conversation has an email trail, where one of the earlier emails in the trail was outbound, it has segment type 'transmitting'. Should I just check the first participants segment type for 'transmiting' to confirm that the latest email sent was outbound?
If you are trying to determine whether it was an agent who last sent an email to a customer (vs customer sending an email to the contact center), you should look at the participant type.