Skip to content

Commit

Permalink
Merge pull request #94 from AlexaCRM/addApiRequests
Browse files Browse the repository at this point in the history
rename Dataverse Integration to DataPress, add notes, FAQ, API description
  • Loading branch information
georged authored Nov 6, 2024
2 parents 36129eb + 2a70ed1 commit d76ab64
Show file tree
Hide file tree
Showing 19 changed files with 299 additions and 45 deletions.
8 changes: 6 additions & 2 deletions datapress/Forms/custom-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,22 @@ tags:
- DataPress
keywords: [DataPress custom form]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">Design forms with Twig and HTML and capture submissions into your Dataverse instance.</p>

## Introduction

Using PowerApps or Dynamics 365 forms is not the only way to capture submissions from your WordPress website. You can use Twig and HTML forms syntax to create custom form layouts.

Custom forms are a feature provided in the free Dataverse Integration plugin at [wordpress.org](https://wordpress.org/plugins/integration-cds/).
Custom forms are a feature provided in the free DataPress (Dataverse Integration) plugin at [wordpress.org](https://wordpress.org/plugins/integration-cds/).

## Use Twig to design a form

Dataverse Integration provides a pair of Twig tags, `{% form %}{% endform %}`, to define a form. `{% form %}` tag accepts the following parameters:
DataPress (Dataverse Integration) provides a pair of Twig tags, `{% form %}{% endform %}`, to define a form. `{% form %}` tag accepts the following parameters:

- `entity` -- *(string, required)* logical name of the target table.
- `mode` -- *(string, required)* `create` for creation forms. `update` for update forms.
Expand Down
18 changes: 11 additions & 7 deletions datapress/Forms/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ tags:
- DataPress
keywords: [DataPress forms]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">Capture leads, feedback and other information from your website using forms designed in PowerApps and Dynamics 365.</p>

Expand All @@ -19,17 +23,17 @@ Premium feature! This feature is available in the premium extension.

:::

Forms are an essential component of Power Apps and Dynamics 365 which enables interaction with your data. Dataverse Integration brings the comparable experience to your WordPress website. It makes writing data back to Dataverse / Dynamics 365 a priority, and to achieve the goal it provides support for rendering Dataverse / Dynamics 365 forms and processing the input by converting it into new Dataverse rows (records) or updates to the existing rows.
Forms are an essential component of Power Apps and Dynamics 365 which enables interaction with your data. DataPress (Dataverse Integration) brings the comparable experience to your WordPress website. It makes writing data back to Dataverse / Dynamics 365 a priority, and to achieve the goal it provides support for rendering Dataverse / Dynamics 365 forms and processing the input by converting it into new Dataverse rows (records) or updates to the existing rows.

The plugin introduces a concept of *"form registrations"*, a proxy layer between WordPress and a Dataverse form. It specifies among other things which Dataverse form to show, how to handle submissions, which fields to make required or optional.

Forms are fully integrated into the Twig templating engine, and Twig templates are the way to place forms on your website pages.

## Features and limitations

Dataverse Integration renders forms close to what they are defined in Dataverse, layout-wise. Most control types are supported too, including lookups, radio buttons and checkboxes, date & time pickers, as well as simple text (e.g. single-line and multi-line text, email) and number (e.g. integers, money) inputs.
DataPress (Dataverse Integration) renders forms close to what they are defined in Dataverse, layout-wise. Most control types are supported too, including lookups, radio buttons and checkboxes, date & time pickers, as well as simple text (e.g. single-line and multi-line text, email) and number (e.g. integers, money) inputs.

Dataverse Integration provides a lookup dialog very similar to one included in Power Apps and Dynamics 365. It allows picking rows as values for lookup and customer columns. The lookup dialog included in the plugin does not support selecting multiple rows for one column. Multi-select picklists are not supported yet.
DataPress (Dataverse Integration) provides a lookup dialog very similar to one included in Power Apps and Dynamics 365. It allows picking rows as values for lookup and customer columns. The lookup dialog included in the plugin does not support selecting multiple rows for one column. Multi-select picklists are not supported yet.

Several composite controls are not supported yet. Those include subgrids, maps, nested forms (quick forms), notes (Posts, Assistant, Activities, Notes).

Expand All @@ -39,11 +43,11 @@ There are no plans for support of web resources, such as custom JavaScript libra

Default Dataverse tables, such as Contact and Lead, include several composite read-only columns.

`fullname` is a calculated column which by default represents First Name and Last Name. Dataverse Integration and Dynamics 365 provide several options to generate the Full Name, [see the article](https://www.magnetismsolutions.com/blog/colinmaitland/2014/02/03/how-to-change-the-full-name-format-for-contacts-in-microsoft-dynamics-crm-2013). The plugin does not show a pop-up to specify each name component separately. It instead decomposes the `fullname` column, if one is present on the form, into separate controls on the form as if the form contained `firstname` and `lastname` instead.
`fullname` is a calculated column which by default represents First Name and Last Name. DataPress (Dataverse Integration) and Dynamics 365 provide several options to generate the Full Name, [see the article](https://www.magnetismsolutions.com/blog/colinmaitland/2014/02/03/how-to-change-the-full-name-format-for-contacts-in-microsoft-dynamics-crm-2013). The plugin does not show a pop-up to specify each name component separately. It instead decomposes the `fullname` column, if one is present on the form, into separate controls on the form as if the form contained `firstname` and `lastname` instead.

`addressN_composite` columns are likewise calculated based on other `addressN_*` columns. In terms of rendering composite address columns are treated the same as Full Name columns.

Dataverse Integration allows customizing the list of underlying attributes for Full Name and Address columns.
DataPress (Dataverse Integration) allows customizing the list of underlying attributes for Full Name and Address columns.

### reCAPTCHA support

Expand All @@ -53,7 +57,7 @@ To add Google reCAPTCHA, fill in this [form](https://www.google.com/recaptcha/ad

In **Forms Global Settings**, you can enable or disable reCAPTCHA for all forms from the Dataverse Admin Area. By default, reCAPTCHA is disabled on all forms. You can enable reCAPTCHA separately in the form registration settings under the reCAPTCHA settings override section.

Dataverse Integration supports 3rd party plugins to retrieve reCAPTCHA credentials and settings:
DataPress (Dataverse Integration) supports 3rd party plugins to retrieve reCAPTCHA credentials and settings:

- [Contact Form 7 Captcha](https://wordpress.org/plugins/contact-form-7-simple-recaptcha/)
- [Google Captcha (reCAPTCHA) by BestWebSoft](https://wordpress.org/plugins/google-captcha/)
Expand Down Expand Up @@ -98,7 +102,7 @@ Form registration provides several options to override global form settings, suc

## Add the form to a page

Dataverse Integration provides a custom Twig tag, `{% form %}`, to add Dataverse forms to WordPress pages. When you add a Dataverse form to a page, you need to know its form registration ID -- it is specified in the list of form registrations.
DataPress (Dataverse Integration) provides a custom Twig tag, `{% form %}`, to add Dataverse forms to WordPress pages. When you add a Dataverse form to a page, you need to know its form registration ID -- it is specified in the list of form registrations.

```twig
{% form id=42 %}
Expand Down
6 changes: 5 additions & 1 deletion datapress/administration/cache-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ tags:
- DataPress
keywords: [DataPress cache]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">This page describes how to manage caching, including force disabling caching, configuring cache storage, and clearing the cache.</p>

Expand All @@ -26,7 +30,7 @@ By enabling this option, your site may slow down. Therefore, use it only for deb
:::

### Manage cache storage
You can force Dataverse Integration to use specified storage by changing `ICDS_CACHE_STORAGE` option in `Advanced settings`.
You can force DataPress (Dataverse Integration) to use specified storage by changing `ICDS_CACHE_STORAGE` option in `Advanced settings`.

For optimal performance of the cache clearing function, it is crucial to configure the settings in the Dataverse Admin Area under the Status menu. Follow these steps to ensure stable operation:
1. Access the Advanced settings in the Dataverse Admin Area.
Expand Down
65 changes: 57 additions & 8 deletions datapress/administration/disable-user.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ tags:
- DataPress
keywords: [DataPress user, WordPress user]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">Link your WordPress users to Dataverse records to provide customized experiences, user data synchronization and extra sign-in authorization.</p>

Expand All @@ -21,7 +25,7 @@ To enable this user you need to find this user again, tick this username, choose

## How to disable a user in Maker portal

Dataverse Integration provides capability to associate WordPress users with Dataverse Integration records to provide more opportunities to build self-service customer portals.
DataPress (Dataverse Integration) provides capability to associate WordPress users with DataPress (Dataverse Integration) records to provide more opportunities to build self-service customer portals.

When a bound user signs in, your website receives data from the bound record. To bind user manually, you should go to Users -> All Users in WordPress Admin Area and fond this user. Then hover the mouse cursor over the username and click 'Dataverse Binding', choose 'Manual' mode and find necessary record from the Contact table. Click Add and Apply to save settings.

Expand All @@ -37,7 +41,7 @@ Also if you set the Login Enabled column as 'Yes' for the user, this user will b

## How to get last login date for a user

To see the last login date, you need to get the user by ID (send a GET request).
To see the last login date, you need to get the user by ID by sending a GET request:

```text
https://{url}/wp-json/wp/v2/users/{id}
Expand Down Expand Up @@ -74,13 +78,13 @@ Pay attention to the meta fields in the response.
}
```

`icds_last_login` shows the last login date. It can be empty if the user hasn’t signed in.
The **icds_last_login** field shows the last login date. It can be empty if the user hasn’t signed in.

## How to filter users

To get users filtered by conditions, you need to send a GET request with the following encoded part:
To get users filtered by conditions, send a GET request with the following encoded part:

```twig
```text
[
{
"Field": "icds_binding",
Expand All @@ -97,10 +101,55 @@ To get users filtered by conditions, you need to send a GET request with the fol

You can add as many elements as you want. Operators can be: `eq, ne, gt, lt, ge, le, - =, !=, >, <, >=, <=, LIKE, IN, BETWEEN, REGEXP, EXISTS`.

You need to encode this body using URL-encoded format (you can use any tool).
Encode this body using URL-encoded format (you can use any tool).

Then add this encoded part in the URL. See the example below.
Then add this encoded part in the URL. See the example below:

<div class="text--center">
<img src="/images/filter-user.png" alt="Filter users via API" width="800" />
</div>
</div>

Another way to filter users is to use the **X-Icds-Filter** header. The value of the header can be:

```text
[
{
"Field": "icds_binding",
"Operator": "eq",
"Value": "1"
},
{
"Field": "icds_binding_ref",
"Operator": "ne",
"Value": null
}
]
```
In this example, you should not encode this text.

Also, add **icds_filter_header=1** in your request URL:

```
https://{your-wordpress-site}/wp-json/wp/v2/users?context=edit&icds_filter_header=1
```

## How to get only necessary user fields in response

Add **icds_select_header=1** in your request URL:

```
https://{your-wordpress-site}/wp-json/wp/v2/users?context=edit&icds_select_header=1
```
Also, use the **X-Icds-Select** header. Here you can specify any fields you want to see for users, for example, `id, email, description, url`.

In this example, you will see only the **id, email, description, and url** fields for the WordPress users.

## How to sort users by fields in response

Add **icds_order_header=1** in your request URL:

```
https://{your-wordpress-site}/wp-json/wp/v2/users?context=edit&icds_order_header=1
```

Also use the **X-Icds-Order** header. Here you can specify the field name to sort users, for, example **url** or **username**.
10 changes: 7 additions & 3 deletions datapress/administration/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ tags:
- DataPress
keywords: [DataPress troubleshooting]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">This page describes how to set up logs.</p>

### Setting up logs
Dataverse Integration stores in the logs some information about received and transmitted data, logical handlers, and so on. Thus, you can easily get data and analyze it.
DataPress (Dataverse Integration) stores in the logs some information about received and transmitted data, logical handlers, and so on. Thus, you can easily get data and analyze it.

#### Log Storage
By default, collected data is stored in log files. You can change it to use database as a storage by enabling the `ICDS_DB_LOGS` option in the `Advanced settings`.
Expand All @@ -24,9 +28,9 @@ By default, collected data is stored in log files. You can change it to use data
:::

#### QM support
Dataverse Integration supports the QueryMonitor plugin. So you can control this feature by toggling the `ICDS_QM_LOGS` option in the `Advanced settings`.
DataPress (Dataverse Integration) supports the QueryMonitor plugin. So you can control this feature by toggling the `ICDS_QM_LOGS` option in the `Advanced settings`.

When this feature is enabled, Dataverse Integration logs will be duplicated in QueryMonitor.
When this feature is enabled, DataPress (Dataverse Integration) logs will be duplicated in QueryMonitor.
#### Reading logs
Some recent logs are displayed on the `Status` tab in the plugin's admin area. You can view them by clicking on the `Show recent logs` link.

Expand Down
9 changes: 7 additions & 2 deletions datapress/api-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ tags:
keywords: [DataPress API]
---

<p class="lead"><b>Dataverse Integration</b> provides a number of WordPress hooks that allow you to extend the plugin and augment its behaviour.</p>
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead"><b>DataPress (Dataverse Integration)</b> provides a number of WordPress hooks that allow you to extend the plugin and augment its behaviour.</p>

## Actions

Expand All @@ -33,7 +38,7 @@ Fires after custom form was successfully submitted.

`integration-cds/initialized`

Fires after Dataverse Integration has been initialized.
Fires after DataPress (Dataverse Integration) has been initialized.

---

Expand Down
4 changes: 4 additions & 0 deletions datapress/binding/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ tags:
- DataPress
keywords: [DataPress Fields Binding, Fields Binding addon]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">Display column value using Dataverse Integration Fields Binding!</p>

Expand Down
8 changes: 6 additions & 2 deletions datapress/binding/table-binding.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ tags:
- DataPress
keywords: [DataPress Table binding, Table Binding]
---
:::note
The plugin previously known as Dataverse Integration has been renamed to DataPress. This change reflects our commitment to enhancing user experience and aligning with our evolving product vision.
All references to Dataverse Integration in the documentation, user interface will be updated to DataPress.
:::

<p class="lead">Link WordPress pages to Dataverse tables to provide direct access to your organization data.</p>

Expand All @@ -19,7 +23,7 @@ Premium feature! This feature is available in the premium extension.

:::

Table binding is a feature of Dataverse Integration plugin that allows linking specific Dataverse tables to WordPress posts and pages. When binding is set up, Twig, forms and other services get access to the "current" bound record and its columns.
Table binding is a feature of DataPress (Dataverse Integration) plugin that allows linking specific Dataverse tables to WordPress posts and pages. When binding is set up, Twig, forms and other services get access to the "current" bound record and its columns.

## Understand table binding

Expand All @@ -45,7 +49,7 @@ You can choose from several options how to bind the post.

In certain integration scenarios, it may be desirable to limit the number of table rows exposed to a user. In a self-service portal, you may want to allow a user access to their invoices, but keep them from seeing invoices for your other clients.

Dataverse Integration provides capability of restricting access by executing a provided FetchXML query before access to the page is granted. The query allows determining relations between the requested table row and the visitor. Access is granted if the query returns any rows.
DataPress (Dataverse Integration) provides capability of restricting access by executing a provided FetchXML query before access to the page is granted. The query allows determining relations between the requested table row and the visitor. Access is granted if the query returns any rows.

## Configure global binding settings

Expand Down
Loading

0 comments on commit d76ab64

Please sign in to comment.