Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

customerid in webapi

(0) ShareShare
ReportReport
Posted on by

I am creating case record through api

record1:

{
"title" : "case1",
"customerid_contact@odata.bind" : "/contacts(guid)"   

}

record2:

{
"title" : "case2",
"customerid_account@odata.bind" : "/accounts(guid)"   

}

above two records were successfully created through postman.

My question is, while doing programmatically, how we can ensure that we are mapping the customerid with contact or account ?

  • Verified answer
    Inogic Profile Picture
    525 on at
    RE: customerid in webapi

    For identifying and mapping the entity's logical name while setting the customer ID field, you have to first retrieve that record from CRM. So, in your situation, you have to make two retrieve requests to identify the logical name of the entity. For example, you have a GUID, so in the first request, you have to check the GUID present in the Account entity, and in the second request, you have to check the GUID present in the Contact entity. Based on both request results, you can identify which logical name of the entity you should provide while creating a case entity record. 

    Hope this helps.

    Thanks!

  • Verified answer
    Pradeep Rai Profile Picture
    5,487 Super User 2025 Season 1 on at
    RE: customerid in webapi

    Hi,

    Can please share about how you received the GUID?

    For e.g. if you are getting the values from any third party webapi then I would suggest you to check the same GUID with account and contact once any of them found then you can set those values during create.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 671 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 167 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 138 Most Valuable Professional

Product updates

Dynamics 365 release plans