Configure S-Docs & S-Sign For CAC Signature

Introduction

This article will teach you how to configure the S-Docs/S-Sign Common Access Card (CAC) integration, which allows users to use their CAC to apply digital signatures to S-Sign PDFs.

Note: If you've already completed the configuration process, click here to learn how to apply CAC signatures to S-Sign PDFs (end-user experience).

Create New Fields

First, you need to create three new fields - one on the S-Sign Template object, and two on the S-Sign Envelope Document object.

From the setup menu, navigate to the Object Manager tab and find the S-Sign Template object.

Navigate to the Fields & Relationships tab, and click New.

Select Checkbox as the data type, then click Next.

Enter the following values:

Field Label: CAC Required
Default Value: Unchecked
Field Name: CAC_Required

Finish the field creation process and click Save.

Next, navigate back to the Object Manager and find the S-Sign Envelope Document object.

Navigate to the Fields & Relationships tab, and click New.

Select Formula as the data type, then click Next.

Enter the following values:

Field Label: Download Document for CAC
Field Name: Download_Document_for_CAC
Formula Return Type: Text

Next, enter the following formula:

IF(
SSIGN__SSTemplate__r.CAC_Required__c,
HYPERLINK(
"/apex/SSCACDownload?ssedId=" & Id,
IMAGE("/img/icon/product_consumed24.png","Download Document for
CAC"),
"_blank"
),
'Not Required'
)

Keep the default settings for the next two steps, then click Save & New.

Select Formula as the data type, then click Next.

Enter the following values:

Field Label: Upload CAC Document
Field Name: Upload_CAC_Document
Formula Return Type: Text

Next, enter the following formula:

IF(
SSIGN__SSTemplate__r.CAC_Required__c,
HYPERLINK(
"/apex/SSCACUpload?ssedId=" & Id,
IMAGE("/img/icon/product_request_line_item24.png","Upload CAC
Document"),
"_blank"
),
'Not Required'
)

Keep the default settings for the next two steps, then click Save.

Add Fields To Page Layout

Next, you need to add the fields to their respective object page layouts. Navigate to the Page Layouts tab for the S-Sign Envelope Document object manager, click the dropdown arrow for the S-Sign Envelope Document page layout, then click Edit.

Ensure that the two formula fields (Upload CAC Document and Download Document for CAC) are added to the S-Sign Envelope Document detail layout.

Then, navigate to the Page Layouts tab for the S-Sign Template object manager, click the dropdown arrow for the S-Sign Template page layout, then click Edit. Ensure that the CAC Required and CAC Enabled fields are added to the S-Sign Template detail layout.

Add New Visualforce Pages & Apex Classes

Next, you need to create three Apex classes and three Visualforce pages. Contact S-Docs Support (support@sdocs.com) to obtain the Apex classes and Visualforce markup.

Enable S-Sign-Enabled S-Docs Templates For CAC Signature

To enable your S-Sign-enabled S-Docs templates for CAC signature, you must access the S-Sign template record detail page for each template that you want to digitally sign (S-Sign-enabled S-Docs templates store S-Sign data in a separate S-Sign template).

Accessing the S-Sign template record detail page requires you to find the S-Sign template ID that corresponds to that S-Docs template. You can query the S-Sign template ID for each S-Docs template in the Developer Console.

Navigate to the Developer Console and input the following query into the Query Editor:

SELECT Id, SSIGN__SDTemplate__r.Name FROM SSIGN__SSTemplate__c

This will bring up a list like the following:

[1] The S-Docs template name appears on the right, and [2] the S-Sign template ID appears on the left. Find the S-Docs template that you want to enable for CAC Signature, copy the S-Sign template ID, and then paste it into your browser after "salesforce.com" or "lightning.force.com."

This will open the S-Sign template record. From there, you can scroll down and check both the CAC Enabled and CAC Required checkboxes.

This must be done for each template that you wish to enable for CAC digital signature.

(Optional) Add The CAC Redirect URL To Your Template(s)

Optionally, you can choose to redirect the final signer of an S-Sign request to the CAC download/upload page. This will allow the signer to download and digitally sign the document immediately (if you do not opt into this feature, the CAC signer must navigate to the S-Sign Envelope Document record after the S-Sign request is completed, and download/upload the document from there).

To opt into this feature, navigate to the template(s) you wish to digitally sign with your CAC and open the Template Editor.

Navigate to the S-Sign Template Settings in the S-Sign panel on the left, and find the Redirect Signer to Page field.

Enter the following URL into this field:

https://YOUR_SALESFORCE_DOMAIN/apex/SSCACReplace?ssedID=[[ssedID]]

Replace YOUR_SALESFORCE_DOMAIN with your Salesforce domain. You can find your domain by clicking your user profile in the top right and copying it from under your username.

After clicking Save, S-Sign requests that include this template will redirect the final signer to the CAC download/upload page.

To learn how to digitally sign S-Sign PDFs with your CAC, click here to walk through the end-user experience.

Was this helpful?