Powerforms submit - getting Docusign Envelope ID - salesforce

We are incorporating Powerforms into a Salesforce Community. When a user completes a Powerform, we need to execute a trigger to write back to Salesforce.
My questions are related to attaching the completed Docusign envelope to the related Salesforce record:
1) When we redirect from Powerforms, will we get the Docusign envelope ID?
2) If so, can we insert a Docusign envelope record in Salesforce with that ID with the standard AppExchange package to tie the envelope to the record in Salesforce from which the Powerform was initiated?
Any thoughts would be much appreciated.
Thanks,
Mike

If you're logged into DocuSign: Go To Admin>> Signing Settings>> In-Session Landing Pages
In-Session Landing Pages is used by Powerform to redirect the signer to the URL where you want Signer to redirects to. When Signer gets redirected then DocuSign populates URL like below:
{RedirectUrl}/?env={envelopeId}&pf={powerformId}&r={recipientId}
Alternatively and also recommended is to use DocuSign Connect, where you subscribe for the event like Envelope Completed or Recipient Signed etc, once event occurs then DocuSign will push an XML message to your configured listener with the envelope related details. This is a better approach because with redirect there is a risk of the customer closing the browser or browser getting crashed before browser hits your app URL.

Related

IdentityServer4: How to set a role for Google user?

I have 3 applications:
An IdentityServer4 API which provides Google authentication and also provides an access token to authorize the resource API.
A simple Resource API which provides some data from DB.
A simple Client in React which have 4 buttons:
Login, for Google auth
Logout
Get data - a simple request with the access token to the Resource API and gets the data from Db
Get user data - returns user profile and token (for debug purpose)
I didn't put any sample code because my problem is not code related, it's knowledge that I'm missing and I ask for guidance.
The workflow is working just fine: the user press the Login button, it is redirected to IdentityServer4 API for Google Auth. From there it is redirected to a Callback Page from the Client and from there to the Index page. I receive the user data and the token, I can request data from the Resource API and it's working.
My problem is: How do I give a Role to the Google Users ?
I don't have users saved in DB. I want three types of Users: SuperAdmin, Admin, Viewer and each of these roles have limited Endpoints which can access.
For limiting their access I saw that I can use Claims-based authorization or Role-based authorization.
So, my question is how ca I give a Google User who wants to login in my app, a specific Claim/Role ? What is the workflow ? I must save it first in DB ? Or there exists a service from Google where I can add an email address and select a Role for that address ?
Thank you very much !
After you get the response from Google in your callback you can handle the user and do what ever you want to do with it. Below are the some typical tasks that you can do in callback that I took from documentation page of identityserver4 link:
Handling the callback and signing in the user
On the callback page your typical tasks are:
inspect the identity returned by the external provider.
make a decision how you want to deal with that user. This might be
different based on the fact if this is a new user or a returning
user.
new users might need additional steps and UI before they are allowed
in.
probably create a new internal user account that is linked to the
external provider.
store the external claims that you want to keep.
delete the temporary cookie
sign-in the user
What I would do is creating an new internal user account that is linked to the external provider and add a role to that user.
If you don't want to save users in db, you can add an extra claim to user in callback method and use that claim in token. and i think this link will help with that.

Docusign eSignature - This User lacks sufficient permissions

I am trying to setup the Docusign eSignature i nSFDC, through the Docusign APP Launcher and I am getting this error message whenever trying to create an Envelope template : "You are not authorized to access the envelope."
With the following API status in my Docusign API dashboard : ERROR: This User lacks sufficient permissions. :: Setting: userOverrideEnabled.
[.
Does anyone know what could be reason ?
Few more details :
I've seen in a post from Docusign that the error could come from having "Allow sender to download form data" unchecked. But it did not change anything in my case.
I'm admin in SFDC, in the Docusign App launcher in SFDC & the user who activated the integration. My email address is not registered as an Admin user in Docusign (im logging as some one else who is the admin in Docusign)
Best,
Lucas
To fix this issue your user has to be admin in DocuSign also.

Consent Form with DocuSign for Salesforce without Sending Email

We have a scenario where a user needs to click on a link and a Consent Form in a .pdf format will open. Once the document is opened, the user will be able to sign the form using DocuSign. Upon clicking [Finished] button, the signed form will be uploaded in the system. Is this possible with DocuSign?
P/S: We are not looking into sending to email nor In Person Signing.
Yes, you can use DocuSign embedded Signing, which does not send any email nor is In-Person signing. You can check embedded Signing here, https://docs.docusign.com/esign/guide/usage/embedded_signing.html
Also you can use API (using Polling - Not recommended) or DS Connect to get alert when Signer has completed the signing ceremony, once you know that signer has completed the signing ceremony then you can pull the signed form to your system.

Create Docusign documents and send emails from another system

I am trying to integrate Salesforce and Docusign. I'd like to send Create documents through a soap / rest call, and surpress the notification to the recipient. From Salesforce I'd like to send out the link to the envelope / documents through a branded email.
Is that possible? It seems like DS only supports a createAndSend call.
This documentation says I can create an envelope in draft form - https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/create/ . It also says I get an envelope summary as a response.
https://docs.docusign.com/esign/restapi/Envelopes/Envelopes/create/#/definitions/envelopeSummary
As others have noted, Embedded Signing is the answer here. I've just done this with a client.
You would build the envelope with the SOAP API (good receipies from DocuSign on how to do this with APEX here: https://www.docusign.com/developer-center/recipes/docusign-for-salesforce).
When you define the Recipient, you would provide the ClientUserId in a CaptiveInfo object (use the ContactId for this). This tells DocuSign to skip sending the recipient an email, and you will handle this yourself.
Create and send the envelope (you can use templates as well).
You will need a portal or public Force.com site to move forward. The reason being that the URL for signing is a one-time-use link, and it expires 5 mins after it's generated. So you can't store it or send it in an email. By the time they click the link it will be dead.
So instead, you link to a Visualforce page you control. Add the ContactId to the URL as a parameter, so you know who is looking at the page.
When they load the page, you should have the Visualforce controller lookup the EnvelopeId (so if the page is about an Opportunity, you should store the EnvelopeId on the Opp or somewhere handy) and the recipient (use the ContactId to get the info about the recipient).
You then send this to DocuSign with the RequestRecipientToken method. It will return the token URL, and you can present it to the user.

DocuSign Rest API login issue

I get JSON response {"errorCode": "USER_DOES_NOT_BELONG_TO_SPECIFIED_ACCOUNT", "message": "The specified User is not a member of the specified Account."} when we deployed application on a new SF sandbox with a different DocuSign account. Obviously I have changed the user/password and integration key for the new account. And after I make token request I get access token back, but I can not make post request due to above.
Can you guys help me understand why is this?
Users who want to send documents need a DocuSign account. It sounds like you've changed the username and password credentials however it is still pointing to the previous account hence the error. To resolve you need to update the integration to point to the new account.

Resources