Adobe Acrobat Sign for ServiceNow: Installation and Configuration Guide (V 2.2)

Overview

The Adobe Acrobat Sign for ServiceNow application allows you to send documents for signature using the native functionality of the ServiceNow platform. Acrobat Sign integration with ServiceNow gives you access to the following features and functionalities:

  • Send documents for signature to multiple recipients. 
  • Track the signing process through its life cycle and identify the expected signers at each stage.
  • Retrieve the signed document with an embedded or separate audit trail document.
  • Retrieve the form data entered in the document prior to, or during, the signing process.
  • Create signature process drafts for an initial review and subsequent submission. Any modifications to the signatories before submission are synchronized into ServiceNow.
  • Generate and send email notifications to individuals during the signing process.
  • Source the documents for signature from the local files in ServiceNow or from an external source.
  • Use document templates with fields that can be filled in using data from ServiceNow records prior to submission. It allows you to use a single template to generate user-specific documents based on a selected subject record, such as an Incident or Service Request.
  • Use your Acrobat Sign account's library templates, which are synchronized to ServiceNow and are available for selection during the submission process.

The Adobe Acrobat Sign for ServiceNow: Installation and Customization Guide provides instructions on how to:

Once you install and configure Acrobat Sign for the ServiceNow application, you can use it to send, sign, track, and manage agreements. Refer to Adobe Acrobat Sign for ServiceNow: User Guide.

Install Acrobat Sign for ServiceNow application

You must be an Adobe Acrobat Sign admin and a ServiceNow System Administrator (admin) to be able to install the application on ServiceNow.  

  1. Go to the ServiceNow Store page and search for Adobe Acrobat Sign.  

    servicenow-store-search

  2. From the search results, select Adobe Acrobat Sign and then select Get.

    註解:

    Disable any pop-up blocker during the installation of the app.

    get-sign-app

  3. If prompted, log in using your ServiceNow admin credentials and follow through the steps for installation.

  4. To verify the installation, from the top menu on the ServiceNow instance, select All > System Applications > My Company Applications and then select the Installed tab. It displays the listing for the latest version of Adobe Acrobat Sign.

    installed-apps

    註解:

    The Adobe Acrobat Sign for ServiceNow plugin is configured to work with the following domains:

    • service-now.com
    • servicenowservices.com

    servicenowservices.com is for Government Cloud customers and requires an additional system property setting. If your domain is on the servicenowservices.com domain, you must create/set the system property x_adosy_as.oauth_redirect_host with the full sub-domain of your instance (such as mydomain.servicenowservices.com).

    The ‘Self-Service’ menu displays the new Adobe Acrobat Sign option with the following two modules:

    • My Signed Documents - It contains a list of agreements in a complete state where the logged-in user is either the requestor or a signer.
    • For Signature – It contains a list of agreements awaiting signature by the logged-in user. The agreements are in ‘Out for Signature’ or ‘Out for Approval’ status.

    Note: The self-service menus are visible only to users with the Signer (x_adosy_as.adobe_sign_signer) role.  

    menu-acrobat-sign

    The All application's menu includes an Adobe Acrobat Sign option that contains the following modules:

    • Send for Signature - Opens a record producer from which to create and submit an agreement.
    • My Agreements - A list of all agreements where the logged-in user is either a requestor or, is a signer.
    • My Signatures - Details of records where the logged-in user is a Participant (signer) of an agreement.

    Operational

    • Agreements - Back-end details of the signature process.  Includes JSON as well as all Adobe Acrobat Sign events that are being received and acted upon.
    • Source documents - Represents a document that can be added to an agreement. Can be Local or Library
    • Participants - Signers and details of their signature process.
    • Events - Back-end details of what is being sent and received per each Adobe Acrobat Sign event.
    • Form data - Table holding the returned form data once an agreement has been signed. This can be used for reporting on documents and their field data.

    Administration

    • Connect to Acrobat Sign - Connect screen where a valid Adobe Acrobat Sign account can be linked to ServiceNow.
    • Acrobat Sign groups - Contains the list of Acrobat Sign groups' names and IDs.
    • Acrobat Sign users - Contains the details of the Acrobat Sign users.
    • Electronic Seals -
    • Document templates - Templated documents that can be added to an agreement. Can be Local or Library.
    • Document fields - Details of the form fields which are embedded in the template’s document.
    • Merge rules - Associates a Document template with a certain type of subject record within ServiceNow.
    • Merge fields - Records that link a field from the Subject record to a field contained within the relevant Document template.
    • Properties - Adobe Acrobat Sign default settings for post sign URI redirect, notifications, and audit trail.

    Help and Support - Links to Adobe Acrobat Sign help.

    註解:
    • The ‘Send for Signature’, ‘My Agreements’, and ‘My Signatures’ modules are visible to users with the Sender (x_adosy_as.adobe_sign_sender) role. 
    • The ‘Operational’ and ‘Administration’ menus are only visible to users with the Admin (x_adosy_as.adobe_sign_admin) role or the Manager (x_adosy_as.adobe_sign_manager) role.

    Service Portal Widgets

    If you want to add Adobe Acrobat Sign to your Service Portal, you can see a demo at the URL /adobe_sign.

    This portal is restricted to the 'x_adosy_as.adobe_sign_sender' and 'x_adosy_as.adobe_sign_signer' roles.

    To add this functionality to your own portal, duplicate the widgets and modify the roles to suit.

    • Adobe Acrobat Dashboard Item List - The item list that is used by the Agreement List header widget.
    • Adobe Acrobat Sign Send for Signature - A widget for creating a new agreement from a template or file.
    • Adobe Acrobat Sign Agreement List - A widget for viewing the list of agreements.

    Service Portal Pages

    • Adobe Acrobat Sign - It contains the Adobe Acrobat Sign Popup widget and can be used from records in ServiceNow to generate new agreements on the fly.
    • Adobe Acrobat Sign Homepage - It is the homepage for the demo Service Portal included with the application.

    There are four roles included with the application:

    • Signer (x_adosy_as.adobe_sign_signer)
      • ServiceNow users with the x_adosy_as.adobe_sign_signer role is given access to the Adobe Acrobat Sign Self-Service modules  
      • They are also given access to the user Service Portal widget 
      • This role needs to be added to any users/groups that are required to sign Documents / Agreements
    • Sender (x_adosy_as.adobe_sign_sender)
      • ServiceNow users with the x_adosy_as.adobe_sign_sender role is given access to the application to function
      • This role needs to be added to any users/groups that need to be able to track Documents / Agreements they have requested or are required to sign
    • Manager (x_adosy_as.adobe_sign_manager)
      • ServiceNow users with the ‘x_adosy_as.adobe_sign_manager’ role have manager-level access to Acrobat Sign features
      • The manager can manage the agreements created by all senders
      • This role grants permission to cancel agreements created by other users
    • Admin (x_adosy_as.adobe_sign_admin)
      • ServiceNow users with the ‘x_adosy_as.adobe_sign_admin’ role have full access to all functionality

    By default, the application comes with a role that should be assigned to users who can sign the documents. To give all users access to sign documents, you must update the settings.

    注意:

    Changes you make to application files will prevent future updates from being applied.

    Capture any changes made to an update set so those changes can be re-applied after an update to the application.

    Always test any customizations in a dedicated test environment before applying to production.

