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!