Legacy Dev Forum Posts

 View Only

Sign Up

Get call history given external contact id

  • 1.  Get call history given external contact id

    Posted 06-05-2025 18:15

    abramenkovavs | 2019-04-26 12:15:35 UTC | #1

    Hi!

    We are working on integrating purecloud into our CRM. The task we are currently stuck on is to get a call history for an externalContactId via AnalyticsApi using segment filter. The following method returns empty json. Will appreciate if you could give us a hand with what is wrong...


    anon28066628 | 2019-04-26 15:00:46 UTC | #2

    Hi Valeriia,

    The function looks reasonably correct. Have you tried the same interval and filter with the Query Builder tool to confirm the query finds results?

    https://developer.mypurecloud.com/developer-tools/#/analytics-query-builder


    abramenkovavs | 2019-04-26 18:08:38 UTC | #3

    Hi, thank you for response.

    Yes, I've tried. It results in the following error (same as via Postman):


    tim.smith | 2019-04-26 18:44:52 UTC | #4

    I believe you should be using a segment filter.


    abramenkovavs | 2019-04-27 13:30:31 UTC | #5

    anon28066628, post:2, topic:5053
    https://developer.mypurecloud.com/developer-tools/#/analytics-query-builder

    Yes, my fault! But still, the query is empty..

    Here is the request for external contacts. The externalContactId is equal to id = '43c29b8f-daf6-4e02-a23d-f7dc18f75ec1' as far as I understand.


    anon28066628 | 2019-04-29 13:21:33 UTC | #6

    Have you confirmed that a conversation exists where that external contact participated in that interval? You can try to find a conversation on a short interval, using no filter, that has the externalContactId field on a participant. Once found, you should be able to filter on the ID and find the same result.


    abramenkovavs | 2019-04-30 08:54:40 UTC | #7

    anon28066628, post:2, topic:5053
    https://developer.mypurecloud.com/developer-tools/#/analytics-query-builder

    Okey, now it becomes clearer :) There is no field "externalContactId" on participants, even though I rang directly from PureCloud on the external contact number. How is it possible to obtain the field?.. I get "participantId" no matter how I make a call on the number in the external contact list.


    anon28066628 | 2019-05-01 12:56:48 UTC | #8

    Hi, I believe external contacts only get attached when a call comes from a number outside the organization. The PureCloud Community Forum is the best place to confirm this.


    abramenkovavs | 2019-05-02 08:30:29 UTC | #9

    We figured out that the problem occurred due to our SBC/Sip settings. Outbound calls did not work correctly, and that is why none of our external contacts appeared in the conversation history. As a result, we got an empty response.

    Thank you for your cooperation! :)


    anon28066628 | 2019-05-03 13:55:52 UTC | #10

    Excellent, glad you got it sorted :slight_smile:


    system | 2019-06-03 13:55:53 UTC | #11

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 5053