Once a transaction is completed
, each participant is sent an automatic email with the link to download his/her signed documents.
However, you can customize the subject and message of the signed documents email. To do so, send a request to POST /v1/transactions/{transaction_id}/participants
as follows:
curl
https://api.universign.com/v1/transactions/tx_aA5g6yzYVYW8/participants \
-d email=john.doe@company.com \
-d signed_documents_subject=Download your signed documents \
-d signed_documents_message=<?xml version="1.0" encoding="UTF-8"?>
<message>
<p>Thank you for sending the <i>Document</i></p><br/>
<p>Please find below the link to access and download the signed document.</p>
</message>
The signed documents subject value is limited to 100 characters and the message to 1000 characters.
The email message should be in text format or in a valid XHTML format. We support the following tags (without attributes):
- “b”, “strong”: bold style
- “i”, “em” : italic style
- “u” : underlined style
- “ul”, “ol”, “li” : unordered and ordered list
- “p” : paragraph
- “br” : line break
Use variables
You can customize further your completed transaction messages using both our preconfigured variables as well as metadata you previously defined while creating your transaction.
The participant and carbon copies receive the custom message containing the value of each variable or metadata you set.
Below is the list of preconfigured variables:
${participant.full_name}
: set if you want to include the participant fullname in your custom message.${participant.email}
: set if you want to include the participant email in your custom message.${transaction.name}
: set if you want to include the transaction name in your custom message.${transaction.expires_at}
: set if you want to include the transaction expiration date in your custom message.
Note that ${participant.full_name}
and ${participant.email}
variables cannot be used to customize messages sent to carbon copies.
To add a metadata to your custom message, add ${metadata.*}
to you message body (you need to replace the *
with the metadata key).
Request example
curl
https://api.universign.com/v1/transactions/tx_AWo949MOq0JE/participants \
-d email=john@company.com \
-d signed_documents_subject=Completed-transaction message with variables \
-d signed_documents_message=<?xml version="1.0" encoding="UTF-8"?>
<message>
Hello ${participant.full_name},
<p>You have completed the actions related to the transaction ${transaction.name} as part of your contract ${metadata.Contract} for the position of ${metadata.Position}.</p>
<p>You can now download your signed document.</p>
<p>Regards,</p>
<p>HR Team<br/></p>
</message>
Response example
{
"email" : "john@company.com",
"phone_number" : "+33612345679",
"phone_number_type" : "suggestion",
"min_signature_level" : "level1",
"signed_documents_subject" : "Completed-transaction message with variables",
"signed_documents_message" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?><message>Hello ${participant.full_name},\n<p>You have completed the actions related to the transaction ${transaction.name} as part of your contract ${metadata.Contract} for the position of ${metadata.Position}.</p>\n<p>You can now download your signed document.</p>\n<p>Regards,</p>\n<p>HR Team<br /></p></message>",
"schedule" : [ 0 ],
"ongoing_conversation" : false,
"has_unread_message" : false,
"state" : "open",
"access_control" : "standard",
"shared_contact" : false,
"fullname_suggestion" : "John doe",
"phone_number_suggestion" : "+33612345679",
"full_name" : "John doe",
"waiting_period" : 0,
"full_name_type" : "suggestion"
}