Connect to Acrobat Sign

Adobe Acrobat Sign for ServiceNow application is designed to work with both commercial and government (FedRAMP) accounts. If you are unsure what account you have, follow the instructions for commercial cloud customers.

For commercial cloud customers:

Once the Adobe Acrobat Sign application is installed in ServiceNow, the Adobe Acrobat Sign group or account admins must connect ServiceNow to Adobe Acrobat Sign Commercial Cloud using the steps below:

  1. Navigate to Adobe Acrobat Sign > Administration > Connect to Adobe Acrobat Sign.

  2. On the dialog that appears, select Connect.

    connect-sign-1

  3. Log in to your Acrobat Sign account using admin credentials. 

    connect-sign-2

  4. On the permissions dialog that appears, select Allow Acess to grant the permissions and establish the connection. 

    connect-sign-3

    註解:

    The authentication takes place in a pop-up window.  If you don't see the authentication panel, check that your pop-up blocker is disabled.

    Once the connection is complete, you see a confirmation message with the connected Acrobat Sign account and the ServiceNow account it is associated with.

    Acrobat Sign connected to Commercial Cloud

For Government Cloud Customers:

Once the Adobe Acrobat Sign application is installed in ServiceNow, an Adobe Acrobat Sign Government Cloud group or account admin user can connect ServiceNow to Adobe Acrobat Sign Government Cloud.

  1. From the left panel, select Adobe Acrobat Sign > Administration > Properties.

    Enable fedramp in Sign for ServiceNow.

  2. In the application properties page that opens:

    1. Enable Use Adobe Acrobat Sign Government Cloud toggle.
    2. Find the property called Connection Login Hint and set the value to the email address that you will use to log in to Adobe Acrobat Sign Government Cloud.
    3. Select Save.
  3. Navigate to Adobe Acrobat Sign > Administration > Connect to Acrobat Sign.

  4. On the page that appears, select Connect.

    fedramp-2

  5. If prompted, sign into your Adobe Acrobat Sign Government Cloud account.

    Once the connection is established, the application redirects back to ServiceNow and automatically updates the connection status.

    fedramp-3

Configure Acrobat Sign for ServiceNow application

Set application properties

To access and set application properties, navigate to Adobe Acrobat Sign > Administration > Properties.

