Show: | ||||||||||||||||||
SignButlerClientApi
Signature
global with sharing class SignButlerClientApi
SignButlerClientApi Methods
addPlaceholderAndLaunchSignRequest(req)
add placeholder to pdf and launch the sing request
Signature
global void addPlaceholderAndLaunchSignRequest(RrLaunchSignRequest.LaunchSignRequestVo req)
Parameters
req
Type:
RrLaunchSignRequest.LaunchSignRequestVo
is the LaunchSignRequestVo Object the nee to populate. For Detail See Example.
Returns
nothing
Example
addPlaceholderAndLaunchSignRequestStatic(req)
add placeholder to pdf and launch the sing request
Signature
@AuraEnabled
global static void addPlaceholderAndLaunchSignRequestStatic(RrLaunchSignRequest.LaunchSignRequestVo req)
Parameters
req
Type:
RrLaunchSignRequest.LaunchSignRequestVo
is the LaunchSignRequestVo Object the nee to populate. For Detail See Example.
Returns
nothing
Example
allSignersStatus(signRequestId)
Get All Signers Status
Signature
global List<StakeholderInfo> allSignersStatus(Id signRequestId)
Parameters
signRequestId
Type:
Id
is the Id of the sign request
Returns
List<StakeholderInfo> that containing id, firstName, lastName,email and status.
Example
convert(docConfigId, docConfigIds, objectId, locale, alternative, targetType, pdfActionType, contentDocumentIds, packId)
Convenience method to call PDF Butler and generate a document. Find more info on the params here: https://www.pdfbutler.com/academy.html?q=Call%20PDF%20Butler%20from%20APEX
Signature
global static String convert(Id docConfigId, String docConfigIds, Id objectId, String locale, String alternative, String targetType, String pdfActionType, String contentDocumentIds, Id packId)
Example
deleteSignRequest(recordId)
Delete Sign Request Data
Signature
global void deleteSignRequest(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
deleteSignRequest(recordIds)
Delete Sign Request Data
Signature
global void deleteSignRequest(List<Id> recordIds)
Parameters
recordIds
Type:
List<Id>
is the List<Id> of the sign request
Returns
nothing
Example
deleteSignRequestStatic(recordId)
Signature
@AuraEnabled
global static void deleteSignRequestStatic(Id recordId)
getFirstSignUrl(signRequestId)
Get Sign Url of the next signer. So the first next signer
Signature
@AuraEnabled
global static String getFirstSignUrl(String signRequestId)
Parameters
signRequestId
Type:
String
is the Id of the sign request
Returns
json string => {"url":"https://www.pdfbutler.com/"}
Example
getSignRequestStatus(signRequestId)
Get Sign Request Status
Signature
@AuraEnabled
global static String getSignRequestStatus(String signRequestId)
Parameters
signRequestId
Type:
String
is the Id of the sign request
Returns
json string => {"status":"PENDING"}
Example
launchSignRequest(signRequestId)
launch sign request, after the prepare step, the SIGN Request has to be launched. This has to happen in a seperate transaction then the prepare step
Signature
global void launchSignRequest(Id signRequestId)
Parameters
signRequestId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
launchSignRequestStatic(signRequestId)
Signature
@AuraEnabled
global static void launchSignRequestStatic(Id signRequestId)
notifyNextSigner(recordId)
Notify the next signer
Signature
global void notifyNextSigner(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
notifyNextSignerStatic(recordId)
Signature
@AuraEnabled
global static void notifyNextSignerStatic(Id recordId)
prepareSignRequest(pdfBase64, pdfFileName, templateId, recordId)
launch sign request
Signature
global Id prepareSignRequest(String pdfBase64, String pdfFileName, String templateId, Id recordId)
Parameters
pdfBase64
Type:
String
BASE64 representation of the pdf. This can be the returned BASE64 of PDF Butler or VersionData of a ContentVersion
pdfFileName
Type:
String
name of the pdf file
templateId
Type:
String
is the Id of the sign request template
recordId
Type:
Id
is the Id of the record, eg an Opportunity, a Quote, ...
Returns
Id SIGN Request Id
Example
prepareSignRequestStatic(pdfBase64, pdfFileName, templateId, recordId)
Signature
@AuraEnabled
global static Id prepareSignRequestStatic(String pdfBase64, String pdfFileName, String templateId, Id recordId)
revokeSignRequest(recordId)
Revoke Sign Request
Signature
global void revokeSignRequest(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
revokeSignRequestStatic(recordId)
Revoke Sign Request
Signature
@AuraEnabled
global static void revokeSignRequestStatic(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
setExpired(recordId)
Expired Sign Request
Signature
@AuraEnabled
global static void setExpired(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
setQuietExpired(recordId)
Expired Sign Request but do not send an email to the stakeholders
Signature
@AuraEnabled
global static void setQuietExpired(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
signerStatusById(shId, signRequestId)
Get Signer Status by Stakeholder Id
Signature
global StakeholderInfo signerStatusById(Id shId, Id signRequestId)
Parameters
shId
Type:
Id
is the stakeholder Id
signRequestId
Type:
Id
is the Id of the sign request
Returns
StakeholderInfo that containing id, firstName, lastName,email and status. If you provide the wrong shId, then it will return null
Example
signerStatusByPosition(position, signRequestId)
Get Signer Status by its position
Signature
global StakeholderInfo signerStatusByPosition(Integer position, Id signRequestId)
Parameters
position
Type:
Integer
is signer location that starts from 1. If there are 2 signers in a sign request, its means there are 2 position. 1 and 2.
signRequestId
Type:
Id
is the Id of the sign request
Returns
StakeholderInfo that containing id, firstName, lastName,email and status. If you provide the wrong position, then it will return null
Example
silentRevokeSignRequest(recordId)
Revoke Sign Request but do not send an email to the stakeholders
Signature
@AuraEnabled
global static void silentRevokeSignRequest(Id recordId)
Parameters
recordId
Type:
Id
is the Id of the sign request
Returns
nothing
Example
SignButlerClientApi.StakeholderInfo
Signature
global with sharing class StakeholderInfo
SignButlerClientApi.StakeholderInfo Properties
|
||||||||||||||||||