Using DocuSign with an adaptive form integrate-aem-forms-with-DocuSign

DocuSign is a prominent e-signature solution. You can use it to e-sign an agreement. You can integrate DocuSign with an adaptive form. It helps you send an adaptive form for e-signatures to multiple recipients. Using e-signatures helps you:

  • Close deals from any device with fully automated proposal, quote, and contract processes.
  • Finish Human Resource processes faster and give your employees the digital experiences.
  • Cut contract cycle times and onboard your vendors faster.

AEM Forms as a Cloud Service provides a custom submit action for DocuSign. The submit action helps you to send the adaptive forms for e-signatures using DocuSign APIs.

You can also use Adobe’s e-signature solution, Adobe Sign, to e-sign an adaptive form. AEM Forms has a much deeper integration with Adobe Sign and provides much finer controls like sequential and parallel signing, multiple authentication methods, in-form signing experience and more. For more information, see Using Adobe Sign in an Adaptive Form.

Prerequisites prerequisites

The following are required to integrate DocuSign with AEM Forms:

Configure custom submit action and Cloud service for DocuSign deploy-custom-submit-action

AEM Forms as a Cloud Service provides a custom submit action for DocuSign. The submit action helps you to send the adaptive forms for e-signatures using DocuSign APIs. Code for custom submit action is available on AEM Forms samples public git repository. You can deploy the code as it is on your AEM Forms environment or customize it as per the requirements of your organization.

Perform the following steps to configure out-of-the-box custom submit action and DocuSign Cloud Service:

  1. Clone your AEM Forms as a Cloud Service project or create an Experience Manager Forms as a Cloud Service project based on AEM Archetype 27 or later. To create an Experience Manager Forms as a Cloud Service project based on AEM Archetype:

    Open the command prompt and run the below command to create an Experience Manager Forms as a Cloud Service project:

    code language-shell
    mvn -B archetype:generate -DarchetypeGroupId=com.adobe.aem -DarchetypeArtifactId=aem-project-archetype -DarchetypeVersion=27 -DaemVersion="cloud" -DappTitle="My Site" -DappId="mysite" -DgroupId="com.mysite" -DincludeForms="y"
    

    Also, change appTitle, appId, and groupId, in the above command to reflect your environment.

  2. Clone the aem-forms-samples repository. This repository contains custom submit action for DocuSign and configuration details to connect with the DocuSign server.

  3. Open the AEM Forms as a Cloud Service project created in Step 1 for editing in IDE of your choice.

  4. Open the [AEM Forms as a Cloud Service project]\pom.xml file for editing and make the following changes:

    1. Add the following text at the end of the <properties> tag:

      code language-shell
      <repository.location>maven_repository</repository.location>
      
    2. Add the following text at the end of the <repositories> tag:

      code language-shell
       <repository>
          <id>project-repository</id>
          <url>file://${project.basedir}/${repository.location}</url>
       </repository>
      

      If there is no <repositories> tag, create the tag below the <properties> tag.

    3. Add the following text at the end of the <dependencyManagement> tag:

      code language-shell
       <dependency>
         <groupId>com.adobe.aemforms.samples</groupId>
         <artifactId>forms.integration.docusign.all</artifactId>
         <type>zip</type>
         <version>1.0.0</version>
       </dependency>
      
  5. Perform the following steps in the all/pom.xml file available in Cloud Service project folder:

    1. Add the following text at the end of the <embeddeds> tag:

      code language-shell
       <embedded>
          <groupId>com.adobe.aemforms.samples</groupId>
          <artifactId>forms.integration.docusign.all</artifactId>
          <type>zip</type>
          <target>/apps/moonlightprodprogram-vendor-packages/application/install</target>
       </embedded>
      
    2. Add the following text at the end of the <dependencies> tag:

      code language-shell
       <dependency>
          <groupId>com.adobe.aemforms.samples</groupId>
          <artifactId>forms.integration.docusign.all</artifactId>
          <type>zip</type>
       </dependency>
      
  6. Open the command prompt and navigate to aem-forms-samples\forms-integration-docusign (cloned in step 3) and run the following command:

    code language-shell
    mvn clean install -Dinstall.dir="<AEM Forms as a Cloud Service project path>/maven_repository"
    

    <AEM Forms as a Cloud Service project path> refers to the name of the folder created in step 1 of this procedure.

  7. Deploy the project to your local development environment. You can use the following command to deploy to your local development environment

    mvn -PautoInstallPackage clean install

    After executing these steps, you can view a new custom submit action Submit with DocuSign electronic signatures available in the list of submission options for an adaptive form and a DocuSign cloud service configuration in your local development environment.

  8. Compile and Deploy the code to your AEM Forms as a Cloud Service environment.

Integrate DocuSign with AEM Forms configure-docusign-with-aem-forms

