Skip to content

Commit 7881bc8

Browse files
authored
Create readme.md
1 parent 773fc9b commit 7881bc8

File tree

1 file changed

+71
-0
lines changed
  • src/Umbraco.Cms.Integrations.Crm.Dynamics

1 file changed

+71
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Umbraco.Cms.Integrations.Crm.Dynamics
2+
3+
This integration provides a form picker and rendering component for forms managed withing a Microsoft Dynamics 365 Marketing instance.
4+
5+
## Prerequisites
6+
7+
Required minimum versions of Umbraco CMS:
8+
- 8.4.0 for version 8
9+
- 9.0.1 for version 9
10+
- 10.1.0 for version 10
11+
12+
## How To Use
13+
14+
### Authentication
15+
16+
The package uses the OAuth protocol for authentication.
17+
18+
### Additional Configuration
19+
20+
To connect to your Dynamics 365 instance, the following configuration is required:
21+
```
22+
<appSettings>
23+
...
24+
<add key="Umbraco.Cms.Integrations.Crm.Dynamics.HostUrl" value="https://[INSTANCE]/api.crm4.dynamics.com/" />
25+
<add key="Umbraco.Cms.Integrations.Crm.Dynamics.ApiPath" value="api/data/v9.2/" />
26+
...
27+
</appSettings>
28+
```
29+
```
30+
"Integrations": {
31+
"Crm": {
32+
"Dynamics": {
33+
"Settings": {
34+
"HostUrl": "https://[INSTANCE].crm4.dynamics.com/",
35+
"ApiPath": "api/data/v9.2/"
36+
}
37+
}
38+
}
39+
}
40+
```
41+
42+
Please note that the above settings are for demonstration purpose, they might suffer changes depending on your personalized instance Web API.
43+
44+
### Backoffice usage
45+
46+
To use the form picker, a new data type should be created based on the Dynamics Form Picker property editor.
47+
48+
The settings in `Web.config` will be used for sending authorization and data requests to the Dynamics API, through the _0Auth Proxy for Umbraco Integrations_ or directly.
49+
50+
The _Connect_ button prompts the user with the Microsoft authorization window, which after a succesfull authentication will send the authorization code back.
51+
The retrieved access token will be saved into the database and used for future requests.
52+
53+
_Revoke_ action will remove the access token from the database and the authorization process will need to be repeated.
54+
55+
### Front-end rendering
56+
57+
A strongly typed model will be generated by the property value converter, and an HTML helper is available, to easily render the form on the front-end.
58+
59+
Ensure your template has a reference to the following using statement:
60+
61+
```
62+
@using Umbraco.Cms.Integrations.Crm.Dynamics.Helpers;
63+
```
64+
65+
And render the form using (assuming a property based on the created data type, with alias `dynamicsForm` has been created):
66+
67+
```
68+
@Html.RenderDynamicsForm(Model.DynamicsForm)
69+
```
70+
71+
The selected form is embedded either through an _iframe_, or using JS scripts.

0 commit comments

Comments
 (0)