It displays the following default settings:

  • Hostname [x_adosy_as.redirect_host]If you have a custom instance URL, specify the fully qualified host to be used in the Redirect URI for OAuth and API callbacks (e.g., webhooks).
    By default, this value is empty, and the host is the value held by the "glide.servlet.uri system property.
    It applies to the ServiceNow instance redirect only. If you want to redirect the signer post signature to a different host, provide that host in the Signer Redirect URI (post_sign_uri) property.
  • Default Post Sign URL [x_adosy_as.post_sign_uri]: The default place to redirect a user after signing a document in Acrobat Sign. It's used when the Post-sign URI isn't specified during Agreement creation. This URI is relative to the specified instance name, but this can be overridden by including a protocol (such as https://www.adobe.com/), which allows the redirect after signing to go somewhere other than this ServiceNow instance. The sys_id of the created agreement can be injected using "{sys_id}" in the URL. The default value is "/x_adosy_as_agreement_list.do?sysparm_query=requested_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5EORsignersDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5Estate=Complete%5EORDERBYDESCsys_created_on" which will take the user to a list of completed agreements.
  • Signer Redirect Delay [x_adosy_as.post_sign_delay]The delay (in seconds) before a user is redirected after they have signed a document in Acrobat Sign. The default value is 3.
  • Clickjacking Defense [x_adosy_as.clickjacking_domains]Provide a comma-separated list of parent domain URLs where documents sent for signature may be included within an iframe, e.g. service-now.com.
    This is required for Government Cloud customers. Leaving this field blank may result in blank pages from Acrobat Sign when shown within a frame.
  • Allow Emails from Acrobat Sign [x_adosy_as.send_adobe_sign_emails]Control whether notification emails are sent by Acrobat Sign during the signing process. The default value is false.
  • Popout Draft Agreements [x_adosy_as.popout_draft]By default, clicking the Review Details button on an agreement will open the draft in Acrobat Sign in the same browser window.
    Set this option to true to open a new window instead. The default value is false.
  • Include Audit [x_adosy_as.include_audit]Control the audit trail that is included in signed documents. The default value is true.
  • Use Adobe Acrobat Sign Government Cloud [x_adosy_as.fedramp]Adobe Government Cloud customers must enable this property to have Acrobat Sign for ServiceNow use Acrobat Sign Government Cloud services. The default value is false.
  • Connection Login Hint [x_adosy_as.login_hint]The login_hint value used when first connecting to Adobe Acrobat Sign Government Cloud. This will auto-populate the "Connect to Acrobat Sign" page, which is usually the account admin user's email. The default value is empty.
  • Agreement Activity Formatter Fields [glide.ui.x_adosy_as_agreement_activity.fields]Set which fields should be shown in the activity format shown on the agreement record.
    The default value is "name, state, status,agreement_id,compose_url,post_sign_uri,etag".
  • "My Agreements" Query [x_adosy_as.my_agreements_query]The query to use when showing my agreements in places like the Portal. The default value is "requested_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe^ORsignersDYNAMIC90d1921e5f510100a9ad2572f2b477fe" which returns agreements where the user is the requestor or a signer.
  • Multipart File Extension [x_adosy_as.multipart_extension]The filename extension for the temporary Multipart File attachments. The default (recommended) value is "mpfd".
  • Application logging [x_adosy_as.logging.verbosity]Control system logging. The default value is "info".
  • Debug Connect [x_adosy_as.connect_debug]Show diagnostic alerts when connecting to Acrobat Sign. The default value is false.

The default redirect URL property applies to any agreement where the value in the ‘Post sign URI’ field has not been set.

註解:

Unencoded special characters or spaces are not supported in the redirect URLs. Therefore, if the 'Default Post Sign URL' within the Application Property includes a caret symbol (^), you must encode it as %5E.

For example,  /x_adosy_as_agreement_list.do?sysparm_query=requested_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe^ORsignersDYNAMIC90d1921e5f510100a9ad2572f2b477fe^state=Complete^ORDERBYDESCsys_created_on must be changed to:

 /x_adosy_as_agreement_list.do?sysparm_query=requested_byDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5EORsignersDYNAMIC90d1921e5f510100a9ad2572f2b477fe%5Estate=Complete%5EORDERBYDESCsys_created_on 

The remaining properties manage whether notifications are sent by Acrobat Sign during the signing process (default = No) and whether the Audit trail is included with the signed documents (default = Yes).

Configure custom components

Adobe Acrobat Sign application contains custom components that can be configured as per your requirements. Refer to the list of components below to see how to modify each.

The ‘Sign with Adobe Acrobat’ is a UI Action button on the Task [task] table. It is accessible only to the users with the Sender role (x_adosy_as.adobe_sign_sender). It allows senders to add documents and signers to an agreement and submit the attached document to Adobe Acrobat Sign for signature.

ui-action-1

System admins can add the 'Sign with Adobe Acrobat' action to other tables as follows:

  1. Open the existing ‘Sign with Adobe Acrobat’ action using one of the following two ways: 
    • On any form extended from Task (such as Incidnet), perform a right-click > Configure UI Actions.
    • Navigate to System Definition > UI Actions and then search for Sign with Adobe Acrobat
  2. Change the table name as required.
  3. Right-click on the top action bar and select Insert and Stay to create a copy of the existing record with the new table.

The ‘Adobe Acrobat Sign related list' displays the agreements that are related to the record on which the list is configured. Only users with the User role (x_adosy_as.adobe_sign_user) that is those who are requesters or signers of the agreement can see the agreements on the related list.

System admins or users with the ‘personalize_form’ role can configure the form and related list layout.

To add the Related List to Forms:

  1. From the relevant form, right-click and navigate to Configure > Related Lists.
  2. From the Available list, select Adobe Acrobat Sign
  3. Select the right arrow to add it to the Selected list.
  4. Select Save.

It takes you to the form you are configuring and the ‘Adobe Acrobat Sign’ related list is visible at the bottom of the form.

related-list-3

Configure service portal components

The Acrobat Sign for ServiceNow application comes with the following Service Portal elements that can be used or copied with your own Service Portals.

The Adobe Acrobat Sign Service Portal included with the application is not intended to be used or extended. It only supports the Send for Signature interface.

The portal can be accessed at /adobe_sign.

There are two Service Portal Pages included with the application:

  • Adobe Acrobat Sign (x_adosy_as_send)
  • Adobe Acrobat Sign Homepage (x_adosy_as_home)

The Adobe Acrobat Sign (x_adosy_as_send) page is used exclusively for the Send for Signature interface and should not be modified.

The Adobe Sign Homepage (x_adosy_as_home) is specified as the Service Portal home page and is intended as an example showcase of the included widgets.

You can use the widgets included with the application as per your requirements. To be able to track widget changes and get updates from your application, you must make any changes only in a clone of the widget.

  • Adobe Acrobat Sign Send for Signature: It is used to create an Agreement from templates and/or uploaded files. It is accessed by the Send for Signature menu item and the Sign with Adobe Acrobat UI Action and is available to users with the Sender role.

Widget Options: The widget is designed to be customized as required through the widget instance options or URL parameters. Use Document Templates and Merge Rules to automatically fill form data. You can set the boolean options to "true" or "1" when using URL parameters.

Name

Type

Description

subject_table

String

The name of the table the agreement belongs to.

subject_id

String

The sys_id of the record the agreement belongs to.

agreement_name

String

The name of the new agreement.

attachments

String

A list of attachment sys_ids to use in the agreement.

templates

String

A list of document template sys_ids to use in the agreement.

signers

String

A list of users or email addresses to add as signers.

ccs

String

A list of users or email addresses to add as CC entries.

password_protect

Boolean

Require the user to set a password to protect the agreement. The user will be required to set a password even if hide_options or lock_options is true.

send_emails

Boolean

Have Adobe send out email notifications during the signing process.

submit_as_draft

Boolean

Create a draft agreement rather than immediately submitting for signature.

copy_to_subject

Boolean

Copy the signed agreement file to the subject record. A valid subject_table and subject_id must be provided.

post_sign_uri

String

Provide a custom redirect for the signers when they finish signing. The default redirect will send the user to the agreement record.

hide_options

String

A comma separated list of options to hide (password_protect, send_emails, submit_as_draft, copy_to_subject). Set true to hide all options from the user.

lock_options

String

A comma separated list of options to make read-only (password_protect, send_emails, submit_as_draft, copy_to_subject). Set true to prevent all options from being changed by the user.

hide_subject

Boolean

Prevent attachments on the subject from being selected.

skip_documents

Boolean

Skip the initial documents panel. This will only apply when attachments or templates have been pre-selected.

  • Adobe Acrobat Dashboard Item List: It can be used to add a list of current Agreements that need signing to your employee or customer Service Portal. This list is used in the To-dos feature of the Adobe Sign Homepage.
    To access the records shown in this list, navigate to Self Service > Adobe Acrobat Sign > For Signature.
  • Adobe Acrobat Sign Header: It is used in the Adobe Sign Homepage to showcase the To-dos feature.
widget

Create document templates

A Document template defines a template that can be selected for inclusion in an agreement.  A template can be used to offer a standard document that can be reused for many individual agreements. The ‘Source document’ record references a template to make the features of that template available to the associated agreement.

The template can be local to the ServiceNow instance or it can be a Library template whose details are synchronized from the connected Adobe Acrobat Sign account.

Synchronise Library Templates

After the application is installed and configured, admins can synchronize the Library templates. An Adobe Acrobat Sign Library template is defined within the Acrobat Sign account and its details are synchronized into ServiceNow.  The defining document of a Library template is also stored in the connected Acrobat Sign account and so no uploading is needed for submission.

To synchronize the Library templates to ServiceNow:

  1. Navigate to Adobe Acrobat Sign > Administration > Document templates.
  2. Select Refresh Library.

It updates the list view with Library Templates from the connected Acrobat Sign account.

refresh-library

Create Local Templates

The defining document of a Local template is held as an attachment record within ServiceNow and must be uploaded to Acrobat Sign as part of the submission process.

A template’s document may or may not contain form fields that need to be pre-filled using data from the subject record of an agreement. You must use a template if a document contains such form fields.

  1. Navigate to Acrobat Sign > Administration > Document templates.
  2. Select New. 
  3. On the template New record page:
    1. Give the template a Name.
    2. Set the Type to Local.
    3. Right-click and then select Save.
  4. To associate a document with the template, select and drag the file onto the template record, or select the paperclip icon in the header and select the file. Once the file is added, select the X icon to dismiss the dialog.

It attaches the document to the Document template and is referenced in the ‘Document’ field.

create-template-without-field-1

create-template-without-field-2

create-template-without-field-3

You need to follow the same steps as outlined for Creating templates without Fields. However, once the document is associated, you must complete the following additional configuration steps as required: 

  • Verify that the ‘Fillable’ field is set to true. 

It is automatically checked when a document containing fillable fields is associated with the template.

  • Create Document field records.

You must create Document field records for a parent Document template and define the details of the form fields which are embedded within the template’s document.

To do so, save the Document template record and then select Refresh fields.

It populates the ‘Document fields’ related list with records corresponding to the fillable form fields on the attached document.

create-template-with-fields

  • Configure Merge Rules

A Merge rule associates a Document template with a certain type of subject record within ServiceNow.

A single Document template can have multiple Merge rules linked to it (one for each type of subject record that was used to pre-populate the template’s fields).

For example, a template could be filled using data from an Incident, a Service request, or a Change request record (in which case the template would have three merge rules, one for each subject table).

To configure the Merge rule:

  1. Navigate the Merge rule-related list.
  2. Select New.
  3. Select a Table, for example, Incident.
  4. Right-click and select Save.
merge-rule

  • Configure Merge Fields

A Merge field record links a field from the subject record to a field contained within the relevant Document template.  Merge fields need to be created manually when configuring the Merge rule.

To create Merge field records:

  1. Navigate to Adobe Acrobat Sign > Administration > Merge rules.
  2. On the Merge rule record, select Refresh fields.
    It populates the ‘Merge fields’ embedded list with the Document fields.  
  3. To link the relevant Document fields to their corresponding Record fields, select the link to the corresponding Record field of the Document field you wish to map (such as name).
  4. Select the relevant Record field (such as Caller) from the dropdown menu. 
  5. Select Update.

It re-directs you back to the Merge rule record. The Merge fields related list now contains the value of the Record field selected in the previous step.

For the sake of tidiness, delete (and Confirm) the remaining Merge fields that aren’t going to be mapped so that the Merge fields embedded list only contains the values that are being mapped.

merge-fields-1

Create a Service Catalogue Item

Acrobat Sign for ServiceNow allows you to create new agreements that users can access through the Service Catalog by creating a Record Producer. You can configure the Record Producer to collect any data you would like to merge into the document and automatically create and send the agreement to the user. 

Users with catalog_admin or admin can create a catalog item. The steps below explain how to create a catalog item called Record Producer. You can replicate the steps for creating other catalog items.

Note: Make sure that the Adobe Acrobat Sign application is not selected when configuring your instance.

The process of creating each Record Producer may differ based on the specific requirements for the Document fields, template, variable, and more; however, the same principles apply.  The example in this guide shows how to create a Parking Permit Agreement. 

To create a Record Producer:

  1. Navigate to Service Catalog > Catalog Definition > Record Producers and then select New.

  2. On the new Record Producer page that opens:

    1. Give the record a Name.
    2. Set the Table Name to Agreement [x_adosy_as_agreement].
    3. Enter a short description.
    4. Set the 'Redirect to' field to Generated Task Record.
    Generate a task record

  3. Select the Accessibility tab and set the Catalogs, Category, and Availability fields as required. Then, right-click on the header bar and select Save.

    You can set these fields using the ‘Categories’ and ‘Catalogs’ related lists. 

    Accessibility tab

  4. Using the Variable related list, add variables as required to match the Document fields. 

    In this example, we add the name, employee, and manager fields.

    Variables tab

    註解:

    The Default value for the ‘Permit name’ question variable is: ‘javascript:'Parking Permit for ' + gs.getUserDisplayName()’

  5. Configure the Record Producer Script that will take the variables and create the agreement to send for signature. In the ‘Script’ field:

    1. Copy and paste the following script which reads the catalog item variables.
    2. Update the variable definitions to collect information from the producer.
    3. Update the document template sys_id you are using.
    4. Update the post_sign_uri if you would like the user to go somewhere else after signing.

     

    // Example Adobe Acrobat Sign Record Producer for a Parking Permit template

    (function() {

      // Collect the information that we need from the variables filled in by the user

      var employee_id    = producer.employee + '';

      var employee_name  = producer.employee.getDisplayValue() + '';

      var manager_id     = producer.manager + '';

      var manager_name   = producer.manager.getDisplayValue() + '';

      var agreement_name = "Parking permit for " + employee_name;

      // Hardcoded sys_id of the Document Template being used

      var document_template = '5a2e0131db4c7c10c39151fcd39619af'; // Parking Permit

      // Setup the data to merge with the Document Template above.

      // Each property is the name of a Document Field we want to map to.

      var merge_data = {

        name         : agreement_name,

        employeename : employee_name,

        managername  : manager_name,

      };

      // Setup the new Agreement

      var agreement = new x_adosy_as.Agreement(current);

     

      // Add the documents we want to have signed

      agreement.addDocument(document_template, merge_data);

      // Add the signers

      agreement.addSigner(employee_id);

      agreement.addSigner(manager_id);

      // Set the agreement name

      current.name = agreement_name;

      // Set the URL that signers will be redirected to after signing

      current.post_sign_uri = '/x_adosy_as_agreement.do?sys_id=' + current.sys_id;

      // Set the state to 'Ready' to immediately send for signature

      current.state = 'Ready';

    })();

Create an Agreement from a Workflow Activity

To add documents for signature to existing Catalog items, you can add a task to your workflow that generates the agreement and a catalog task that assigns it to a user for their signature.

The following example demonstrates how you can use the Acrobat Sign application, however, the specific details of the configuration steps may differ according to the requirements of your process.

To create an agreement from a workflow activity, you must configure the following components: 

  • Catalog Task: It creates the agreement, submits it for signature, and assigns a task to the signer.
  • Script Action: It responds to the event fired when the agreement is signed and then closes the task, providing the feedback loop and allowing the workflow to move on. 

To create a Catalog task:

  1. In Workflow Editor, select the Core tab.
  2. Navigate to Core Activities > Tasks and then drag the Catalog Task activity to the appropriate place in your workflow.
  3. Give the task a Name and set its Priority.
  4. Set Wait for completion to true.
  5. In the Script section, set the Advanced flag to true, and then in the Advanced script field, write your code. An example code is given below.
  6. Select Update.
Create agreement from a Workflow Activity.

// Example task workflow activity creation

(function () {

  // The user who needs to sign the Agreement

  var signer_id = current.request.requested_for + '';

  var signer_name = current.request.requested_for.getDisplayValue() + '';

  // The name of the Agreement

  var agreement_name = current.short_description + ' for ' + signer_name;

  // Hardcoded sys_id of the Adobe Sign Document template for this action

  // This should really be a workflow variable to data-drive it.

  var document_template = '2a9b1f57db508810257e73278c9619dc'; // My Template

  // set the GUID without calling newRecord() - needed for the agreement subject

  task.setNewGuid(gs.generateGUID(task.getTableName()));

  // Setup the task

  task.short_description = current.short_description;

  task.assigned_to = signer_id;

  task.description = 'Agreement: ' + '\'' + agreement_name + '\'' +

    ' has been submitted  for your signature.\n' +

    'To sign, either:\n' +

    '- Navigate to: \'Self-Service > Adobe Sign > For Signature\', or\n' +

    '- Click the link to the Agreement in the \'Adobe Acrobat Sign\' '+

    'related list (below).';

  // Agreement options (fields on the agreement record)

  var options = {

    submit_as_draft: true // review the agreement in Adobe before sending

  };

  // Create an object to assist with the signing process

  var adobe = new x_adosy_as.AdobeSign();

  // Create the agreement and provide the task record as the subject

  adobe.createAgreement(agreement_name, task, options);

  // Add the document template.

  adobe.addDocument(document_template);

  // Add the signers. This could be user sys_ids or email addresses.

  adobe.addSigner(signer_id);

  // Submit the agreement to Adobe.

  adobe.submitAgreement();

})();

You can now set up a Script Action to automatically set the catalog task to the Closed Complete state when the agreement has been completed. You must configure your Script Action to be triggered by the x_adosy_as.agreement.complete event on the Agreement table.

To create a new Script Action:

  1. Navigate to System Policy > Events > Script Actions and click New.
  2. On the new Script Action page:
    1. Give the Script Action a name.
    2. Set the Event name to x_adosy_as.agreement.complete.
    3. Select the Active checkbox. 
    4. In the Script field, copy and paste the script from the Script Action: Sample Code below.
  3. Right-click on the header bar and select Save.
worflow-actitivty-script-action

Script Action: Sample Code

// Script Action to set the catalog task state to Close Complete

(function () {

  var catalog_task = current.subject_id.getRefRecord();

  if (!catalog_task.isValidRecord() || catalog_task.getTableName() != 'sc_task') {

    return;

  }

  catalog_task.state = 3; // Closed Complete

  catalog_task.update();

})();

Use Acrobat Sign with Contract Management

You can use Acrobat Sign with records other than the Task-based records as described above in Custom Components. The instructions below demonstrate how to use Acrobat Sign for Contract Management. The specific details of the configuration steps may differ according to the requirements of your process.

To use Acrobat Sign for Contract management, you must configure the following two components:

  • UI Action: It creates the agreement and submits it for signature.  Once the Agreement has been signed an event is fired. 
  • Script Action: It responds to the event and provides a feedback loop, moving the process along and updating the Contract. 

Note: Only users with the ‘ui_action_admin’ or ‘admin’ roles can define UI actions. Users with ‘admin’ role can only define a script action.

Create UI Action

To create a UI action on the Contract [ast_contract] form

  1. Navigate to System Definition > UI Actions and then select New.

    Alternatively, from the Contract [ast_contract] form, right-click and then select Configure > UI Actions > New.

  2. On the UI Action New record page, enter the following details:

    1. Ensure that Table is ‘Contract [ast_contract]’. 
    2. In the Name field, provide a name for the record.
    3. From the Table drop-down menu, select a Table.
    4. Enter an Order.
    5. Select the Active checkbox.
    6. Select the Show insert checkbox.
    7. Select the Show update checkbox.
    8. Select the Form button checkbox.
    9. Once done, right-click on the top bar and then select Save

    It saves the form and reloads it.

    ui-action-new-record

  3. In the Condition field, enter your condition for displaying the UI action. 

    The current example selects the condition as: ‘current.state == 'draft' andand current.substate == 'under_review' andand !current.approver.nil()’.  

    Condition

  4. In the Script field, enter a code (refer to the example code below) to create an Agreement record, set certain field values, and submit it to Adobe Acrobat Sign. 

    The code that you provide may vary based on your specific requirements but the general principle applies.

    註解:

    The hardcoded sys_id of the Document template refers to the template we are using in our example. 

    Yours will be the template which you create (see Create Local Templates for details of how to create a template).

    // Example UI Action for create a new Adobe Acrobat Sign Agreement

    (function() {

      // The name of the Agreement

      var agreement_name = 'Contract: ' + current.short_description;

      // Hardcoded sys_id of the Document Template for this action

      var document_template = '6d0cdc26db708c50257e73278c9619c4'; // Contract

      // Create an object to assist with the signing process

      var adobe = new x_adosy_as.AdobeSign();

      // Create the agreement and provide the current record as the subject

      adobe.createAgreement(agreement_name, current);

      // Add the document template. This could also be an attachment sys_id.

      adobe.addDocument(document_template);

      // Add the signers. This could be user sys_ids or email addresses.

      adobe.addSigner(current.approver);

      // Submit the agreement to Adobe.

      adobe.submitAgreement();

      // Redirect the user back to this record.

      action.setRedirectURL(current);

    })();

Create Script Action

We can trigger Script actions by events onlyThe Script action is configured to be triggered by one of the events on the Agreement table shipped with Adobe Acrobat Sign: x_adosy_as.agreement.complete

To create a new script action:

  1. Navigate to System Policy > Events > Script Actions.

  2. Select New.

  3. On the Script action New record page:

    1. Enter a name for the script.
    2. Select the Event name that triggers the script action.
    3. Select the Active checkbox.
    4. Write your code. Refer to the example code below.
    Give the script action a name

    (function () { 
       
      var contract = current.subject_id.getRefRecord(); 
      
      if (!contract.isValidRecord() || contract.getTableName() != 'ast_contract') { 
        return; 
      } 
      
      contract.state = 'active'; 
      contract.update(); 
    })();

    In this code, we get the contract from the subject_id field of the current agreement and check that it is a valid record on the Contract table. If so, we change the state to active and update.

  4. Select Submit.

Use scripting APIs

You can easily extent the Adobe Acrobat Sign application to work with any of your processes using the internal APIs. The API is accessible through the x_adosy_as namespace.

AdobeSign()

Creates an AdobeSign instance.

Example:

// Create a new instance of AdobeSign

var adobe = new x_adosy_as.AdobeSign();

 #addCcUser(String user_id)

Add a CC entry to the current agreement for sharing with non-participating users. Users not registered as ServiceNow users can be added by providing an email address.

Parameters:

Name

Type

Status

Description

user_id

String

Required

The sys_id of a user or an email address.

Returns:

Type

Description

void

Method does not return a value

Example:

// Add a CC user to the agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');

adobe.addCcUser(current.requested_by);

adobe.addCcUser('abel.tuter@example.com');

#addDocument(String doc_selector, Object merge_data)

Add a document or template to the current agreement.

Parameters:

Name

Type

Status

Description

doc_selector

String

Required

The name of a template, or the sys_id of a template or attachment.

merge_data

Object

Optional

A key-value object of document field names to document field values.

Returns:

Type

Description

String

If successful, the sys_id of the created Source Document record.

Example:

// Create an agreement with a template

var template_id = '2a9b1f57db508810257e73278c9619dc';

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');
adobe.addDocument(template_id);

#addElectronicSeal(String seal_id)

Add an electronic seal to the current agreement.

Parameters:

Name

Type

Status

Description

seal_id

String

Required

The sys_id, name or seal ID of an electronic seal to add.

Returns:

Type

Description

String|Boolean

The sys_id of the new participant record, or false if the seal was not found.

Example:

// Add an electronic seal to the agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');

adobe.addElectronicSeal('<SEAL>');

 #addParticipant(String user_id, String participant_role)

An alternative method to addSigner() allows participants to be added to an agreement with a specified role. Participants not registered as ServiceNow users can be added by providing an email address.

Note: This method should only be used with existing agreement records that are saved to the database.

Parameters:

Name

Type

Status

Description

user_id

String

Required

The sys_id of a user or an email address.

role

String

Optional

The role of the Participant within the agreement. Default is SIGNER. Other values include APPROVER, ACCEPTOR, CERTIFIED_RECIPIENT, FORM_FILLER.

Returns:

Type

Description

String|Boolean

The sys_id of the new participant record or false if the user record was not found or did not have an email address.

Example:

// Add a participant to the agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');

adobe.addParticipant('abel.tuter@example.com', 'APPROVER');

#addSigner(String user_id)

Add a signer to the current agreement. Signers not registered as ServiceNow users can be added by providing an email address.

Parameters:

Name

Type

Status

Description

user_id

String

Required

The sys_id of a user or an email address.

Returns:

Type

Description

void

Method does not return a value.

Example:

// Add a participant to the agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');

adobe.addSigner('abel.tuter@example.com');

#copySignedDocumentToRecord(GlideRecord record)

Copy the signed document of an agreement to another record.

Parameters:

Name

Type

Status

Description

record

GlideRecord

Required

The target record to copy the signed document to.

Returns: 

Type

Description

String|Boolean

The sys_id of the new attachment or false if the operation failed.

Example:

// Get the target record

var target = new GlideRecord('...');

// Copy the signed document from the agreement to the target
var adobe = new x_adosy_as.AdobeSign();

adobe.setAgreementRecord(agreement);

adobe.copySignedDocumentToRecord(target);

#copySignedDocumentToSubject()

Copy the signed document of an agreement to its subject record.

Returns:

Type

Description

String|Boolean

The sys_id of the new attachment or false if the operation failed.

Example:

// Copy the signed document from the agreement to the subject record
var adobe = new x_adosy_as.AdobeSign();

adobe.setAgreementRecord(agreement);

adobe.copySignedDocumentToSubject();

#createAgreement(String name, GlideRecord subject, Object option

Creates an agreement. It can be used by scripts that need to set up a new agreement.

Parameters:

Name

Type

Status

Description

name

String

Required

The agreement name.

subject

GlideRecord

Optional

The subject record e.g. a Contract or a Request

options

Object

Optional

A key-value object of agreement record field names to values.

Returns:

Type

Description

String|null

The sys_id of the new agreement or null.

Example:

// Create a new draft agreement

var options = {

  submit_as_draft: true

};

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement("My Agreement", current, options);

#getAgreement()

Get the Agreement instance currently in scope.

Returns:

Type

Description

Agreement|null

The Agreement instance or null.

Example:

// Get the agreement instance

var adobe = new x_adosy_as.AdobeSign();
adobe.createAgreement("My Agreement", current, options);
var agreement = adobe.getAgreement();

#getAgreementRecord()

Return the current agreement record.

Returns:

Type

Description

GlideRecord|null

The current agreement record, or null.

Example:

// Get the agreement record

var adobe = new x_adosy_as.AdobeSign();
adobe.createAgreement("My Agreement", current, options);
var agreement = adobe.getAgreementRecord();

#saveAgreement(String state)

Save the current agreement record. The Agreement state can be optionally passed in. This will not trigger a submission to Adobe Acrobat Sign unless the state parameter is set to "Ready".

Parameters:

Name

Type

Status

Description

state

String

Optional

The state of the agreement.

Returns:

Type

Description

String

The sys_id of the saved agreement record, or null.

Example:

// Create an agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.createAgreement('My Agreement');

adobe.addSigner('abel.tuter@example.com');

adobe.saveAgreement();

#setAgreementRecord(String|GlideRecord agreement)

Sets the agreement context to the given record.

Parameters:

Name

Type

Status

Description

agreement

GlideRecord|String

Required

The Agreement record.

Returns: 

Type

Description

void

Method does not return a value.

Example:

// Work on an agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.setAgreementRecord(agreement);

#setSubject(GlideRecord subject

Set the subject record of the agreement.

Parameters:

Name

Type

Status

Description

subject

GlideRecord

Required

The subject record.

Returns:

Type

Description

void

Method does not return a value.

Example:

// Get a subject record
var subject = new GlideRecord('...')

// Update the subject of an agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.setAgreementRecord(agreement);
adobe.setSubject(subject);
adobe.saveAgreement();

#submitAgreement()

Save the current agreement and submit it to Adobe Acrobat Sign by setting the state to "Ready".

Returns:

Type

Description

String

The sys_id of the saved agreement record, or null.

Example:

// Submit an agreement

var adobe = new x_adosy_as.AdobeSign();

adobe.setAgreementRecord(agreement);
adobe.submitAgreement();

.canSend()

Determines whether the current user can use the 'Sign with Adobe Acrobat' UI Action. Sending is allowed when the instance is not FedRAMP or if the current user has the Sender role.

Returns:

Type

Description

Boolean

True if the user can send.

Example:

// Check if the current user can send for signature

if(AdobeSign.canSend()) {

  gs.addInfoMessage('This user can use the sign process.');

} else {

  gs.addErrorMessage('This user does not have permission to use the sign process.');

}

.getAgreements(String subject_table, String subject_id)

Get a GlideRecord instance of agreements relating to the subject.

Parameters:

Name

Type

Status

Description

subject_table

String|GlideRecord

Required

The subject table name or the subject record itself.

subject_id

String

Optional

The sys_id of the subject when also passing the table name.

Returns:

Type

Description

GlideRecord

A GlideRecord instance of agreements relating to the subject.

Example:

// Get agreements using the table name and sys_id

var agreement = x_adosy_as.AdobeSign.getAgreements('sc_req_item', '<sys_id>');

while (agreement.next()) {

  gs.addInfoMessage(agreement.getDisplayValue());

}

// Get agreements using a GlideRecord

var req_item = new GlideRecord('sc_req_item');

req_item.get('<sys_id>');

var agreement = x_adosy_as.AdobeSign.getAgreements(req_item);

while (agreement.next()) {

  gs.addInfoMessage(agreement.getDisplayValue());

}

.getMyAgreements(String query)

Get a GlideRecord instance of agreements belonging to the user. This method relies on the property x_adosy_as.my_agreements_query for the initial query. Additional query filters can be added with the query parameter.

Parameters:

Name

Type

Status

Description

query

String

Optional

Optional encoded query to further restrict the agreement list.

         

Returns:

Type

Description

GlideRecord

Agreements belonging to the user.

Example:

// Get agreements that are complete for the current user
var query = 'state=Complete^ORDERBYsys_created_on';

var agreement = x_adosy_as.AdobeSign.getMyAgreements(query);

while (agreement.next()) {

  gs.addInfoMessage(agreement.getDisplayValue());

}

.isFedRamp()

Determine whether the system is connected to Adobe FedRAMP (Government Cloud).

Returns:

Type

Description

Boolean

True if the x_adosy_as.fedramp property is set to "true".

Example:

// Check if we are using a FedRAMP connection

if(x_adosy_as.AdobeSign.isFedRamp()) {

  gs.addInfoMessage('Acrobat Sign is using a government cloud connection.');

} else {

  gs.addErrorMessage('Acrobat Sign is not using a government cloud connection.');

}

 Adobe

更快、更輕鬆地獲得協助

新的使用者?