CreateAndSendEnvelope
Create and sends an envelope or creates a draft envelope.
Table Specific Information
Execute
Create the envelope.
The required columns to run the stored procedure are EmailSubject, DocumentId, FileLocation or Content. The possible additional columns required while pasing single signers include SignersRecipientId and incase of CarbonCopies, the additional columns will be CcEmail and CcRecipientId.
EXECUTE CreateAndSendEnvelope EmailSubject = 'Please sign this document', FileName = 'sample', DocumentId = '1', CcEmail = '[email protected]', SignersRecipientId = '1', CcRecipientId = '2', FileLocation = 'C:/Users/cdata/Downloads/sample.pdf'
If you are using Document other than PDF. Then DocumentFileExtension is mandatory.
EXECUTE CreateAndSendEnvelope EmailSubject = 'Please sign this document', FileName = 'sample', DocumentId = '1', DocumentFileExtension = 'docx', CcEmail = '[email protected]', SignersRecipientId = '1', CcRecipientId = '2', Content = InputStream
Create the envelope with customfields. The possible columns for customfields are CustomFieldName, CustomFieldId, CustomFieldShow, CustomFieldRequired, CustomFieldValue, CustomFieldConfigurationType, CustomFieldType and CustomFieldListItems.
INSERT INTO CreateAndSendEnvelope#TEMP (CustomFieldtest, CustomFieldValue, CustomFieldId, CustomFieldType) VALUES ('vk', 'test', 1, TextCustomFields) EXECUTE CreateAndSendEnvelope EmailSubject = 'Please sign this document', FileName = 'sample', DocumentId = 1, CCEmail = '[email protected]', SignersRecipientId = 2, CcRecipientId = 1, FileLocation = 'C:/Users/cdata/Downloads/sample.pdf', CustomFieldAggregate = 'CreateAndSendEnvelope#TEMP'
INSERT INTO CreateAndSendEnvelope#TEMP (CustomFieldName, CustomFieldValue, CustomFieldId, CustomFieldType) VALUES ('test2', 'test_custom',480730, TextCustomFields) INSERT INTO CreateAndSendEnvelope#TEMP (CustomFieldName, CustomFieldValue, CustomFieldId, CustomFieldType) VALUES ('test21', 'test_custom1',480731, ListCustomFields) EXEC CreateandSendEnvelope EmailSubject=?,CustomFieldAggregate=?","test,CreateAndSendEnvelope#TEMP
The second way of using the Stored Procedure is by adding the aggregate itself:
EXEC CreateandSendEnvelope EmailSubject=?,DocumentId=?,FileLocation='D:\\\\Raj Shekhar Gupta\\\\testing.pdf',FileName=?,CustomFieldAggregate='{\"listCustomFields\": [{\"name\": \"Customfieldstest1\",\"show\": \"true\",\"required\": \"true\",\"value\": \"anirudhtest\"}]}'","Please sign this document on priority,122,testing123"
Create the envelope with multiple values of Signers, CarbonCopies and Documents by adding the aggregate itself for SignersAggregate, CarbonCopiesAggregate and DocumentsAggregate. In case
EXEC CreateandSendEnvelope EmailSubject=?,DocumentId=?,FileLocation='D:\\\\Raj Shekhar Gupta\\\\testing.pdf',FileName=?,CarbonCopiesAggregate='[{\"email\": \"[email protected]\",\"name\": \"anirudhk\"}]',CustomFieldAggregate='{\"listCustomFields\": [{\"name\": \"Customfieldstest1\",\"show\": \"true\",\"required\": \"true\",\"value\": \"anirudhtest\"}]}',SignersAggregate='[{\"email\": \"[email protected]\",\"name\": \"raj\",\"recipientId\": \"84570874\",\"tabs\": {\"signHereTabs\": [{\"anchorYOffset\": \"10\",\"anchorString\":\"signature_1\",\"anchorUnits\": \"pixels\",\"anchorXOffset\": \"20\"}]}}]'","Please sign this document on priority,122,testing123
Create the envelope with multiple values of Documents by adding the aggregate itself for DocumentsAggregate and providing the base64encoded value for the document.
EXEC CreateandSendEnvelope EmailSubject='Please reply',CarbonCopiesAggregate='[{\"email\": \"[email protected]\",\"recipientId\": \"7\",\"name\": \"anirudhk\"}]',DocumentsAggregate='[{\"documentBase64\": \"encoded\",\"name\": \"testing\",\"documentId\": \"122\"},{\"documentBase64\": \"encoded\",\"documentId\": \"124\",\"name\":\"anirudh\"}]';Note: While using this Stored Procedure, Please avoid giving DOCX suffix for docx file, PDF suffix from pdf file and HTML Suffix from html file in FileName input (If you are not providing an extension in FileName). The source throws an error if these suffix are included in filename.
Input
Name | Type | Required | Accepts Input Streams | Description |
Status | String | False | False | Set the status as sent to send the envelope to recipients. Or Set the status as created to save the envelope as a draft. By default it will be created
使用できる値は次のとおりです。sent, created |
EmailSubject | String | True | False | The subject of the email used to send the envelope |
DocumentId | String | False | False | Id for the document |
DocumentFileExtension | String | False | False | FileExtension of the document. Use this input if the file is not PDF.
使用できる値は次のとおりです。docx, pdf, html |
FileLocation | String | False | False | File location. For example: C:\File.pdf |
Content | String | False | True | The content as InputStream to be uploading when LocalFilePath is not specified. |
FileName | String | False | False | Document name. This is required when content is not null. |
SignersEmail | String | False | False | Email id of the documents signers |
SignersRoutingOrder | String | False | False | Routing order of signers |
SignersRecipientId | String | False | False | Signers reciepent id |
SignersName | String | False | False | Name of the document signers |
CcEmail | String | False | False | Email id of the Cc recipients |
CcName | String | False | False | Name of the Cc recipients |
CcRecipientId | String | False | False | Cc Recipent id |
CcRoutingOrder | String | False | False | Cc Routing order |
CustomFieldAggregate | String | False | False | CustomfieldAggregate.The possible columns are CustomFieldName, CustomFieldId, CustomFieldShow, CustomFieldRequired, CustomFieldValue, CustomFieldConfiguration, CustomFieldListItems |
CarbonCopiesAggregate | String | False | False | CarbonCopiesAggregate. |
SignersAggregate | String | False | False | SignersAggregate. |
DocumentsAggregate | String | False | False | DocumentsAggregate. |
Result Set Columns
Name | Type | Description |
Success | String | Determines whether the operation is successful or not |