I want to integrate our Sales CRM dynamics system with another application. Approaches we are considering are using web api and webhooks.
Can we use webhooks without using an azure function/azure service?
what all are the challenges?
Is there any other better methods to pull data from Dynamics CRM?
What all things should be considered while doing an integration with Dynamics CRM system?
(I am new to Dynamics)
link followed:https://dynamicsninja.blog/2019/05/22/d365-webhooks-part-1/
If it's a relatively simple integration, using Power Automate might be your best bet.
https://flow.microsoft.com/
To answer your specific questions, though:
Can we use webhooks without using an azure function/azure service?
No. You'll need to use Power Automate, Logic Apps, or some other method to watch for changes.
what all are the challenges?
That's a pretty broad question, can't help you without specific things you've already tried.
Is there any other better methods to pull data from Dynamics CRM? What all things should be considered while doing an integration with Dynamics CRM system?
If you're just doing reporting (pulling data) then PowerBI is a good choice, otherwise it's the API for custom integration or Power Automate/Logic Apps for something that needs a little less customization.
If you realy want to have a CRM fully integrated i would consider to try
• Power Automate (as said before): it's a good way to easily connect several systems
• Azure Functions: Sometimes power automate is just not enough but with azure functions you can easily create some serverless code. I have some aazure functions that are triggered by receiving a message in a queue by power automate for example. You can make both work together and that what we have at work :)
The biggets challeng is the "know-how" I guess. A lot of people do not know it yet. Azure functions can be a little difficult at the beggining (even more if you want to use early bound classes for you CRM). With some time you will get it.
If you want do distribute your tool as a dynamics solution package which than should be added to an organisation without generating API token in azure and stuff like that i would suggest you don't pull data from dynamics (that way you need to authorize at the ms webapi with a token generated in azure and so on). Instead use web components and plugins triggered by core messages to push the data to your api.
Related
I've been searching for some time now for a way to interact with our Salesforce org easily through Azure functions and have been coming up dry. I guess where I am confused is that through Azure Logic Apps I can pretty simply connect into Salesforce and post data through them and I assume on their backend they must have some sort of built in connector to Salesforce.
Is this a package somewhere that I can utilize in Azure functions? This would simplify so much of what we are trying to accomplish with some of our integrations.
There isn't a built in Salesforce binding for Azure Functions, but one option you do have is to invoke your Logic Apps workflow from Azure Functions with the relevant payload, which would allow you to leverage all the built in connectors they have.
You don't really need any fancy connector.
For most use cases, you can use the Salesforce REST API:
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm
You can use Postman to test this API and get code samples which could easily be adapted to your Function App:
https://www.postman.com/salesforce-developers/workspace/salesforce-developers/collection/12721794-67cb9baa-e0da-4986-957e-88d8734647e2?ctx=documentation
But be careful!
Salesforce limits your API calls and it is very easy to blow these limits.
The naïve approach would be to post one record at a time. Instead, try to collect as many records as possible and post them all at once.
If Salesforce does not need the data immediately, you can build a cache that will store data somewhere else (e.g. a MongoDb) and then periodically forward the data to Salesforce after it has been allowed to accumulate to some threshold quantity and/or a certain amount of time has elapsed.
My Azure based SaaS system publishes events and I have customers who wish to subscribe to them - webhooks seem undeniably the right architecture (And I'm currently a happy consumer of webhooks). I've found lots of great documentation and case studies on best practices (e.g. http://resthooks.org) however I've not managed to find an existing architecture, framework, project, sample or solution that implements the best practices.
I could build my own solution however I don't want to reinvent the wheel. I was expecting to find an existing framework (e.g. on Github) created by people much smarter than I but haven't had any success.
I currently use a number of Azure services (such as Service Bus, Cosmos, Table Storage) internally and consume using Azure Functions but what I don't have is an architecture for allowing my customers to subscribe to these events.
Specifically I'm looking for best practices and code samples on how to manage potentially millions of subscribers (who are external customers) and the approach to distribute the webhooks out to each of them.
I already understand how to publish and consume webhooks where I am an individual subscriber and there are already some great samples available - https://github.com/aspnet/AspLabs/tree/master/src/WebHooks
Can anyone point me in the right direction? (Preferably to a .NET / C# based solution)
Not sure if this is the 'right' direction but here are my current thoughts on a solution.
We are currently using CosmosDb and are leveraging the change feed to trigger an Azure function execution. The code within the function does a specific task for all tenants in our system. This code will be changed to simply send a new event to the Event Grid topic. A 'in-house' subscription will then be added that will handle what the function code is currently doing today.
We will then follow the subscription management guidance Zapier offers. In a nutshell it is to expose the capability to our customers to subscribe to the events that we publish via a few endpoints. In addition to standard CRUD stuff when a tenant adds/removes a subscription the code will leverage the Event Grid Management SDK to add/remove subscriptions to the appropriate topics within Event Grid (samples here). The subscriptions that get added will have filters set to ensure each tenant only receives their own events.
There are limitations to the number of subscriptions and topics with in Azure (details here). These limitations are acceptable in our case but is something you might need to look into more if you need to reach 1mm subscribers.
Here is how I visualize it:
Not 100% we'll build this but if we do I'll post back here any gotchas we uncover.
Cheers!
I've looked through all the permissions a user can have in regards to logic apps but I still have not be able to answer my question. Is it possible to restrict a user from using a certain connector in azure logic apps? For example, lets say I wanted users to use only the Outlook/Office 365 connector. Is this possible?
No, it is not possible to restrict Connectors or Actions at design time, though you can certainly restrict actual endpoints by simply not providing credentials.
Note, this is not really any limitation of LogicApps or such. Limiting the designer experience is not something readily available on any other platform.
I am working on a project to integrate accounting data like receipts, invoices, etc from a Java EE system into Microsoft Dynamics GP 2010. The database is MySQL. Please share your thoughts on which which approach works best. I have searched around and there are 2 approaches: Integration Manager, eConnect via Web Services.
Thanks
In my opinion you have two legitimate options - eConnect via GP Web Services or eConnect via SQL Stored Procedures. I wouldn't consider using Integration Manager as it cannot be automated and requires someone to log into Dynamics GP before using it.
The most simple integration point would be to call the eConnect SQL Stored Procedures directly at the database level. For each eConnect integration object, there is a corresponding SQL Stored procedure. You simply call the procedure and pass it the proper values into its parameter. Creating an invoice in Dynamics GP, for example, can be done by calling the procedures for creating SOP Document headers, lines, and distributions.
On the other hand, if you are prepared to spend a little extra time installing the GP Web Services then you can integrate with that and maintain a service oriented architecture. Most of the same functionality is available via the web services but it is a subset of the features available in the eConnect procedures. In return, you get all of the benefits of a SOA architecture.
Ultimately it depends on your plans for overall architecture in your environment. Either method should work fine for your requirements. If this is the only integration into GP I might chose the more simple method of eConnect stored procedures. If you plan to integrate other applications into Dynamics GP you may want to take the time to invest in using the services.
How should data be pushed into CRM 2011 from another system?
I would like to pass the data to a web service.
I have thought of 2 options so far:
Create a custom entity and create records of this entity by calling the Organization service from the other system. A workflow can handle everything from that point.
Create a WCF service and host it somewhere. The other system passes data to this service and the service interacts with CRM.
The client will just pass us records, so validation must happen on the CRM side.
EDIT:
If the client is an old system (in Cobol or something) is it still possible to connect to the CRM service?
Just to expand on Predro's answer:
I have actually done both with CRM 4. I would highly reccommend that you create your own sevice for the client to call which in turn calls the CRM services.
This gives you an extra layer of abstraction for when things change later - and they will.
If your client calls the CRM services directly it will be difficult/impossible for you to change your internal data structures or move servers around in the farm. Esecially true if you currently use a singer-server infrastructre.
Also don't map the service you create directly to the entity data structure, use an intermidiate model.
So if you wanted the client to pass Account details in, have your service expect an XML document that you convert in to an Account Entity, rather than expose the Account Entity and have your client submit that.
The second choice for me is the best way to handle with this situation, because you can control and validate everything in your side. You can host the WCF service in the same server of CRM Dynamics or in another server with access to CRM Dynamics and interact with with CRM through CRM Web Services.
I think you don't have any better solution.
Assuming the client has a login to your CRM system, I would actually go with the option #1 first. Why?
You can still validate the data in the Pre-Validation plugin stage.
This is by far the easiest and fastest way to get going. Will things change? Maybe! But:
You are going to spend lots and lots of hours getting a custom WCF service up and running
Somebody has to deploy it
Somebody has to maintain it
Your client has to learn how to connect to a proprietary WCF service instead of saying "Here's a bunch of published info on how to connect to CRM's webservices."
It becomes a "hidden silo" of business logic instead of it all existing in CRM. Any good CRM developer would be able to work on option number one. Number two requires additional skills.
If it really does change over time so much that it needs its own WCF service, you haven't really wasted that much time. All your business logic would be ported from a plugin to the WCF service. But it is much harder to go from the more complex solution (#2) to the simpler solution (#1) if it turns out that you don't need it.
I promise you that your customer wants this done faster and simpler (cheaper) rather than longer and more complex (expensive).