Use case here is e-Signing a pdf. Here I will leverage Adobe Sign, via OIC, of course.
Step 1 - Get Access to Adobe Sign
I am using the 30 day free trial.
Step 2 - Get Adobe Client ID/Secret
As you can see, I require these values from Adobe. I login to Adobe Sign and go to Profile -
API Applications -> Let's create one...
I enter the OIC Redirect URI.
The next section covers scopes - I select the following -
Click on View to see Client ID and Secret -
All I need now is the Subdomain value - in my case, secure.eu2.
I enter the following in the Scope field - user_login:account agreement_read:account agreement_write:account agreement_send:account library_read:account
I click Provide Consent and then am prompted to login to AdobeSign. This I do -
I return to the OIC connection definition and click Test -
Step 3 - Upload Document / Send for Signing
The AdobeSign api works as follows -
1. Invoke the doc upload api and receive back a transientDocumentId.
2. Invoke the send for signing api - passing the transientDocumentId and the email address of the signer.
Simple enough - here's my doc -
I upload this to a folder on the OIC File Server.
I will download and read this in the OIC integration, then upload the doc to AbobeSign.
Here is that part of the integration -
Nothing wild or wonderful so far. The ReadFile is configured for the following content format -
Now to invoking AdobeSign - first invoke - upload document. The invoke is configured as follows -
The Map is configured as follows -
MimeType set to "application/pdf".
Next step is to invoke the Send Agreement for Signature operation -
Map configured as follows - firstly, the payload from a test I did in Postman -
Note authoringRequested = false. If this is set to true, an agreement will be created, but the signer will not receive an email. i.e. the agreement will be in Authoring status. I am pointing this out, because there may be use cases where this is what's wanted. Big thanks to my colleague Naveen N. for pointing this out to me.
Here's a screenshot of the mapping target - I don't go into great detail, but just fill in the fields shown in the JSON request screenshot.
Probably a good idea to use an OIC Lookup, instead of hardcoding the static values.
The final step is to query the Agreement status and return this in the OIC integration response.
The key is the agreementId returned by Send Agreement for Signature.
Invoke GetAgreementStatus configuration -
Map configuration -
Ok, let's test -
I check my email -
Finally, I tested many times with Authoring set to true. No email was sent out to the signer and the agreements simply stay in Draft mode until they get "authored".
Part II will cover checking document status in AdobeSign.
This is generally what customers want - think of the following simple HCM scenario -
An employment contract is uploaded to AdobeSign and the signer(s) are informed. HCM needs to be updated, once that document has been signed.
So here we will have 2 OIC integrations - 1. upload and send for signing. 2. Do whatever one needs to do in HCM, once the employment contract has been signed by all signers.
Post a Comment