Pandadoc integration with e-signature in CPQ

Pandadoc integration with e-signature in CPQ

PandaDoc configuration

ADL Configuration

Code snippet

    <prop key="cpq-signing-enabled">1</prop>

<prop key="pandadoc-prefix">pandadoc-</prop>

<prop key="pandadoc-base-url">https://api.pandadoc.com</prop>
    <prop key="pandadoc-oauth-version">2.0</prop>
    <prop key="pandadoc-oauth-clientid">AABBCC</prop>
    <prop key="pandadoc-oauth-clientsecret">DDEEFF</prop>
    <prop key="pandadoc-oauth-scope">read write</prop>
    <prop key="pandadoc-oauth-authurl">https://app.pandadoc.com/oauth2/authorize</prop>
    <prop key="pandadoc-oauth-accesstokenurl">https://api.pandadoc.com/oauth2/access_token</prop>
    <prop key="pandadoc-oauth-redirecturi">https://apps.mobileforcesoftware.com/mobileforce/oauth_redirect</prop>
    <prop key="pandadoc-oauth-accessmethod">header</prop>
    <prop key="pandadoc-oauth-clientauthmethod">requestparams</prop>

<prop key="pandadoc-auth-type">oauth2</prop>
    <prop key="pandadoc-api-key">PAPIKEY</prop>
    <prop key="pandadoc-wait-seconds-for-draft-status">10</prop>
    <prop key="pandadoc-status-check-internal-seconds">2</prop>

HTML, XML

Document Template Setup

For PandaDoc you need to set up two JSON configurations in the document template screen. The JSON can have CPQ specific template string "${}"

PandaDoc setup

PandaDoc supports two types of authentication:

Authentication

Webhook setup

Enter the webhook URL as https://apps.mobileforcesoftware.com/cpq/public/client/service/pandaDocWebhook.php (see screenshot). Please make sure you have selected the metadata checkbox.

PandaDoc Document JSON

Below is the sample Document JSON

Code snippet

{
    "name": "Sample Document from PDF with Field Tags",
    "recipients": [
        {
            "email": "name@email.com",
            "first_name": "Name",
            "last_name": "LastName",
            "role": "user"
        }
    ],
    "fields": {
        "name": {
            "value": "Jane",
            "role": "user"
        },
        "like": {
            "value": true,
            "role": "user"
        }
    },
    "parse_form_fields": false
}

PandaDoc Send Email JSON

Below is the sample Send Email JSON

Code snippet

{
    "message": "Hello! This document was sent from the PandaDoc API.",
    "silent": true
}

PandaDoc Document Tag

PandaDoc follows inline special text (for e.g. '{signature:user_____}' ) for specifying tags for signing. For more info click here

Code snippet

Hello, {text:user:name} Please,​ ​fill​ ​this​ ​form:

Home​ ​address: {textfield:user________________} Date​ ​of​ ​Birth: {date:user__}

Do​ ​you​ ​like​ ​using​ ​APIs? {checkbox*:user:like}

Signature: {signature:user_______} Initials: {initials:user}

PandaDoc Demo App

For testing, ask PandaDoc or your Mobileforce customer success team for a test account

Code snippet

account: someaccount
app: someapp
login: user@email.com
password: pwd

On-boarding New Customer

  1. First, the customer has to set up OAuth Application - https://developers.pandadoc.com/reference/authentication-process
  2. Update the ADL prop with OAuth Info
  3. Update CPQ -> Document Template -> Signature with the right info
  4. Update the “PandaDoc Document JSON” (contains information about whom to send email)
  5. Update the “PandaDoc Send Email JSON” (contains information about email subject/body)
  6. Update the uploaded document template as per the “PandaDoc Document Tag” section.