Skip to main content
  • I want to write Apex to do exactly what the docusign "custom button" does. Is this possible and does anyone have experience with this or know someone who does?

CURRENT PROCESS

  • When you create an Envelope Template in the DSFS app, it auto-generates a "custom button" that you can add to the target object's page layout. This allows a user to click this button when viewing a record detail page, which will then trigger the envelope to be created and document(s) sent for signatures based on however you configured the Template. All the button does is execute the Template settings you configured.
    • This is standard, OOTB functionality.

DESIRED FUTURE STATE PROCESS

  • I want to replicate the exact same OOTB functionality as the docusign "custom button", EXCEPT that I want it to be triggered AUTOMATICALLY when a record update action occurs. Meaning, instead of a user having to click the button to start the docusign process, I want the button to be "clicked" automatically whenever certain record update criteria are met.

MY "working draft" SOLUTION

  • After-save record-triggered flow with an Apex Action element.
    • SOURCE 1 - How to send an envelope from a Salesforce flow
    • SOURCE 2  - Sending with merge fields using the Apex Toolkit
    • The record ID, merge field values, and other required information would pass through to the envelope from the record-triggered flow, and then everything else should happen just like it is configured in the Template.

WHY

  • Because we have an application process where dozens of "agreement" pdf contracts are sent out for e-signatures every week when the are placed in status "application accepted". Right now, someone on our team has to check each day for any Applications in the "application accepted" status, then open each one, and click the "send for signatures" button on the record detail page. 
  1. The Template is set to "send now" so there's absolutely no reason for a human user to need to be involved.
  2. If the human user is OOO or just overly busy, the sending of the agreement contracts can be delayed.
  3. The volume of agreement contracts having to be sent out every week is large enough that this takes a decent amount of the human user's time. 

#Apex #Docusign #DocuSign For Salesforce #Flow

4 件の回答
  1. 2024年9月22日 14:25

    @Andrew Ermon, were you able to generate Apex code for your requirement?

0/9000