The document extraction feature automatically creates all signatures and fields that exist in an uploaded PDF file. The positions and sizes of the signatures and fields in the PDF file are automatically retained in Conga Sign

The following limitations affect Document Extraction:

  • Document Extraction is available only in the API call that uploads the document. It is not available in subsequent calls.
  • Radio button fields are not supported when using Document Extraction.

Configuring PDF Form Fields

First, you will need a PDF with form fields, named in a way that Conga Sign can recognize them. For more information on the proper format of the form field names, see the feature overview. The form field names on the fields are shown in the image below:

As you can see, the two signers on the document will be Signer1 and Owner. These will be the custom IDs used in the code section below to let Conga Sign know what fields to associate with each signer. By default, the values used for the role of the extraction tag/fieldName are Signer1, Signer2, and so on. If you want to include the sender of the transaction as a signer, use the tag Owner.

Configuring Document Extraction

Typically, you will build your JSON string dynamically, versus having a giant static string, like this. This is to give a good representation of the structure of the JSON you will need to create your transaction properly.

The JSON below is formatted for readability. In each roles object, you will see that the custom IDs coincide with the ones in the image of the PDF form shown above. The documents object also has extract to true.

Because this is done, you do not have to define the signature locations and who needs to sign the document. This is already taken care of with the IDs and the associated form field names from the PDF.

HTTP Request

POST /api/cs-packages 
JS

HTTP Headers

Pccept: application/json
Content-Type: multipart/form-data
Authorization: Bearer access_token 
JS

Request Payload

------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="file"; filename="testDocumentExtraction.pdf"
Content-Type: application/pdf
%PDF-1.5
%µµµµ
1 0 obj
<>>>
endobj.... 
------WebKitFormBoundary1bNO60n7FqP5WO4t
Content-Disposition: form-data; name="payload"	
{
  "roles": [
    {
      "id": "Signer1",
      "type": "SIGNER",
      "signers": [
        {
          "firstName": "John",
          "lastName": "Smith",
          "email": "signer1@example.com",
          "id": "Signer1"
        }
      ],
      "name": "Signer1"
    }
  ],
  "documents": [
    {
      "name": "testDocumentExtraction",
      "extract": true
    }
  ],
  "name": "Test Document Extraction",
  "type": "PACKAGE",
  "autoComplete": true,
  "status": "SENT"
}
------WebKitFormBoundary1bNO60n7FqP5WO4t--
JS


For a complete description of each field, see the Request Payload Table below.

Response Payload

{   "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI="   } 
JS

Request Payload Table

PropertyTypeEditableRequiredDefaultSample Values

status

stringYesNoDRAFTDRAFT/SENT/COMPLETED/ARCHIVED/DECLINED/OPTED_OUT/EXPIRED 
autoCompletebooleanYesNotruetrue/false 
typestringYesNoPACKAGEPACKAGE/TEMPLATE/LAYOUT 
namestringYesYesn/aTest Document Extraction 
Documents
namestringYesNon/atestDocumentExtraction 
extractbooleanYesNofalsetrue/false 
Roles
idstringYesNon/aPreparer1 
namestringYesNon/aSender 
typestringYesNoSIGNERSIGNER/SENDER 
Signers
emailstringYesYesn/apreparer1@example.com 
firstNamestringYesYesn/aMichael 
lastNamestringYesYesn/aWilliams 
phonestringYesNon/a514-555-8888 
idstringYesNon/aPreparer1 
Delivery
emailbooleanYesNofalsetrue/false 
providerbooleanYesNofalsetrue/false 
downloadbooleanYesNofalsetrue/false 

Feature Overview

Document Extraction looks for appropriately named signatures and fields in an uploaded PDF document, and for each one, it creates a Sign signature or field. The positions and sizes of the signatures and fields from the PDF are automatically retained in Sign.

The following limitations affect Document Extraction:

  • Document Extraction is available only in the API call that uploads the document. It is not available in subsequent calls.

  • Radio button fields are not supported when using Document Extraction.

The information needed to create each Sign signature or field is taken from the name of the PDF signature or field.

Naming Conventions

To create a Conga Sign signature field, the PDF field must have a name of the form[Signer.SigStyle#], where:

  • Signer: By default, the values used for the role of the extraction tag/fieldName are Signer1, Signer2, and so on. If you want to include the sender of the transaction as a signer, use the tag Owner. If you specify a custom role ID for your recipients, you'd use that value in your tags.
  • SigStyle#: A signature style (Capture, Initials, or Fullname) combined with an integer for uniqueness. Example: Capture1 or Fullname09.

If you want the signature field to be optional, simply use the following format:[Signer.SigStyle#.Optional]

To create an unbound Conga Sign field, the PDF field must have a name of the form [Signer.SigStyle#.FieldStyle#], where:

  • Signer.SigStyle# identifies the signature associated with this field.
  • FieldStyle# is a field style (Textfield or Checkbox) combined with an integer for uniqueness.For example: Textfield2 or Checkbox6.

To create a bound Conga Sign field, the PDF field must have a name of the form [Signer.SigStyle#.label#.Binding], where:

  • Signer.SigStyle# identifies the signature associated with this field.
  • label# is an identifier of the field, consisting of the word label combined with an integer for uniqueness.
  • Binding is a field style.The possible values are Date or {approval.signed}, Name or {signer.name}, Title or {signer.title}, and Company or {signer.company}.Both members of each pair signify the same field style.

    All parts of a PDF field name are matched using case-insensitive matches. For example, a field named [Signer1.Fullname1.label1.Date] is treated the same as a field named [Signer1.FULLNAME1.LABEL1.DATE]. Field names are alphanumeric. They cannot contain special characters other than the underscore (_).

Example

Here is an example. Suppose a package has two signers whose custom IDs are Signer1 and Owner. Further, suppose that extraction is enabled and that a PDF is uploaded which has fields with the following names:

  [Owner.Fullname1]   [Owner.Fullname1.label1.Date]   [Owner.Fullname1.Textfield1]   [Owner.Fullname1.Checkbox1]   [Owner.Fullname2.Optional] 
JS
[Signer1.Capture1][Signer1.Capture1.label1.Name][Signer1.Capture1.label2.Date][Signer1.Capture1.label3.Title][Signer1.Initials1][Signer1.Initials2]
JS

Before signing, Owner must complete two fields:

[Owner.Fullname1.Textfield1][Owner.Fullname1.Checkbox1]
JS

Once those fields are complete, Owner can sign [Owner.Fullname1], and [Owner.Fullname1.label1.Date] will automatically be filled with the date of signing.

Signer1 needs to sign in three places:

[Signer1.Initials1][Signer1.Initials2][Signer1.Capture1]
JS

Once these are all signed, the remaining fields will be filled:

If you have specified custom IDs for the sender and the signer (for example, Agent1  and Client1) user form field names similar to the ones below, and the signing flow will remain the same:

[Agent1.Fullname1]   [Client1.Initials1]
JS