When generating output from a Form you can configure the Form to use data retrieved from an external data source.

This enables you to store the data on any server outside of Salesforce for example for economic or security reasons. Note that the generation process speed might decrease.

When creating the data model, you can decide that all or specific sections of the data model will use data from an external source.

During output generation, Docomotion will access the external database, using a service you need to provide, to retrieve the data.

Step 1: Getting a Template for each Relevant Section of the Data Model

The first thing you need is to get from Docomotion an XML format template for each section of the Data Model for which you want to use data from an external source.

  1. After you define the Data Model click PREPARE TEMPLATES below the Data Model.
  2. Select the field/branch you want to use from the external database, and click GET TEMPLATE.

    The window displays the XML format in which Docomotion expects to receive the data for this property/branch from the external database.
  3. Click Copy (or copy the XML directly) to copy the XML to paste in an XML editor (for example Notepad).
  4. Perform steps 2-3 for all the properties/branches you want to import from the external database.

Step 2: Create a Service to Retrieve the Data from the Database

Create a service that will retrieve the data from the DB. Docomotion will use the service to add the data to the Form in the correct place during output generation.

The service should include returning the data to Docomotion in the XML formats according to the templates that were created in the first step.

Step 3: Create the Request that Docomotion Should Send in Order to Retrieve the Data

The request should be according to the format you define in the Generation Settings of the Form.

To define the external database to use:

  1. Open the Form for which you want to define the external data source and scroll down to External Data Sources.
  2. Click New External Data Source and add the required information.
  • External Data Source Name: Any identifying name
  • Access Type: Unique identifier of your organization
  • Body Template: The format for accessing the data (can be in JSON format). Can include fixed data as well as Salesforce fields (identified by a square brackets place holder […] for example:
    {“PaymentsType”:”Create”,”LoanNum”: “[Opportunity__r.PS_Offer_External_Id__c]”,”Vat”:”N”,”LoanSum”:”(id_key-1)”,”BalloonSum”:”(id_key-2)”,”YearInterest”:”(id_key-3)”,”NumOfPayments”: “(id_key-4)”,”FirstPayDay”: “[Shares__r.Transfer_Date_for_the_Agreement__c]”}
  • Service URL: URL to the retrieval service for the data XML.
  • Error is Missing: false by default
  • Error Not Received: false by default
  • Form: The Form from which output is generated
  • Id Object: Salesforce API name for Repeat on: Id Object
  • Key: NA
  • Login URL/Password/Username: Authentication information required for accessing the service
  • Repeat On:

    • Target: Single request (no repeat). Used for the first level.
    • Id Object: Each instance creates a new request. Used for relations (children relations/lookups).
  • Target: Salesforce API name for Repeat on: Target
  • Token: NA