Skip to main content
Blog
Home/

Send email reminders for your envelopes with the Apex Toolkit

Author Paige Rossi
Paige RossiSr. Programmer Writer
Summary3 min read

See how to send a reminder for envelopes you send via the Apex Toolkit.

    • Additional resources

    Table of contents

    Many of us have been in the situation where we’ve sent an envelope to a recipient for their signature and waited days or even weeks for a response. And most of us have probably also been on the other side of that scenario, where we receive an envelope, think to ourselves, “I’ll sign that later,” and then forget about it. Luckily, Docusign has a reminders feature that addresses this problem. With this feature you can set reminders on an envelope, automatically sending email reminders to recipients at the frequency of your choice. In this blog I’ll demonstrate how to set reminders on envelopes sent through Salesforce with the Apex Toolkit.

    Similar to an SDK, the Apex Toolkit exposes a full set of programmatic objects and methods that you call from your Apex code to access the Docusign eSignature REST API. You can use it to integrate Docusign into your Salesforce workflows and processes.

    To add reminders to your envelope, you will use the Apex Toolkit’s Notifications class. The first step is to create a Notifications object that will define the notification settings for all of the envelope’s recipients. The signature for the Notifications class is as follows:

    global Notifications(final Boolean remind, final Integer remindAfterDays, final Integer remindFrequencyDays, final Boolean expires, final Integer expireAfterDays, final Integer expireWarnDays, final Boolean updateChatter)
    

    The parameters in the signature above are all required when creating a Notifications object. For more detailed descriptions of each parameter, see the Apex Toolkit reference. The Apex snippet below shows how to create an instance of the Notifications class.

    dfsle.Notifications notifyRecipients = new dfsle.Notifications(
                true, // Indicates that reminders are enabled
                2, // Number of days to wait before sending a reminder
                1, // Number of days between reminders
                true, // Whether or not the envelope expires and is voided
                90, // Number of days before the envelope expires
                10, // Number of days before expiration to remind the recipient
                false // Placeholder for deprecated field
    );
    
    

    The above code enables notifications for an envelope and indicates that notifications should be sent after two days with one day between each notification. It also indicates that the envelope will expire in 90 days and that the recipients should be notified 10 days prior to the expiration. The final parameter is set to false to satisfy the deprecated updateChatter field.

    Once you have created your Notifications object, you need to add it to the envelope. To do so, create your Envelope object and use the dfsle.Envelope.withNotifications method to add your Notification to it:

    myEnvelope = myEnvelope.withNotifications(notifySigner);

    Once you’ve done that, you’re ready to send your envelope as usual with the dfsle.EnvelopeService.sendEnvelope method. For more information on how to send an envelope with the Apex Toolkit, see How to send an envelope on the Developer Center.

    Additional resources

    Author Paige Rossi
    Paige RossiSr. Programmer Writer

    Paige has been working for Docusign since 2020. As a Sr. Programmer Writer on the Developer Content team, she writes content and code to help developers learn how to use Docusign APIs.

    More posts from this author

    Related posts

    • Docusign 2024 Release 3: Capture the Critical Business Value Hidden in Your Agreements
      Intelligent Agreement Management

      Docusign 2024 Release 3: Capture the Critical Business Value Hidden in Your Agreements

    • How to improve your app’s UX while users wait for API calls to complete

      How to improve your app’s UX while users wait for API calls to complete

      Author Larry Kluger
      Larry Kluger
    • Trending Topics: Latest from our forums (November 2024)
      Author Paige Rossi
      Paige Rossi
    How to improve your app’s UX while users wait for API calls to complete

    How to improve your app’s UX while users wait for API calls to complete

    Author Larry Kluger
    Larry Kluger
    Trending Topics: Latest from our forums (November 2024)
    Author Paige Rossi
    Paige Rossi

    Discover what's new with Docusign IAM or start with eSignature for free

    Explore Docusign IAMTry eSignature for Free
    Person smiling while presenting