Synchronize Data Between IDM and DocuSign

This sample demonstrates bidirectional synchronization between IDM managed users and DocuSign accounts.

The sample assumes that you have downloaded and installed the DocuSign connector and its dependencies, as described in "Installing and Configuring the DocuSign Connector". The sample also assumes that you have the DocuSign account information required to configure the connector, as described in "Before You Configure the DocuSign Connector".

Run the Sample

In this section, you will do the following:

  1. Start IDM with the sample configuration.

  2. Configure the DocuSign connector and test your connection to DocuSign.

  3. Reconcile your DocuSign service accounts with the IDM managed user repository.

  4. Change a user in IDM and reconcile the changes back to DocuSign.

The mapping configuration file (sync.json) for this sample includes two mappings: systemDocusignAccount_managedUser and managedUser_systemDocusignAccount. You will use these mappings to reconcile users between IDM and DocuSign.

  1. Start IDM with the configuration for the DocuSign sample:

    /path/to/openidm/startup.sh -p samples/sync-with-docusign
  2. Configure the DocuSign connector.

    You can configure the connector in two ways:

    • Update samples/sync-with-docusign/conf/provisioner.openicf-docusign.json with your DocuSign account details.

    • Use the Admin UI to configure the connector.

    Follow one of the procedures in "Installing and Configuring the DocuSign Connector" to configure the connector.

  3. Test the connection to DocuSign by running the following command:

    curl \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    --header "Accept-API-Version: resource=1.0" \
    --request POST \
    "http://localhost:8080/openidm/system?_action=test"
     [
      {
        "name": "docusign",
        "enabled": true,
        "config": "config/provisioner.openicf/docusign",
        "connectorRef": {
          "bundleVersion": "1.5.0.0",
          "bundleName": "org.forgerock.openicf.connectors.docusign-connector",
          "connectorName": "org.forgerock.openicf.connectors.docusign.DocuSignConnector"
        },
        "displayName": "DocuSign Connector",
        "objectTypes": [
          "userSignature",
          "signingGroup",
          "__ALL__",
          "account",
          "contact"
        ],
        "ok": true
      }
    ]

    A status of "ok": true indicates that the connector can connect to DocuSign.

    If you configure the connector through the Admin UI, the connection is tested as soon as you select Save.

  4. Reconcile your existing DocuSign users with the IDM managed user repository by running the following command:

    curl \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    --header "Accept-API-Version: resource=1.0" \
    --request POST \
    "http://localhost:8080/openidm/recon?_action=recon&mapping=systemDocusignAccount_managedUser&waitForCompletion=true"
    {
      "_id": "7dac3ea9-c6be-4ff9-ae46-d8a0431949b3-7745",
      "state": "SUCCESS"
    }

    Alternatively, in the Admin UI, select Configure > Mappings, and select Reconcile on the systemDocusignAccount_managedUser mapping.

  5. In the Admin UI, select Manage > User and verify that your DocuSign users have been created as IDM managed users.

  6. Edit one of the newly created managed users in IDM.

    The easiest way to do this is to select Manage > User, select a user to edit, and change one of the user properties.

  7. Reconcile the users in the managed user repository with your DocuSign users by running the following command:

    curl \
    --header "X-OpenIDM-Username: openidm-admin" \
    --header "X-OpenIDM-Password: openidm-admin" \
    --header "Accept-API-Version: resource=1.0" \
    --request POST \
    "http://localhost:8080/openidm/recon?_action=recon&mapping=managedUser_systemDocusignAccount&waitForCompletion=true"
    {
      "_id": "1f148024-45b9-4dc1-9c3f-29976e02db00-8700",
      "state": "SUCCESS"
    }

    Alternatively, in the Admin UI, select Configure > Mappings, and select Reconcile on the managedUser_systemDocusignAccount mapping.

  8. Verify that the contact was updated correctly in DocuSign.

This is the end of the sample. For more information about the DocuSign connector, see "DocuSign Connector".

Read a different version of :