Show: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SignButlerClientApi
Signature
global with sharing class SignButlerClientApi
SignButlerClientApi Properties
SignButlerClientApi Methods
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
createAndLaunchSignRequest(srCl)
Create and launch a SIGN Request. Mostly used for Embedded Signing use-cases. The return will be the URL to sign
Signature
global static String createAndLaunchSignRequest(SignRequestCLVo srCl)
Parameters
SignRequestCLVo
Plain Old Apex Object to store the data required to create the SIGN Request
Returns
URL to open for Signing
Example
createAndLaunchSignRequestAsync(templateId, recordId, wrapper)
Create and launch a SIGN Request Asynchronously. This works in the same way as the Actionable_SignButlerSilent t that can be called from PDF Butler configuration.
Signature
global static void createAndLaunchSignRequestAsync(Id templateId, Id recordId, cadmus_core.DocGenerationWrapper wrapper)
Parameters
templateId
Type:
Id
SFDC Id of the SIGN Request Template to use
recordId
Type:
Id
SFDC Id of the record to link the SIGN Request to eg Opportunity, Quote, Contract, ...
wrapper
Type:
cadmus_core.DocGenerationWrapper
PDF Butler generation wrapper. This can come from a PDF Butler call to generate the document or you can put it together yourself with your own documents
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
getFirstSignUrl(signRequestId, reason)
Get Sign Url of the next signer. So the first next signer
Signature
@AuraEnabled
global static String getFirstSignUrl(String signRequestId, String reason)
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(lsrVo)
prepare sign request
Signature
global void launchSignRequest(LaunchSignRequestVo lsrVo)
Parameters
lsrVo
Type:
LaunchSignRequestVo
LaunchSignRequestVo Object that accept signRequestId, contentDocuments, stakeholders, recordId, sendEmail, redirectUrl
Returns
Nothing
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(lsrVo)
prepare sign request
Signature
@AuraEnabled
global static void launchSignRequestStatic(LaunchSignRequestVo lsrVo)
Parameters
lsrVo
Type:
LaunchSignRequestVo
LaunchSignRequestVo Object that accept signRequestId, contentDocuments, stakeholders, recordId, sendEmail, redirectUrl
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
prepareSignRequest(wrapper, templateId, recordId)
launch sign request
Signature
global Id prepareSignRequest(cadmus_core.DocGenerationWrapper wrapper, String templateId, Id recordId)
Parameters
wrapper
Type:
cadmus_core.DocGenerationWrapper
cadmus_core.DocGenerationWrapper as returned by PDF Butler when generating a document
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
prepareSignRequest(requestData)
prepare sign request
Signature
global Id prepareSignRequest(PrepareSignRequestVo requestData)
Parameters
requestData
Type:
PrepareSignRequestVo
PrepareSignRequestVo Object that accept signRequestTitle, templateId
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)
prepareSignRequestStatic(requestData)
prepare sign request
Signature
@AuraEnabled
global static Id prepareSignRequestStatic(PrepareSignRequestVo requestData)
Parameters
requestData
Type:
PrepareSignRequestVo
PrepareSignRequestVo Object that accept signRequestTitle, templateId
Returns
Id SIGN Request Id
Example
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
sendSms(message, toNumber)
Signature
global static String sendSms(String message, String toNumber)
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
StakeholderVo(id, firstName, lastName, email, mobile, locale)
Signature
global StakeholderVo(String id,String firstName,String lastName,String email, String mobile,String locale)
StakeholderVo(id, firstName, lastName, email, mobile, locale, signingMethods)
Signature
global StakeholderVo(String id,String firstName,String lastName,String email,String mobile,String locale, SignButlerClientApi.SigningMethodsVo signingMethods)
updateBrandingStatic(srId, brandingId)
Update Sign Request Branding
Signature
global static void updateBrandingStatic(Id srId, Id brandingId)
Parameters
srId
Type:
Id
SIGN Request on which you want to change the branding
brandingId
Type:
Id
Id of SIGN Butler Branding record
Returns
nothing
Example
updateExpireDateStatic(srId, expireDate)
Update Sign Request Expiry Date
Signature
global static void updateExpireDateStatic(Id srId, Datetime expireDate)
Parameters
srId
Type:
Id
Sign Request Id
expireDate
Type:
Datetime
new Expire Date of sign request
Returns
nothing
Example
SignButlerClientApi.LaunchChainedSigningInfo
Create the documents and generate a SIGN Request for each record provided
Signature
global with sharing class LaunchChainedSigningInfo
Example
SignButlerClientApi.LaunchChainedSigningInfo Properties
SignButlerClientApi.LaunchSignRequestVo
Signature
global class LaunchSignRequestVo
SignButlerClientApi.LaunchSignRequestVo Properties
SignButlerClientApi.PrepareSignRequestVo
Signature
global class PrepareSignRequestVo
SignButlerClientApi.PrepareSignRequestVo Properties
SignButlerClientApi.PrepareSignRequestVo ConstructorsPrepareSignRequestVo()
Signature
global PrepareSignRequestVo()
PrepareSignRequestVo(signRequestTitle, templateId)
Signature
global PrepareSignRequestVo(String signRequestTitle, String templateId)
SignButlerClientApi.SigningMethodsVo
Signature
global with sharing class SigningMethodsVo
SignButlerClientApi.SigningMethodsVo Properties
SignButlerClientApi.SigningMethodsVo ConstructorsSigningMethodsVo(handwritten, drawn, mailOtp, upload, smsOtp)
Signature
global SigningMethodsVo(Boolean handwritten,Boolean drawn,Boolean mailOtp, Boolean upload, Boolean smsOtp)
SignButlerClientApi.SignRequestCLVo
Signature
global class SignRequestCLVo
SignButlerClientApi.SignRequestCLVo Properties
SignButlerClientApi.StakeholderInfo
Signature
global with sharing class StakeholderInfo
SignButlerClientApi.StakeholderInfo Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||