web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Phone call entity

(3) ShareShare
ReportReport
Posted on by 10

Hi Team,

 

I'm trying to create a phone log through web API using below call.

 

POST https://{My_host}.crm6.dynamics.com/api/data/v9.2/phonecalls

 

{

    "subject": "Call from +61444444444",

    "description": null,

    "directioncode": false,

    "actualdurationminutes": 1,

    "scheduledstart": "2025-03-20T21:43:50.141Z",

    "actualstart": "2025-03-20T21:43:50.141Z",

    "scheduledend": "2025-03-20T21:45:31.586Z",

    "actualend": "2025-03-20T21:45:31.586Z",

    "phonenumber": "+61444444444",

    "regardingobjectid_contact@odata.bind": null,

    "phonecall_activity_parties": [

{

            "participationtypemask": 1,

            "partyid_contact@odata.bind": "/contacts(f86c8491-41ef-ef11-9342-002248e3a1c9)"

},

{

            "participationtypemask": 2,

            "partyid_contact@odata.bind": "/contacts(8f7f0b82-8844-e911-a983-000d3ae060f6)"

}

]

}

 

This is working fine.

But I can't pass "Call To (Number)". I tried to find a solution and tried out various approaches without any success.

Also, I found that "phonenumber" is mapped to "Call From (Number)" from inside the dynamics.

 

Now I'm wondering whether this is something we need to enable at the configuration level rather than api call.

 

Could you please help me on this matter (passing "Call To (Number)" to the dynamics phone log through the api)?.

Thanks in advance

I have the same question (0)
  • CU13031143-0 Profile Picture
    42 on at
    Hi,
     
    What error message do you get and how are you trying to to post this webapi? Have tried to investigate anything using network logs if this was done through a browser?
  • CU13031143-0 Profile Picture
    42 on at
    Hi SP-21030415-0,
     
    Please try this solution provided below. I have tried provide as much of the information as possible:
    In Dynamics 365, the "Call To" and "Call From" fields are managed through activity parties associated with the phone call activity. Here's how you can structure your API request to set both the "Call From" and "Call To" numbers:
     
    POST https://{Your_Org}.crm6.dynamics.com/api/data/v9.2/phonecalls
    {
        "subject": "Call regarding new opportunity",
        "description": "Discussed potential collaboration.",
        "directioncode": true, // true for outgoing, false for incoming
        "actualdurationminutes": 30,
        "scheduledstart": "2025-03-20T10:00:00Z",
        "scheduledend": "2025-03-20T10:30:00Z",
        "phonenumber": "+61444444444", // This is typically used for the "Call From" number
        "phonecall_activity_parties": [
            {
                "participationtypemask": 1, // Sender
                "partyid@odata.bind": "/systemusers(YOUR_USER_GUID)"
            },
            {
                "participationtypemask": 2, // Recipient
                "partyid@odata.bind": "/contacts(CONTACT_GUID)"
            }
        ]
    }
     
    Points to note:
     
    You are already aware of this, but just providing them here for your reference-
     
    phonenumber: This field is generally used to record the phone number of the caller ("Call From").
     
    phonecall_activity_parties: This array specifies the participants of the phone call.
     
    participationtypemask: Defines the role of the participant.
     
    1 = Sender ("Call From")
     
    2 = Recipient ("Call To")
     
     
    partyid@odata.bind: Specifies the entity reference of the participant, such as a user or contact.
     
     
     
    Steps to Implement:
     
    1. Identify Participants:
     
    Sender: Determine the GUID of the user or contact initiating the call.
     
    Recipient: Determine the GUID of the contact or account receiving the call.
     
     
     
    2. Construct the API Request:
     
    Replace YOUR_USER_GUID with the GUID of the user or contact initiating the call.
     
    Replace CONTACT_GUID with the GUID of the contact or account receiving the call.
     
     
     
    3. Execute the API Request:
     
    Ensure you have the necessary permissions and that the API endpoint is correct.
     
     
     
     
    Additional Considerations:
     
    Direction Code: Set directioncode to true for outgoing calls and false for incoming calls.
     
    Duration and Timing: Ensure scheduledstart, scheduledend, actualstart, and actualend are set appropriately to reflect the call's timing and duration.
     
    Error Handling: If you encounter errors, verify that the GUIDs are correct and that the user has sufficient privileges to create phone call activities.
     
     
    By structuring your API request as shown above and ensuring all necessary fields are populated correctly, you should be able to set both the "Call From" and "Call To" numbers for the phone call activity in Dynamics 365.
     
    If any if this information does not help, then try to pull out the error log and we can investigate further.
     
    Best regards,
     
    Nikhil Sarpatwari 
     
     
    ---
     
    If you found this response helpful or if it resolves your issue, please acknowledge it by liking the comment or letting me know. Your feedback helps keep the community engaged!
     
     
  • SP-21030415-0 Profile Picture
    10 on at
    Hi 

    Thanks for your time on this question. Sorry If My question is a little bit confusing.
    I can create the phone log-in dynamics without "Call To (Number)" using the mentioned method.
    Please see the screenshot below.

    Please note that I'm creating this log through Postman and there is no error for the phone log creation call.

    Thanks in advance for your help

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 46 Most Valuable Professional

#2
Pallavi Phade Profile Picture

Pallavi Phade 33

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 28 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans