Microsoft D365CE v9 OnPrem (Independent Publisher) (#1172)

* Initial Commit to my fork on GitHub

Initial Commit

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Changed summary

* Microsoft D365CE v9 OnPrem

Minor edits

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Minor edits

* Update readme.md

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Updated readme

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Minor edits

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Remove file

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Remove file

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Minor edits

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Updated connectionParameters

* Coinbase (Independent Publisher)

Initial Commit

* Coinbase (Independent Publisher)

Updated stackOwner

* Coinbase (Independent Publisher)

Updated readme.

* Microsoft D365CE v9 OnPrem (Independent Publisher)

Removed Coinbase
This commit is contained in:
RoyPaarMS 2021-11-08 19:35:26 -06:00 коммит произвёл GitHub
Родитель db9b76f552
Коммит c95ac9e9eb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 555 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,430 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Microsoft D365CE v9 OnPrem",
"description": "Microsoft Dynamics 365 CE v9 Web API for interacting with on-premises D365 CE data from cloud D365 CE",
"contact": {
"name": "Roy Paar",
"email": "roypaar@microsoft.com"
}
},
"host": "YOURONPREMCRMURL.COM",
"basePath": "/CRMORGNAME/api/data/v9.0/",
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"paths": {
"/contacts({contactGUID})": {
"patch": {
"summary": "Upsert Contact",
"description": "Request to insert or update a contact record from cloud D365 CE to onprem D365 CE",
"operationId": "UpsertContact",
"parameters": [
{
"name": "contactGUID",
"required": true,
"in": "path",
"type": "string",
"description": "The contact GUID of the cloud record",
"x-ms-summary": "Contact GUID"
},
{
"name": "OData-MaxVersion",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-MaxVersion",
"x-ms-summary": "OData MaxVersion"
},
{
"name": "OData-Version",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-Version",
"x-ms-summary": "OData Version"
},
{
"name": "Accept",
"in": "header",
"required": true,
"type": "string",
"default": " application/json",
"description": "Accept",
"x-ms-summary": "Accept"
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": " application/json; charset=utf-8",
"description": "Content-Type",
"x-ms-summary": "Content Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"firstname": {
"type": "string",
"description": "First Name"
},
"lastname": {
"type": "string",
"description": "Last Name"
},
"middlename": {
"type": "string",
"description": "Middle Name"
},
"birthdate": {
"type": "string",
"description": "Birthdate"
},
"customertypecode": {
"type": "string",
"description": "Customer Type Code"
},
"emailaddress1": {
"type": "string",
"description": "Email Address 1"
},
"emailaddress2": {
"type": "string",
"description": "Email Address 2"
},
"telephone1": {
"type": "string",
"description": "Telephone 1"
},
"telephone2": {
"type": "string",
"description": "Telephone 2"
},
"telephone3": {
"type": "string",
"description": "Telephone 3"
},
"mobilephone": {
"type": "string",
"description": "Mobile Phone"
},
"address1_line1": {
"type": "string",
"description": "Address 1 Line 1"
},
"address1_line2": {
"type": "string",
"description": "Address 1 Line 2"
},
"address1_city": {
"type": "string",
"description": "Address 1 City"
},
"address1_stateorprovince": {
"type": "string",
"description": "Address 1 State or Province"
},
"address1_postalcode": {
"type": "string",
"description": "Address 1 Postal Code"
},
"address1_county": {
"type": "string",
"description": "Address 1 County"
}
},
"default": {
"firstname": "First",
"lastname": "Last"
}
},
"required": true
}
],
"responses": {
"200": {
"description": "The operation was successful.",
"schema": {
"$ref": "#/definitions/UpsertContactResponse"
}
}
}
}
},
"/accounts({accountGUID})": {
"patch": {
"summary": "Upsert Account",
"description": "Request to insert or update an account record from cloud D365 CE to onprem D365 CE",
"operationId": "UpsertAccount",
"parameters": [
{
"name": "accountGUID",
"required": true,
"in": "path",
"type": "string",
"description": "The account GUID of the cloud record",
"x-ms-summary": "Account GUID"
},
{
"name": "OData-MaxVersion",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-MaxVersion",
"x-ms-summary": "OData MaxVersion"
},
{
"name": "OData-Version",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-Version",
"x-ms-summary": "OData Version"
},
{
"name": "Accept",
"in": "header",
"required": true,
"type": "string",
"default": " application/json",
"description": "Accept",
"x-ms-summary": "Accept"
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": " application/json; charset=utf-8",
"description": "Content-Type",
"x-ms-summary": "Content Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name"
},
"address1_line1": {
"type": "string",
"description": "Address 1 Line 1"
},
"address1_line2": {
"type": "string",
"description": "Address 1 Line 2"
},
"address1_city": {
"type": "string",
"description": "Address 1 City"
},
"address1_stateorprovince": {
"type": "string",
"description": "Address 1 State or Province"
},
"address1_postalcode": {
"type": "string",
"description": "Address 1 Postal Code"
},
"address1_county": {
"type": "string",
"description": "Address 1 County"
}
},
"default": {
"name": "Account"
}
},
"required": true
}
],
"responses": {
"200": {
"description": "The operation was successful.",
"schema": {
"$ref": "#/definitions/UpsertAccountResponse"
}
}
}
}
},
"/leads({leadGUID})": {
"patch": {
"summary": "Upsert Lead",
"description": "Request to insert or update a lead record from cloud D365 CE to onprem D365 CE",
"operationId": "UpsertLead",
"parameters": [
{
"name": "leadGUID",
"required": true,
"in": "path",
"type": "string",
"description": "The lead GUID of the cloud record",
"x-ms-summary": "Lead GUID"
},
{
"name": "OData-MaxVersion",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-MaxVersion",
"x-ms-summary": "OData MaxVersion"
},
{
"name": "OData-Version",
"in": "header",
"required": true,
"type": "string",
"default": " 4.0",
"description": "OData-Version",
"x-ms-summary": "OData Version"
},
{
"name": "Accept",
"in": "header",
"required": true,
"type": "string",
"default": " application/json",
"description": "Accept",
"x-ms-summary": "Accept"
},
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"default": " application/json; charset=utf-8",
"description": "Content-Type",
"x-ms-summary": "Content Type"
},
{
"name": "body",
"in": "body",
"schema": {
"type": "object",
"properties": {
"fullname": {
"type": "string",
"description": "Full Name"
},
"emailaddress1": {
"type": "string",
"description": "Email Address 1"
},
"telephone1": {
"type": "string",
"description": "Telephone 1"
}
},
"default": {
"fullname": "John Smith"
}
},
"required": true
}
],
"responses": {
"200": {
"description": "The operation was successful.",
"schema": {
"$ref": "#/definitions/UpsertLeadResponse"
}
}
}
}
}
},
"definitions": {
"UpsertContactResponse": {
"type": "object",
"properties": {
"statusDetails": {
"$ref": "#/definitions/statusDetails"
}
}
},
"UpsertLeadResponse": {
"type": "object",
"properties": {
"statusDetails": {
"$ref": "#/definitions/statusDetails"
}
}
},
"UpsertAccountResponse": {
"type": "object",
"properties": {
"statusDetails": {
"$ref": "#/definitions/statusDetails"
}
}
},
"statusDetails": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"statusCode": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"$ref": "#/definitions/messages"
}
}
}
},
"messages": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
}
}
}
},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://dynamics.microsoft.com/"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://docs.microsoft.com/en-us/dynamics365/get-started/gdpr/"
},
{
"propertyName": "Categories",
"propertyValue": "Sales and CRM"
}
]
}

Просмотреть файл

@ -0,0 +1,41 @@
{
"properties": {
"connectionParameters": {
"hostUrl": {
"type": "string",
"uiDefinition": {
"constraints": {
"required": "true"
},
"description": "Specify your on-premises CRM URL e.g. https://test.contoso.com",
"displayName": "Host URL",
"tooltip": "Specify your on-premises CRM URL e.g. https://test.contoso.com"
}
},
"orgName": {
"type": "string",
"uiDefinition": {
"constraints": {
"required": "true"
},
"description": "Specify your on-premises CRM Org Name e.g. org12398y320",
"displayName": "Org Name",
"tooltip": "Specify your on-premises CRM Org Name e.g. org12398y320"
}
}
},
"capabilities": [],
"publisher": "Roy Paar",
"iconBrandColor": "#da3b01",
"stackOwner": "Microsoft",
"policyTemplateInstances": [
{
"templateId": "dynamichosturl",
"title": "Host Url",
"parameters": {
"x-ms-apimTemplateParameter.urlTemplate": "@ConnectionParameters('hostUrl')/@ConnectionParameters('orgName')/api/data/v9.0/"
}
}
]
}
}

Просмотреть файл

@ -0,0 +1,84 @@
# Microsoft D365CE v9 OnPrem
Microsoft Dynamics 365 Customer Engagement v9 is a CRM platform created by Microsoft. This connector allows connection to a non-IFD on-premises environment using the web API through a data gateway.
## Publisher
Roy Paar
## Prerequisites
This connector uses Windows authentication. You must first install an on-premises data gateway in order to access your on-premises D365 CE environment via API. Follow documentation here. https://docs.microsoft.com/en-us/data-integration/gateway/service-gateway-onprem
Once your gateway/cluster has been installed on-premises, it will be visible in the Power Platform under Dataverse > Gateways.
After deploying this connector to your cloud tenant, you must modify the following values in the General tab of the connector page:
1. Check the "Connect via on-premises data gateway" box (you will choose the gateway later when you create a connection)
2. Replace the "Host" value with your D365 on-premises address using the format in the example (NOTE: D365 CE on-premise does not need to be internet-facing i.e. IFD)
3. Replace the "Base URL" value with your D365 on-premises org name (get this value from Customizations > Developer Resources > Service Root URL)
On the Security tab, ensure Windows Authentication is selected.
Update the Connector in the upper right corner to save your changes.
On the Test tab, create a new connection. In the authentication screen, enter the Windows Authentication credentials required by the on-premises environment and choose your gateway. Manually input a contact GUID from the D365 CE online environment and test the service. Navigate to the on-premises environment and validate that the contact has been created with the same GUID.
Perform another test with the same GUID, using different data (update scenario). Validate the the existing contact on-premises reflects your change.
At this point you have successfully connected to your on-premises D365 CE instance and can now leverage this custom connector in Power Automate / Logic Apps. In your flow, add a new action and choose the "Custom" tab to find the connector.
## Supported Operations
### Upsert Contact (Patch)
Calls the D365CE v9 web API to either insert or update a contact in your on-premises environment based on the same action in D365 CE online.
Once connector has been installed in your cloud environment and connection to on-premises environment has been established, use this connector in Power Automate or Logic Apps to perform the on-premises update based on any trigger (i.e. cloud contact phone number is changed).
Currently only the following contact data points are available to update on-premises.
1. firstname
2. lastname
3. middlename
4. birthdate
5. customertypecode
6. emailaddress1
7. emailaddress2
8. telephone1
9. telephone2
10. telephone3
11. mobilephone
12. address1_line1
13. address1_line2
14. address1_city
15. address1_stateorprovince
16. address1_postalcode
17. address1_county
### Upsert Account (Patch)
Calls the D365CE v9 web API to either insert or update an account in your on-premises environment based on the same action in D365 CE online.
Once connector has been installed in your cloud environment and connection to on-premises environment has been established, use this connector in Power Automate or Logic Apps to perform the on-premises update based on any trigger (i.e. cloud account name is changed).
Currently only the following account data points are available to update on-premises.
1. name
2. address1_line
3. address1_line
4. address1_city
5. address1_stateorprovince
6. address1_postalcode
7. address1_county
### Upsert Lead (Patch)
Calls the D365CE v9 web API to either insert or update a lead in your on-premises environment based on the same action in D365 CE online.
Once connector has been installed in your cloud environment and connection to on-premises environment has been established, use this connector in Power Automate or Logic Apps to perform the on-premises update based on any trigger (i.e. cloud lead phone number is changed).
Currently only the following lead data points are available to update on-premises.
1. fullname
2. emailaddress1
3. telephone1
## API Documentation
Visit the Microsoft Docs site for D365 CE API usage. https://docs.microsoft.com/en-us/powerapps/developer/data-platform/webapi/update-delete-entities-using-web-api#upsert-a-table
## Known Issues and Limitations
None.