Skip to content

SunnySydney123/SignDOC_RestAPI_DemoApp

Repository files navigation

SignDOC API Demo Integration

About

This project demonstrates the use of the SignDOC API and its capability to integrate with customer applications (such as BPM or CRM systems) to obtain digital signatures as the final step in any process. This demo uses a dummy Salesforce look alike page to show a quote, which can then be sent to the customer for digital signature.

In this demo, a user launches a fictitious CRM (Salesforce) page, where a quote has been created for a customer. . The next step in the process is to get the quote signed by the customer, and so the user initiates this process.

The demonstration webpage also shows how signed documents can be retrieved using the SignDOC API, enabling the signed contract to be placed into the organization's CRM solution.

Requirements

  • Python: Latest version installed

  • Environment: Ensure Python is added to your system's environment path

  • Dependencies: All required packages listed in requirements.txt

Setup Instructions

1. Download and Setup

Download and place all files into a folder on your local machine.

2. Update Signing Package Values

  1. Navigate to /webpage directory

  2. Edit index.html

  3. Locate the <script> section (around line 589)

  4. Update the values to reflect your demo data:

  • Name

  • Address

  • Email

  • Other relevant information

3. Configure SignDOC Instance and API Keys

Edit the following Python files:

  • retrieve_package.py

  • signdoc_trigger.py

For each file:

  1. Find the BASE_URL variable and update it to your SignDOC instance URL

  2. Find the API_KEY variable and update it with your API key

Running the Demo

Open the Demo Folder in VSCode

First-Time Setup (New Environment)

python  -m  venv  venv

pip  install  -r  requirements.txt

Subsequent Use (Activate Virtual Environment)

On Windows:

venv\Scripts\activate

On macOS/Linux:

source  venv/bin/activate

Start the Flask Server App

python  flask_app_server.py

Navigate to the Demo Webpage

  1. Open http://127.0.0.1:5000/ in your browser

  2. The demo BPM webpage will be displayed

  3. This page simulates a BPM process where the user clicks the "Send to eSignature" button to send the document to the end customer

Demo Workflow

  1. Send for Signature: Click the "Send to eSignature" button on the demo webpage

  2. Complete Signing: Complete the signing process via the email received

  3. Return to Demo: Return to the demo webpage (do not refresh the page)

  4. Retrieve Signed Document:

  • Copy the package ID from the "Send for eSignature" panel

  • Paste it into the package ID field

  • Click the button to retrieve the signed package

  • The signed document will be saved in the Output folder

Important Notes

  • ⚠️ Do not refresh the demo webpage at http://127.0.0.1:5000 after sending for signature

  • 📁 The signed package will be saved in the Output folder of the demo directory

  • 🔑 Ensure your API keys and SignDOC instance URL are correctly configured before running the demo

Project Structure


SignDOC-API-Demo/

├── webpage/

│ └── index.html

├── retrieve_package.py

├── signdoc_trigger.py

├── flask_app_server.py

├── requirements.txt

├── Output/

└── README.md

Support

For questions or issues with this demo, please refer to the SignDOC API documentation or contact your SignDOC representative.

Notes:

In this version, I have added the functionality to preview the quote by calling Power PDF via its command line functionality. added a new route in the flask app, @app.route('/preview_quote', methods=['POST']) and then extended the (script) in the index.html page to handle the Preview Quote button to call the app.route('/preview_quote)

About

Simple application to demonstrate SignDOC REST API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published