anwaykabir | Posts: 23

Setting up reminder email and its frequency using APEX SDK

0 votes
Hello, We have integrated our salesforce application with onespan using APEX SDK for our signature use cases. We want to know how can we set reminder while we are creating the package using apex sdk. Could you please share the instructions? Thanks Anway Kabir

Approved Answer
Duo_Liang | Posts: 3776

Reply to: Setting up reminder email and its frequency using APEX SDK

0 votes
Hi Anway, To set up a reminder, you'd invoke an extra Rest API/APEX fucntion, because the reminder related information is not included in the package JSON.
HTTP Request
POST /api/packages/{packageId}/reminders

HTTP Headers
Accept: application/json
Content-Type: application/json
Authorization: Basic api_key

Request Payload

{
  "startInDaysDelay": 1,
  "repetitionsCount": 5,
  "intervalInDays": 1,
  "packageId": "{packageId}"
}
It's not an out-of-the box function provided by the APEX SDK, however, I've created the custom function in this code share. You'll also find the instructions from this guide. Duo

Duo_Liang | Posts: 3776

Reply to: Setting up reminder email and its frequency using APEX SDK

0 votes
Anway, You may find the sample code complex, the main reason is the line 305:
		inboundReplacementMap.put('date','date_x');	//added line
Where I added an extra keyword escape for inbound payload, which only affects the GET function when you tried to grab the already-set reminders in a package and doesn't affect the POST(create) and PUT(update) functions. Duo

anwaykabir | Posts: 23

Reply to: Setting up reminder email and its frequency using APEX SDK

0 votes
Thanks Duo for the details. Have one more question on this, if customer signs the document back before first reminder is sent out, do we have to explicitly call clearReminderScheduleForPackage process to clear the existing reminders or do they get cleared automatically? Thanks Anway Kabir

anwaykabir | Posts: 23

Reply to: Setting up reminder email and its frequency using APEX SDK

0 votes

Hello Duo, do you have any update on this request?

Thanks!


Duo_Liang | Posts: 3776

Reply to: Setting up reminder email and its frequency using APEX SDK

0 votes

Hi Anway,

 

Sorry for the late response, after migration, I stop receiving emails that reminds me of new replies.

 

For your question, the reminder email will only sent to recipients who hasn't completed signing, therefore you don't need to explicitly remove the schedules.

(Similarly, if you draft an ongoing package and resent again, signers who has completed signing won't receive the invitation email again.)

 

Duo


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off