- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 07-13-2025 11:32 PM - edited a week ago
Required Plugins:
-
Document Template Integration with DocuSign
-
Document Template
-
Human Resources Scoped App: Core
Configuration Steps for DocuSign Spoke
-
Create a DocuSign Developer Account
-
In the Admin tab, navigate to ‘Connect’.
-
Create a new ‘Custom’ configuration.
-
Fill in the following details:
a. Name: Enter your instance name or any preferred identifier.
b. URL to Publish:https://{instance_name}.service-now.com/api/sn_docusign_spoke/docusign_webhook
c. Event Settings:
- Data Format: Legacy
- Event Message Delivery Mode: Aggregate
- Trigger Events: Envelope Sent, Envelope Delivered, Envelope Signed/Completed, Envelope Declined, Envelope Voided
d. Integration and Security Settings:
- Select Include Basic Authentication Header and provide the ‘admin’ username and password. -
Click on Apps and Keys:
a. Under Authentication, add the Secret Key and save it for later use.
b. Additional Settings:
- Redirect URIs:https://{instance_name}.service-now.com/oauth_redirect.do
c. Save the configuration.
Configuration Steps in the ServiceNow Instance
-
Download the setup folder.
-
Import all XML files provided in the setup.
-
Open the script in the Background Scripts module.
-
Update the specified values in the script, then run it.
-
Assign the ‘sn_docusign_spoke.docusign_admin’ role to the ‘admin’ user.
-
Navigate to
/oauth_2_0_credentials_list
, open the DocuSignCreds entry, and click Get OAuth Token. -
Go to
/sn_docusign_spoke_accounts_list
and click Get Accounts. (Refresh the page you should be able to see a record).
Testing the Flow
-
Create an HR case with the HR Service ‘Verification of Employment’.
-
Remove the Document Template category and select the DocuSignHTML template that was imported.
-
Ensure that the ‘Opened For’ user has a valid email address linked to the HR case.
-
Change the case state to Work in Progress.
-
Preview the document and initiate the Document Task.
-
You should see a Document Task created.
-
Open the document, sign it, and after a few seconds, the Document Task should automatically close
Let me know if you face any issue.If the blog helped, please give it a like.
Note:
If you are using Rest in Event setting then please include Recipients from Include Data as shown below.
- 848 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@deepakverma12Thanks for sharing the article , it was really helpful but we are struck at one point
We cannot use Basic Authentication and DocuSign Team have also suggested to use OAuth.
So, can you please suggest the steps for the same.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I never used OAuth but I have tried below steps and it is working fine.
Here’s the article I followed for this(Giga Guru comment's) : article
Steps:
- Enable Client Credentials grant: In System Properties (sys_properties.list), create/update:
Name: glide.oauth.inbound.client.credential.grant_type.enabled Type: true|false Value: true
-
Create the Application Registry:
-
Navigate to System OAuth > Application Registry in ServiceNow.
-
Click New and select Create an OAuth API endpoint for external clients.
-
Fill out the name field only and save the form.
-
After saving, the system will automatically generate and populate the Client Secret.
-
-
Update OAuth Entity Configuration:
-
Go to System Definition > Scripts - Background.
-
Run the following script (update the
sys_id
anduser
values):var gr = new GlideRecord("oauth_entity"); gr.get("07be8b30477ae250e4f15cf0516d4392"); // Replace with your actual sys_id of above record gr.setValue("default_grant_type", "client_credentials"); gr.setValue("user", "6816f79cc0a8016401c5a33be04be441"); // Replace with the appropriate user sys_id(i have taken admin user's sys_id) gr.update();
-
-
Configure OAuth Settings in DocuSign:
-
In your DocuSign account, go to the OAuth 2.0 settings under Connect.
-
Enter the following:
-
Client ID: Use the Client ID generated in ServiceNow.
-
Client Secret: Use the Client Secret from ServiceNow.
-
Authorization Server URL:
https://<your-instance-name>.service-now.com/oauth_token.do
-
-
- Now select oauth instead of basic in Integration and Security Settings.
This approach appears to work, though I’m not certain it’s the most best and recommended solution. Please test it thoroughly.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@deepakverma12 we tried creating a OAuth profile and it worked but on the DocuSign end while sending the request they have an option to send the data either in both JSON or XML but when they are sending it via JSON Status comes as completed but via XML it shows Status as Completed ( ServiceNow is expecting this status) is there a way whatever status they sent whether Completed or completed ServiceNow should accept it?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@deepakverma12 we tried creating a OAuth profile and it worked but on the DocuSign end while sending the request they have an option to send the data in both JSON and XML but when they are sending it via JSON Status comes as completed but via XML it shows Status as Completed ( ServiceNow is expecting this status) is there a way whatever status they sent whether Completed or completed ServiceNow should accept it?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@sm001086602 Could you please confirm which version of the 'Document Templates Integration with Docusign' app you are currently using? V1.6.4 version has handled this case sensitivity. Can you name the subflow where it stuck? Are you using Rest api instead of legacy?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@deepakverma12 please find the details in the screenshot attached
Subflow Name - DT Manage Task for Docusign
In the 8th step it is expecting the status as Completed
but via XML it comes as Completed but via JSON it is coming as completed
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@sm001086602 what is the version of app are you using, and are you working with the REST API? Use 1.6.4 version if you are on lower version.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@deepakverma12 we are using the latest version - 1.6.3
and we are using REST API in DocuSign
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@sm001086602 Please use version 1.6.4, as it contains the fix. Please let me know if it fix.