Difference between revisions of "Integrations"

From Resco's Wiki
Jump to navigation Jump to search
Line 62: Line 62:
  
 
# Click '''Import Data''' or '''Export Data'''.
 
# Click '''Import Data''' or '''Export Data'''.
# Optionally, click '''Preview''' to verify that you are migrating the right data. Previews do not make any changes on either server.
+
# Optionally, click '''Import Preview''' to verify that you are migrating the right data. Previews do not make any changes on either server.
 
# Click '''Import''' or '''Export''' to conclude the migration.
 
# Click '''Import''' or '''Export''' to conclude the migration.
 
# Wait for the migration result.
 
# Wait for the migration result.
  
 
{{Note|Preview does not respect the selected primary key.}}
 
{{Note|Preview does not respect the selected primary key.}}
 +
 +
[[File:Import data preview.png|600px]]
  
 
Sample migration result: <code>RESULTS: ALL (15) : IMPORTED (13); UPDATED (2); FAILED (0).</code> In this case, 13 records were imported (created), 2 records were updated, no records failed.
 
Sample migration result: <code>RESULTS: ALL (15) : IMPORTED (13); UPDATED (2); FAILED (0).</code> In this case, 13 records were imported (created), 2 records were updated, no records failed.
 +
 +
=== Synchronize data ===
 +
 +
While importing or exporting data is basically one-and-done, synchronization is used in scenarios where you need to keep up the two environments in sync continuously.
 +
 +
{{Note|When you run sync for the first time, local data for the affected entities are deleted.|Warning}}
 +
 +
The first sync is full sync (all data downloaded); later synchronizations are incremental (only changes are transferred). See [[Synchronization]] for more information about this process in general. The article is written mostly from the perspective of syncing client (mobile app) and server, but many concepts also apply to the integration sync.
 +
 +
Click '''Sync''' in the toolbar to start the sync manually. Or, more likely, you might wish to schedule the sync to run regularly as a [[server processes|server process]]:
 +
 +
* Start the [[Admin Console]].
 +
* Select '''Processes Center > Processes''' from the menu.
 +
* Click '''New''' to create a new process.<br>[[File:Nightly sync job.png|350px]]
 +
* Save all changes and activate the process.
  
 
=== Import/export mapping ===
 
=== Import/export mapping ===

Revision as of 16:12, 23 September 2021

Integration with third-party systems

Resco CRM Connector (web APIs):




The Integrations function of Woodford allows you to connect your Resco Cloud organization to various systems using connectors (Resco Cloud, Dynamics, OData). Match entities and fields between the two servers and exchange data. Configured connections can be used in Resco Cloud jobs and workflows to automate sync process.

Note Integrations are available since release 14.1 as a preview. Contact us if you want to help us shape this function to better match your needs.

Available connectors

The following connectors are available:

  • OData: Connect to any server that supports the Open Data Protocol (OData v4).
  • Resco Cloud: Connect to another organization residing on one of the various cloud servers of Resco (including Resco Inspections, Resco Routes, etc.).

Woodford configuration

You can manage your connections to other servers from the Administration menu of Woodford: Start Woodford and select Integrations (Preview) from the menu.

Create integration

  1. Click New.
  2. Name your integration and select which connector to use.
  3. Depending on the selected connector, enter the necessary connection details.
    Create a new integration.png
  4. Click Save.

If you are connecting to Business Central, some settings are configured by default:

  • Default mapping will be added. In the preview, only three entities are officially supported: account, contact, and work order.
  • Based on default mapping, External Primary Key fields will be added to the schema.

Map metadata

As the next step, you need to map external entities to local entities and external fields to local fields.

  1. Double-click a connection (created in the previous section).
  2. Select an entity from the External Entities pane and click Enable.
  3. In the Entity Mapping pane, select the matching Local Entity and optionally the Primary Key.
  4. In the table below, select the fields that you want to import or export (enable the checkbox in the first column) and then select the matching Local Field.
  5. For all fields with the local type "Lookup", enter the lookup Target:
    • For Business Central integration, use the predefined default value.
    • For Resco Cloud integration, it's enough to enter the name of the entity.
  6. Save all changes.

You can repeat these steps for additional external entities as needed.

Mapping of entity fields.png

Clean up metadata

Administrators of the backend servers can occasionally modify the metadata, either on the local or on the external server. New entities or fields are not a problem. What can affect the integration is when a certain entity or field used in integration is removed.

When you open a connection, Woodford checks whether the configured mapping is still valid. If this validation finds some missing entities or fields, a warning message is displayed with the recommended actions.

  • If an external entity or field goes missing, click Clean Up to remove it from the mapping.
  • If a local entity or field goes missing, select a new local entity/field.
  • If the Primary Key field goes missing, consider setting up a new primary key.

Set up sync filter

Optionally, if you want to restrict what data to sync, consider setting up a sync filter. For each entity, you can define conditions. Only records that match the condition are synchronized. Click Sync Filter and enter a suitable condition, then click Save & Close.

Sync filter in integrations.png

Import/export data

Once the mapping is done, you can start using the integration for migrating data.

  1. Click Import Data or Export Data.
  2. Optionally, click Import Preview to verify that you are migrating the right data. Previews do not make any changes on either server.
  3. Click Import or Export to conclude the migration.
  4. Wait for the migration result.
Note Preview does not respect the selected primary key.

Import data preview.png

Sample migration result: RESULTS: ALL (15) : IMPORTED (13); UPDATED (2); FAILED (0). In this case, 13 records were imported (created), 2 records were updated, no records failed.

Synchronize data

While importing or exporting data is basically one-and-done, synchronization is used in scenarios where you need to keep up the two environments in sync continuously.

Warning When you run sync for the first time, local data for the affected entities are deleted.

The first sync is full sync (all data downloaded); later synchronizations are incremental (only changes are transferred). See Synchronization for more information about this process in general. The article is written mostly from the perspective of syncing client (mobile app) and server, but many concepts also apply to the integration sync.

Click Sync in the toolbar to start the sync manually. Or, more likely, you might wish to schedule the sync to run regularly as a server process:

  • Start the Admin Console.
  • Select Processes Center > Processes from the menu.
  • Click New to create a new process.
    Nightly sync job.png
  • Save all changes and activate the process.

Import/export mapping

Export / Import
If you have multiple similar organizations where you want to reuse an integration, you can export the entire mapping configuration to a file and then import it to a different organization.
Export Entity / Import Entity
Alternatively, you can export/import mapping for a single entity.

Use case: connect to Business Central

You can use Integrations to connect to Microsoft Dynamics 365 Business Central.

Register Resco application in Business Central

Before you can start migrating data between Resco Cloud and Business Central, you must register the Resco application (clientId) in Business Central and grant Resco consent with accessing Business Central data.

  1. Log in to your Business Central organization and go to the Azure Active Directory Applications.
    Bc1.png
  2. Click New and fill out the registration form.
    Bc2.png
  3. As Client ID, use 4abedb2f-19bc-402f-b0b5-b8d17e85aa04.
  4. Add User Permission Sets.
  5. Grant the necesary consent.
    Bc3.png

Configure Woodford

  1. Start Woodford and select Integrations from the Administrator menu.
  2. Click New and enter the following details:
    Bc4.png
  3. Click Save.

Double-click this integration to map external entities/fields to local entities/fields. Then you can start migrating data.

See also