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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Can CRM WebAPI replace a custom REST API?

(0) ShareShare
ReportReport
Posted on by 285

I have a requirement to connect CRM to various custom websites via API. CRM comes with a WebAPI, but it seems like a dumb I/O interface rather than something that can incorporate complex business logic and give detailed feedback on why the request will not be accepted. Sure, you can run workflows and business rules after the request is accepted (which have their limitations due to the UI-based configuration), but that won't help with giving useful feedback to the sender if those workflows fail.

Some business requirements/logic could be:

  1. required fields (different fields required in different scenarios)
  2. check if a related record has a certain value before accepting the request.
  3. performing calculations that depend on various record attributes
  4. giving custom responses akin to that of custom REST API

The alternative to fully relying on the CRM's WebAPI is to create an intermediate REST API that will handle the business logic, validation, and custom responses. I expect that there are two options: C# plugin powered by the CRM SDK, or a custom REST API server that uses the WebAPI. If those are the options, which one is better? Is the close coupling of the REST API as a CRM plugin worth the benefits?

I have the same question (0)
  • rthompson Profile Picture
    1,532 on at

    Hi Artemy,

    This really depends on what you are comfortable with.

    You can use javascript WebApi to do you request then do your validation to display messages or you can do C# plugin pre-operation to validate and display messages.

    Either way will do the job. I don't think you will see that big of a performance issue being the two.

     

  • Suggested answer
    Red Hodgerson Profile Picture
    Microsoft Employee on at

    Another option could be a combination of plugins and custom actions that you can trigger using the WebAPI and author custom return messages.  See docs.microsoft.com/.../custom-actions

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 140 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 70 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans