Create a Task from Template
DottedSign API provides various methods to create tasks, with creating a task from a template being the simplest approach. This can be achieved using either the Quick Create a Task API or the Create a Task API.
1. Create a Template in DottedSign
Before creating a task, users must have access to a template, either created by themselves or shared by other team members. Here is the link of the template list and its corresponding screenshot.
2. Create a Task from Template
Before integrating the API, it is important to understand the differences between the two APIs as outlined in the table below:
Perspective | Quick Create a Task | Create a Task |
---|---|---|
Complexity | Simple | Complex |
Customization | Low | High |
Default Data | Uses the original file and all settings from the template (including the number of signers, field settings, signer permissions, etc.). | Uses only the original file from the template. |
Modifiable Data | All template settings are primarily used, but certain settings can be overridden, including task settings (e.g. expiration date), signer permissions, signer verification methods, and the default value of field settings. See API documentation for more details. | All task settings must be specified; otherwise, system defaults (not settings from template) are used. |
Required Payload | template_id , file_name , stages[].email , stages[].name | template_id , file_name , stages[].email , stages[].name , stages.field_settings |
Developers should choose the appropriate API based on the desired user scenario. Here is a brief introduction to each use case.
Quick Create a Task
At its most basic, this involves creating a task using only the necessary parameters, completely based on the template setting, as shown in the payload example below:
{
"file_name": "My Task",
"template_id": 1,
"stages": [
{
"email": "[email protected]",
"name": "John"
}
]
}
Pre-Filling User Information
Developers may also choose to override template parameters if necessary. For instance, in a contract document, a signer is typically required to enter his name, email, and company name into specific fields. In an integration scenario, it is preferable for these values to be automatically populated from a third-party system (e.g. Hubspot, Pipedrive) and not editable by the signer. To facilitate this, developers can configure the template in DottedSign to create search keys for these fields during the Create a Template from DottedSign step. These search keys serve as field identifiers for document searching or data mapping within DottedSign API. When integrating this API, the field values can be pre-filled using these search keys, as illustrated in the example below:
{
"file_name": "My Task",
"template_id": 1,
"stages": [
{
"email": "[email protected]",
"name": "John",
"field_settings": [
{
"search_key": "name",
"options": {
"default": "John"
}
},
{
"search_key": "email",
"options": {
"default": "[email protected]"
}
},
{
"search_key": "company",
"options": {
"default": "DottedSign"
}
}
]
}
]
}
}
Override Settings
Templates are reusable, but the settings of a template and the settings of a task are not always identical. Differences can arise due to the timing of task creation and the unique characteristics of each signer, leading to scenarios such as:
- If you want signers to complete their tasks before a deadline, each task may have a different deadline.
- If the template includes SMS OTP for identity verification, each signer will have a unique phone number.
Therefore, when creating a task, it is necessary to customize settings such as the deadline (in task_setting
) and the verification methods (in stages[].verify_methods
) to accommodate these variations.
{
"file_name": "My Task",
"template_id": 1,
"stages": [
{
"email": "[email protected]",
"name": "John",
"verify_methods": [
{
"verify_type": "sms",
"verify_source": "+886123456789",
"occasion": "sign"
}
]
}
],
"task_setting": {
"deadline": 1704067200 // 2024.01.01
}
}
Create a Task
Although the Quick Create a Task API offers ease of integration, the Create a Task API. provides a higher degree of customization. It utilizes only the original file from the template, requiring all other parameters, such as signers and all signing fields, to be fully specified in the API. Please refer to Create a Task from Scratch for more details.
Updated 16 days ago