[英]How to not automatically send a Docusign Envelope and get the URL Instead using the C# SDK
Currently we are using this method to automatically send the Docusign email to the client. 目前,我们正在使用此方法自动将Docusign电子邮件发送到客户端。
envDef.Status = "sent";
EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
However, we would like to not automatically send the email and instead get the URL to the document that docusign created. 但是,我们不希望自动发送电子邮件,而是获取docusign创建的文档的URL。
Embedded Signing - or the Recipient View workflow - allows users to sign directly through your app or website.
嵌入式签名 - 或收件人视图工作流程 - 允许用户直接通过您的应用或网站进行签名。 When you embed your recipients you are telling the DocuSign platform your app will generate signing URLs, authenticate your recipients, present the signing request, and re-direct once the transaction is complete.
当您嵌入收件人时,您告诉DocuSign平台,您的应用将生成签名URL,验证收件人,提交签名请求,并在交易完成后重新定向。
// set envelope status to "sent" to immediately send the signature request
envDef.Status = "sent";
// |EnvelopesApi| contains methods related to creating and sending Envelopes (aka signature requests)
EnvelopesApi envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
// Create Embedded Signing View (URL)
RecipientViewRequest viewOptions = new RecipientViewRequest()
{
ReturnUrl = "https://www.docusign.com/devcenter",
ClientUserId = "1234", // must match clientUserId set in step #2!
AuthenticationMethod = "email",
UserName = envDef.Recipients.Signers[0].Name,
Email = envDef.Recipients.Signers[0].Email
};
// create the recipient view (aka signing URL)
ViewUrl recipientView = envelopesApi.CreateRecipientView(accountId, envelopeSummary.EnvelopeId, viewOptions);
The Embedded Sending view of an envelope allows users to edit the tabs, documents, recipients, and other settings of draft envelopes before sending them out for approval.
信封的嵌入式发送视图允许用户在发送信封之前编辑选项卡,文档,收件人和草稿信封的其他设置。 Similar to Embedded Signing, your app or website can generate a sending URL and integrate directly into your workflow using a Redirect, Webview, or an iFrame.
与嵌入式签名类似,您的应用或网站可以生成发送URL,并使用重定向,Webview或iFrame直接集成到您的工作流程中。
// must set status to "created" since we cannot open Sender View on an Envelope that has already been sent, only on draft envelopes
envDef.Status = "created";
// |EnvelopesApi| contains methods related to creating and sending Envelopes (aka signature requests)
var envelopesApi = new EnvelopesApi();
EnvelopeSummary envelopeSummary = envelopesApi.CreateEnvelope(accountId, envDef);
//Create Embedded Sending View (URL)
var options = new ReturnUrlRequest();
options.ReturnUrl = "https://www.docusign.com/devcenter";
// generate the embedded sending URL
ViewUrl senderView = envelopesApi.CreateSenderView(accountId, envelopeSummary.EnvelopeId, options);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.