After prerequisites are in place, perform the following steps to integrate DocuSign with AEM Forms on the Author instances.

  1. Navigate to Tools hammer > Cloud Services > DocuSign and select a folder to host the configuration.

  2. On the configurations page, select Create to create DocuSign configuration in AEM Forms.

  3. In the General tab of the Create DocuSign Configuration page, specify a Name for the configuration, and select Next. You can optionally specify a Title.

  4. Copy the URL in your current browser window to a notepad. The URL is required to configure DocuSign application with AEM Forms in a later step.

  5. Configure OAuth settings for the DocuSign application:

    1. Open a browser window and sign in to your DocuSign developer account.
    2. Open the app configured for AEM Forms.
    3. In the Redirect URI box, add the URL copied in the previous step and click Save.
    4. Note down the Integration and Secret Keys.

    For step-by-step information to configure OAuth settings for an DocuSign application and obtain the keys, see Configure oAuth settings for the application developer documentation.

  6. Go back to the Create DocuSign Configuration page. In the Settings tab, the OAuth URL field mentions the following default URL:

    https://account-d.docusign.com/oauth/auth

  7. Specify the Client ID (DocuSign Integration Key) and Client Secret (DocuSign Secret Key).

  8. Select Connect to DocuSign. When prompted for credentials, provide username and password of the account used while creating DocuSign application. When asked to confirm access for your developer account, click Allow Access. If the credentials are correct, a success message appears.

  9. Select Create to create the DocuSign configuration.

  10. Select the configuration and click Publish, select the configuration, and click Publish. It replicates the configuration to corresponding publish environments.

  11. Repeat all the above steps on your developer, stage, and production instances (whichever left) to complete configuring DocuSign with AEM Forms for your environment.

Now, your AEM Forms environment is configured to use DocuSign. Ensure that you add the configuration container used for the Cloud Service to all the Adaptive Forms being enabled for DocuSign. You can specify a configuration container from the properties of an Adaptive Form.

Use DocuSign in an Adaptive Form enabledocusign

You can enable DocuSign for an existing Adaptive Form or create an DocuSign enabled Adaptive Form. Choose one of the following:

Create an Adaptive Form for DocuSign create-an-adaptive-form-for-docusign

To create a sign-enabled Adaptive Form:

  1. Navigate to Adobe Experience Manager > Forms > Forms & Documents.

  2. Select Create and select Adaptive Form. A list of templates appears. Select a template and select Next.

  3. In the Basic tab:

    1. Specify the Name and Title for the Adaptive Form.

    2. Select the configuration container created while integrating DocuSign with AEM Forms.

    The configuration container contains the DocuSign Cloud Services configured for your environment. These services are available for selection in Adaptive Form editor.

  4. In the Form Model tab, select one of the following options:

    • If you have a custom form template and require a Document of Record based on the form template, select the Associate form template as the Document of Record template option and select a Document of Record template. When you use the option, then the documents sent for signing display only those fields which are based on the associated form template. It does not display all the fields of the Adaptive Form.

    • If you do not have a custom form template, select the Generate Document of Record option. When you use the option, the document sent for signing displays all the fields of the Adaptive Form.

  5. Select Create. A sign-enabled Adaptive Form is created. You can add your DocuSign fields to the form and send it for signing.

  6. Open the adaptive form in edit mode. In the Content tab, select the Form Container and select Configure .

  7. In the Submission section, select Submit with DocuSign electronic signatures from the Submit Action drop-down list.

  8. In the Action Configuration section, select Add to add a recipient and specify the email address of the recipient. Select Add again to add more recipients.

  9. Specify the subject for the email message in the Email Subject field. Select Include Attachments to include attachments in the email message.

  10. Select Save to save the properties.

Enable DocuSign for an Adaptive Form editafsign

To use DocuSign in an existing Adaptive Form:

  1. Navigate to Adobe Experience Manager > Forms > Forms & Documents.

  2. Select the Adaptive Form and select Properties.

  3. In the Basic tab, select the configuration container created while integrating DocuSign with AEM Forms.

  4. In the Form Model tab, select one of the following options:

    • If you have a custom form template and require a Document of Record based on the form template, select the Associate form template as the Document of Record template option and select a Document of Record template. When you use the option, then the documents sent for signing display only those fields which are based on the associated form template. It does not display all the fields of the Adaptive Form.

    • If you do not have a custom form template, select the Generate Document of Record option. When you use the option, the document sent for signing displays all the fields of the Adaptive Form.

  5. Select Save & Close. The Adaptive Form is enabled for DocuSign. Now, you can add your DocuSign fields to the form and send it for signing.

  6. Open the adaptive form in edit mode. In the Content tab, select the Form Container and select Configure .

  7. In the Submission section, select Submit with DocuSign electronic signatures from the Submit Action drop-down list.

  8. In the Action Configuration section, select Add to add a recipient and specify the email address of the recipient. Select Add again to add more recipients.

  9. Specify the subject for the email message in the Email Subject field. Select Include Attachments to include attachments in the email message.

  10. Select Save to save the properties.

recommendation-more-help
fbcff2a9-b6fe-4574-b04a-21e75df764ab