How to create a custom API. How can I expose an URL to the external system for custom Api.
Hi,
You have multiple options to create custom API which will intreact with CRM indirectly.
Microsoft Flow- You can create flow with trigger as HTTP trigger which will generate webhook URL that you can provide to external syste topost the data and as an action you create say lead record in CRM from flow.
Azure function- Azure function is serverless computing service provided by microsoft which has HTTP trigger to generate webhook or posting URL. You can write custom c# code parse the data which is sent by external system and then create record in crm or perform any operation
See below article on Azure function step by step by guide on how to create Lead in crm from external system.
xrmdynamicscrm.wordpress.com/.../
Hi phanikumar,
We need two tools for different purposes.
1. Retrieve Dynamics entities: create an OData set from an entity list record in Portal Manament App, we can expose some records from a specific entity.
2. Send data from your web application to Dynamics, and give callback response: We could deploy a flow with HTTP Request Trigger action and Response action in Power Automate.
HTTP Request Trigger will generate an endpoint URL for us to process our request, then the trigger will send our data to Dynamics and give us a response.(optional)
Due to there is no validation to access the URL, so we need some security steps to protect the endpoint.(send validation data together with user data.)
https://flow.microsoft.com/en-us/blog/call-flow-restapi/
Summary:
Method 1 is static, our result is pre-defined in Dynamics, so we couldn't send any keyword to filter data.
Method 2 is flexible, we could customize response body, thus it's possible to search records in Dynamics.
e.g:
The start HTTP Request trigger will receive my requested data as keyword to search related records in Dynamics.
Set listed records as Body content of Response directly:
Search whether there are contacts whose last name equal "Mao",
we can see a XHR request will be sent, and get retrieved Dynamics data from callback data(Response Body).
expand an item:
Regards,
Clofly
Yes Clofly, I have to save or retieve(search) dynamics entities. How can I create and deploy Api to dynamics crm?
Thanks
Phani.
Hi phanikumar,
Would your requirement be something likes below?
Assume you have built a form, when user submits the form, submitted data will be inserted into Dynamics?
Regards,
Clofly
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156