
Check out BoldSign at the Singapore Business Show, booth 716, on August 30 - 31! Learn More
Check out BoldSign at the Singapore Business Show, booth 716, on August 30 - 31! Learn More
Electronic signatures have revolutionized the document signing procedure in a variety of industries, including insurance. Insurance companies are increasingly adopting eSignatures to streamline their operations, improve efficiency, and enhance client satisfaction. With BoldSign APIs, you can seamlessly integrate the complete eSigning process into your insurance claim application, eliminating the need for users to switch to third-party platforms. In this blog post, we will guide you through the step-by-step procedure of integrating eSignatures into your application, using the example of Cubeflakes, a fictional insurance company.
In our scenario, we need to create a brand for our insurance company, Cubeflakes, which involves setting a name, logo, and colors.
A new brand can be created using BoldSign APIs or using the BoldSign web application. The following screenshot shows the brand creation page in the BoldSign web application.
Once the brand has been created, copy the brand’s ID for further use.
In our demo, we are creating a template for an insurance claim form. A new template can be created using BoldSign APIs or the BoldSign web application.
The following screenshot shows the page for creating a template in BoldSign.
When creating the template, we must select a brand, in this case Cubeflakes. To create a template with the BoldSign API, we must provide the brand ID that was generated in the previous part.
We’ll include the following fields in the template’s configure fields section:
All the values of the attachment, checkbox, and signature fields should be collected during the signing procedure, so they should be required fields. and each form fields should have an ID in the template, all other form fields expect required fields will be filled automatically by user input once the form has been submitted in insurance claim demo application.
We are now ready to create a demo application. For our demo, we will be creating an ASP.NET Core MVC application and incorporating the BoldSign services into it. However, you can choose your preferred programming language and framework.
dotnet new webapp --framework "net6.0" -o InsuranceClaimApp
dotnet add package BoldSign.Api
public void ConfigureServices(IServiceCollection services)
{
var apiClient = new ApiClient("https://api.boldsign.com", ***Your API Key here***");
services.AddSingleton(apiClient);
services.AddSingleton(new DocumentClient(apiClient));
services.AddSingleton(new TemplateClient(apiClient));
services.AddSingleton(new BrandingClient(apiClient));
services.AddControllersWithViews();
}
Create an application layout for gathering user information so that the insurance claim may be processed. In this case, for example, we’ve built the Cubeflakes insurance claim application, replete with the form fields required for the insurance claim process.
When a user fills out all the required fields and submits the form, a templated document is created with auto-filled template form fields based on the user input.
[HttpPost]
public async Task SignDocument(TemplateDetails templateDetails)
{
templateDetails.TemplateId = "*** Template Id ***";
var documentDetails = new SendForSignFromTemplate()
{
Title = "Cubeflakes - Insurance Claim Form",
TemplateId = templateDetails.TemplateId,
DisableEmails = true,
Roles = new List()
{
new Roles
{
SignerName = templateDetails.FullName,
SignerEmail = templateDetails.EmailAddress,
RoleIndex = 1,
SignerType = SignerType.Signer,
ExistingFormFields = new List()
{
new ExistingFormField()
{
Id = "txtClaimType",
Value = templateDetails.PolicyType,
},
new ExistingFormField()
{
Id = "txtPolicyNumber",
Value = templateDetails.PolicyNumber,
},
new ExistingFormField()
{
Id = "txtFullName",
Value = templateDetails.FullName,
},
new ExistingFormField()
{
Id = "rbnMale",
Value = templateDetails.Gender,
},
// Repeat the same for other required form fields with the respective id, and value…
}
}
}
};
// Create document from Template with the new form fields
DocumentCreated documentCreated = await this.templateClient
.SendUsingTemplateAsync(sendForSignFromTemplate: documentDetails).ConfigureAwait(false);
templateDetails.DocumentId = documentCreated.DocumentId;
}
Note: The ID in the existing form fields should be same as given in template form fields.
Once the autofilled document is generated from the existing template, we create the embed signing URL, which is to be loaded into the iframe, allowing the user to complete the signing process without leaving the application.
templateDetails.DocumentId = documentCreated.DocumentId; // created in the previous step
//Create embedded Sign URL from the document created
EmbeddedSigningLink embeddedSignUrl = this.documentClient.GetEmbeddedSignLink(
documentId: templateDetails.DocumentId,
signerEmail: templateDetails.EmailAddress,
DateTime.Now.AddDays(30),
redirectUrl:$"https://{this.Request.Host}/Home/Responses");
templateDetails.SignLink = embeddedSignUrl.SignLink;
// This SignLink will be loaded into the iframe
The users will be redirected to the URL specified in the redirectUrl option in the previous code once all the required fields have been filled in and the signing procedure has been completed.
After the signing has been successfully completed, you may use the following code snippet to download the signed document if you want to save a copy for your records.
// Download the document using DocumentId
[HttpGet]
public async Task DownloadDocument(string id)
{
var document =await documentClient.DownloadDocumentAsync(id).ConfigureAwait(false);
var contentType = "application/pdf"; // Set the content type of the file
var fileName = "Copy_InsuranceClaimForm.pdf"; // Set the file name
Response.Headers.Add("Content-Disposition", "Attachment; filename=" + fileName);
return File(document, contentType, fileName);
}
Since document signing is an asynchronous process, we need to listen to the WebHook completed event, to download the document. Check out the Webhooks documentation for more details.
All done. We have integrated eSignatures in insurance claim app successfully. For your reference, we are hosting the insurance claim demo application and made the complete source code available on GitHub.
Thanks for reading! We hope that you found this blog helpful in learning how to integrate eSignatures in insurance claim app using BoldSign APIs. You can integrate BoldSign APIs similarly in any of your projects to streamline the eSigning in your workflow.
To learn more about BoldSign APIs, visit our API documentation. Live API demos are also available for several different scenarios. Sample code for popular programming languages are available in this GitHub repo.
If you have questions, you can contact us through our support portal. We are always happy to assist you!
Latest Articles
Send eSignature documents from bubble.io using BoldSign
Create Custom Form Fields to Speed Up Document Building with BoldSign
Top 10 Use Cases of eSignatures