Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section

The Story

In order not to have to create the same envelope again and again for constant situations, the seller creates a template that he/she can use for constant contract. To create a template and use it in constant situations does not only save time but also prevents mistakes such as for example a text field being forgotten.

Use Case Description

Following steps are necessary:

  1. Create a template
  2. Use the template

This case leads you through the process of creating a template with the UI and working with the template with the API. In order not to create the same envelope again and again this case explain how to create a template. Thus, time can be saved. First, we have to create a template with the UI. The following screenshot shows where you can find the template section:


Note: If you have defined placeholders for the template you want to use with the API, you have to override the email address of the placeholders.

To get the email addresses of the placeholders you need the get envelope API call (envelope/##templateId##). In the response in the section steps you can find the email address of the placeholder. Afterwards you have to override the email address in the sendFromTemplate API call.

Please see the following configuration

:

Section


Figure

Description
Templates OverviewImage AddedImage Removed



  1. You can create a new template in this section
  2. Click this button to create the first template

If you click on “create your first template” the following window appears:

Image RemovedCreate TemplateImage Added

You can either define a recipient for the template like it is shown in the figure above, or you can define placeholder. Note: If you define placeholders for your template you have to override them if you use the template.

Here you can find a figure of a template with two placeholders:

Image Removed


Edit TemplateImage Added

There you can configure all settings for the template. After the configurations you can update the template which is shown in the next screenshot:

FigureDescription


Image RemovedUpdate TemplateImage Added

  1. Update and save the template

After saving the template you can now use the Id of the template and work with the API. If you open the template you can see the template in the URL:

e. g.: https://demo.esignanywhere.net/Templates/Detail/##TemplateID##

Section

It is also possible to retrieve the templateId with the following api call:

https://demo.esignanywhere.net/api/v6/template/find

Within this call you can search for the following

Integration

Info
Code Block
languagejava
themeEclipse
{
  "
TemplateId
SearchText": "
##templateId##
string",
  "
EnvelopeOverrideOptions
RecipientEmail": "string"
}

As response you will get the templateId and the name of the template.


Section

Integration

Info

Note: If you have defined placeholders for the template you want to use with the API, you have to override the email address of the placeholders.

To get the email addresses of the placeholders you need the get envelope API call (envelope/##templateId##). In the response in the section steps you can find the email address of the placeholder.

Please see the following configuration:

Code Block
languagejava
themeEclipse
{
    "Id": "aa78a404-1234-1234-1234-8138065dc8a0",
    "EnvelopeStatus": "Template{
    "Recipients": [
      {
        
        "OrderIndex": 1,
        "Email":"Placeholder:first signer",
    "Name": "test",
    "RecipientActivities": [
        {
            "EmailId": "##email_of_the_signer##eaa13eaf-1234-1234-1234-8fbdb950f6a1",
            "FirstNameStatus": "SomeNamePending",
            "LastNameAction": {
                "SomeNameSign",: {
          "LanguageCode          "ContactInformation": "en"{
        }
        },
Section

Copy Document from template

For this api call you just need the templateId. The response of this call is a new SspFileId and the workstep configuration of the template. You can use the SspFileId and the workstep configuration to send an envelope.

api endpoints:

  • REST: /v4/envelope/{templateId}/copyFromTemplate
  • SOAP: CopyDocumentFromTemplate_v1

Create envelope from template

You can also create an envelope from a template via api. You can find a configuration in the next section. After finishing the api call you will get a draftId for the created envelope.

Code Block
languagejava
themeEclipse
{ "TemplateId": "##TemplateId##", "EnvelopeOverrideOptions": { "Recipients": [
        "Email": "placeholderemail",
                        "GivenName": "_PlaceHolderFirstName",
                
{
        "
RecipientId
Surname": "
##RecipientId##
_PlaceHolderLastName",
         
"OrderIndex": 1,
               "
Email
LanguageCode": "
##EMAIL##
EN"
,

        
"Recipient":
 
{
          
"Email": "##EMAIL##",
 }
           
"FirstName": "##NAME##",
     }
          
"LastName": "##NAME##",
  }
        },
   
"LanguageCode": "en",
     {
            "
EmailBodyExtra
Id": "
string
9bf06031-1234-1234-1234-d58314c8f7aa",
            "
DisableEmail
Status": 
false
"Pending",
            "
AddAndroidAppLink
Action": 
false,
{
          
"AddIosAppLink
      "Sign": 
false,
{
          
"AddWindowsAppLink":
 
false,
         "
AllowDelegation
ContactInformation": 
true,
{
          
"SkipExternalDataValidation": false,
              "
AuthenticationMethods
Email": 
[
"placeholderemail",
            
{
            
}
"GivenName": "_PlaceHolderFirstName",
         
],
          
     
"
SwissComCertificateData
Surname": 
{
"_PlaceHolderLastName",
            
"PhoneNumber":
 
"string",
           "
MobileId
LanguageCode": "
string
EN"
,

             
"Parameters":
 
[
      }
        
{
        
"Key": "string",
}
            
"Value": "string"
}
        
}
    
]
}, "RemoteCertificateData": { "UserId": "string", "DeviceId": "string" }, "OtpData": { "PhoneMobile": "string" }, "Pkcs7SignerData": {
}



Create draft from template

Just add the templateId in the following api call (https://demo.esignanywhere.net/api/v6/template/createdraft). You can find a configuration in the next section. After finishing the api call you will get a draftId.

Code Block
languagejava
themeEclipse
{
"TemplateId": "aa78a404-1234-1234-bd8b-8138065dc8a0"
}

As response you get the draftId. For more information about drafts please have a look at: Draft Story

Get template configuration

With the following api call (https://demo.esignanywhere.net/api/v6/template/{templateId}/configuration you get the complete configuration of the template. Please see the next sample:


  
<overrideOptions>
   
<name>new
 
name</name>
   
<eMailSubject>new
{
 
subject</eMailSubject>
   
   
<eMailBody>new
 
body</eMailBody>
  
   
<callbackUrl></callbackUrl>
 
   
<statusUpdateCallbackUrl></statusUpdateCallbackUrl>
 "ProviderName": "string",
   
<enableReminders>true</enableReminders>
   
  
<firstReminderDayAmount>1</firstReminderDayAmount>
   
<recurrentReminderDayAmount>2</recurrentReminderDayAmount>
   
<beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount>
  
  
<daysUntilExpire>20</daysUntilExpire>
"Validations": [
   
<recipientOverrides>
      
<recipientOverride>
         
<recipientLookUp>
  {
          
<eMail>##EMAIL##</eMail>
            
<orderIndex>1</orderIndex>
"FieldReferenceId": "string",
             
</recipientLookUp>
         
<recipient>
"ExpectedValue": "string"
              
<eMail>##EMAIL##</eMail>
      }
            
<emailBodyExtra>some
     
extra
 
text</emailBodyExtra>
]
            
<firstName>Hello</firstName>
    }
            
<lastName>World</lastName>
  ],
            
<languageCode>en</languageCode>
  "SamlAuthentications": [
              
</recipient>
  {
        
</recipientOverride> </recipientOverrides> </overrideOptions>

For a SOAP implementation the following information (draftOptions) must be also filled in:

Code Block
languagejava
themeEclipse
{
  "MetaData": "string",
  "AddDocumentTimestamp": true,
  "ShareWithTeam": true,
  "LockFormFieldsOnFinish": true,
  "SendFinishedDocumentsToAllSignersAndMustView": true,
  "Activities": [
    {
      "Id": "string",
      "Action": {
        
"
AllowedPkcs7SignatureTypes
SendCopy": 
[
{
          
"
LocalCertificate
RecipientConfiguration": {
            
]
"PersonalMessage": "string"
          },
          "CopyingGroup": 
}
0
        },
    
],
    "
AddFormFields
Sign": {
          "
Forms
RecipientConfiguration": {
       
     "PersonalMessage": "string",
  
      
}
    
}, "OverrideFormFieldValues
"AuthenticationConfiguration": {
      
"Forms": {
        "AccessCode": {
        
      
}
  
}, "Name
"Code": "string"
,

    
"EmailSubject":
 
"string",
    
"EmailBody":
 
"string",
    
"EnableReminders": true
},
    
"FirstReminderDayAmount":
 
1,
    
"RecurrentReminderDayAmount":
 
1,
    "
CallbackUrl
SmsOneTimePassword": 
"string",
{
    
"StatusUpdateCallbackUrl":
 
"string",
    
"WorkstepEventCallback":
 
{
      "
Url
PhoneNumber": "string"
,

       
"Blacklist":
 
[
      },
  
"string"
      
],
      "
WhiteList
SwedishBankId": 
[
{
                "PersonalNumber": "string",
       
]
     
},
    "
MetaDataXml
AllowAnyPersonalNumber": 
"string"
true
  
},
      
"CreateDraftOptions":
 
{
    
"AfterSendRedirectUrl": "string"
 },
    
"AfterSendCallbackUrl":
 
"string",
    
"RedirectPolicy":
 
"None",
    "
AllowAgentRedirect
OAuthAuthentications": 
true,
[
    
"IframeWhiteList":
 
"string"
  
} }
Expand
titleAlternative: SOAP implementation (deprecated)
Code Block
languagexml
themeEclipse
Expand
titleAlternative: SOAP implementation (deprecated)
Code Block
languagexml
themeEclipse
  <draftOptions>
    <afterSendRedirectUrl></afterSendRedirectUrl>
    <afterSendCallbackUrl></afterSendCallbackUrl>
    <redirectPolicy>ToDesigner</redirectPolicy>
</draftOptions>

Send envelope from template

Now you can send an envelope from a template. For this call you need the template Id as well as the overrideOptions. The next configurations show you the override options:

Info

The configuration has not all settings included. It is just for testing the API call with some simple configuration. The whole configuration you can find in the next collapse.

Code Block
languagejava
themeEclipse
{ "TemplateId": "##TemplateId##", "EnvelopeOverrideOptions": { "Recipients": [
          "ProviderName": "string",
                  "Validations": [
                    {
                      "FieldReferenceId": "string",
      
{
                "
RecipientId
ExpectedValue": "
##RecipientId##
string"
,

        
"OrderIndex": 1,
           
"Email": "##EMAIL##",
 }
        
"Recipient": {
          ]
   
"Email": "##EMAIL##",
            
"FirstName": "TESTNAME",
 }
           
"LastName": "TESTLASTNAME",
   ]
          
"LanguageCode": "en"
  },
            "
EmailBodyExtra
SendEmails": 
"string"
true,
            "
OtpData
AllowAccessAfterFinish": 
{
true,
            "
PhoneMobile
IncludedEmailAppLinks": 
"string"
{
          
}
    "Android": true,
              "
Pkcs7SignerData
iOS": 
{
true,
              "
AllowedPkcs7SignatureTypes
Windows": 
[
true
            },
  
"LocalCertificate"
          
]
"AllowDelegation": true,
          
}
  "RequireViewContentBeforeFormFilling": true
    
}
      },
      
],
    "
AddFormFields
FinishActionConfiguration": {
      
"Forms
      "SignAnyWhereViewer": {
        
      
}
"RedirectUri": "string"
     
},
    
"OverrideFormFieldValues": {
   },
     
"Forms":
 
{
      "SignificantClientSignatureCaptureForIos": {
      
}
    
},
    "
Name
RemoveDocumentFromRecentDocumentList": 
"TEST"
true,
    
"EmailSubject":
 
"TESTEMAILSUBJECT",
    
"EmailBody":
 
"string",
    "
EnableReminders
CallClientActionOnlyAfterSuccessfulSync": true,
    
"FirstReminderDayAmount":
 
2,
    
"RecurrentReminderDayAmount":
 
1,
    "
BeforeExpirationDayAmount
CloseApp": 
1
true,
    
"DaysUntilExpire":
 
25,
    
"CallbackUrl":
 
"string",
    "
StatusUpdateCallbackUrl
RedirectUri": "string"
,

    
"MetaDataXml": "string" } } Expand
titleAlternative: SOAP implementation (deprecated)
Code Block
languagexml
themeEclipse
<overrideOptions> <name>Sending with template</name> <eMailSubject>Subject of the envelope</eMailSubject> <eMailBody>Please sign the document!</eMailBody> <callbackUrl></callbackUrl> <statusUpdateCallbackUrl></statusUpdateCallbackUrl> <enableReminders>true</enableReminders> <firstReminderDayAmount>1</firstReminderDayAmount> <recurrentReminderDayAmount>2</recurrentReminderDayAmount> <beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount> <daysUntilExpire>20</daysUntilExpire> <recipientOverrides> <recipientOverride> <recipientLookUp>
        },
            "SignificantClientSignatureCaptureForAndroid": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              
<eMail>##EMAIL##</eMail>
"RedirectUri": "string"
            
<orderIndex>1</orderIndex> </recipientLookUp>
},
          
<recipient>
  "SignificantClientSignatureCaptureForWindows": {
         
<eMail>##EMAIL##</eMail>
     "RemoveDocumentFromRecentDocumentList": true,
      
<emailBodyExtra>Some
 
extra
 
text</emailBodyExtra>
      "CallClientActionOnlyAfterSuccessfulSync": true,
      
<firstName>FIRSTNAME</firstName>
        "CloseApp": true,
   
<lastName>LASTNAME</lastName>
           
<languageCode>en</languageCode>
"RedirectUri": "string"
            },
          
</recipient>
  "KioskSdk": {
        
</recipientOverride>
    
</recipientOverrides> </overrideOptions> Section

The next configuration shows you a complete configuration in REST (JSON).

Code Block
languagejava
themeEclipse
{
  "
TemplateId
RedirectUri": "string"
,

  
"EnvelopeOverrideOptions":
 
{
    
"Recipients":
 
[
    }
  
{
        
"RecipientId": "string"
},
          "
OrderIndex
SignatureDataConfiguration": 
0,
{
            "
Email
DisposableCertificate": 
"string",
{
        
"Recipient": {
      
"Email
"DocumentIssuingCountry": "string",
              "
FirstName
IdentificationIssuingCountry": "string",
              "
LastName
IdentificationType": "
string
None",
              "
LanguageCode
PhoneNumber": "string",
              "
EmailBodyExtra
DocumentType": "
string
IdentityCard",
              "
DisableEmail
DocumentIssuedBy": 
false
"string",
              "
AddAndroidAppLink
DocumentIssuedOn": 
false
"2023-04-18",
              "
AddIosAppLink
DocumentExpiryDate": 
false
"2023-04-18",
              "
AddWindowsAppLink
SerialNumber": 
false
"string",
              "
AllowDelegation
DocumentNumber": 
true,
"string"
          
"SkipExternalDataValidation": false
  },
            "
AuthenticationMethods
RemoteCertificate":
[
 
{
              "
Method
UserId": "
Pin
string",
              "
Parameter
DeviceId": "string"
,

            
"Filters": [
},
            
"SwissComOnDemand": {
              
"
CompareOperation
PhoneNumber": "
Equals
string",
              
"
FilterId
CommonName": "string",
              
"
FilterValue
Country": "string",
              
}
"Locality": "string",
              
]
"OrganizationUnit": "string",
            
}
  "Organization": "string",
          
],
    
"DisposableCertificateData
"SerialNumber": 
{
"string",
              "
CountryResidence
StateOrProvince": "string",
              "
IdentificationCountry
Pseudonym": "string"
,

            
"IdentificationType": 1
},
            "
PhoneMobile
SmsOneTimePassword": 
"string",
{
              "
DocumentType
PhoneNumber": "
CI
string"
,

            
"DocumentIssuedBy": "string"
},
            "
DocumentIssuedOn
ATrustCertificate": 
"2019-10-21T07:07:19.513Z",
{
              "
DocumentExpiryDate
PhoneNumber": "
2019-10-21T07:07:19.513Z",
string"
            
"SerialNumber": "string"
},
            "
DocumentNumber
SwedishBankId": {
              "PersonalNumber": "string",
              "
OverrideHolderInCaseOfMismatch
AllowAnyPersonalNumber": true
            },
            "
SwissComCertificateData
SignaturePluginData": 
{
[
            
"PhoneNumber": "string",
  {
                "
MobileId
PluginId": "string",
                "
Parameters
Fields": [
                  {
                    "Key": "string",
                    "Value": "string"
                  }
                ]
              }
,

          
"RemoteCertificateData": {
  ]
          
"UserId": "string"
},
          "
DeviceId
BatchConfiguration": 
"string"
{
  
},
          "
OtpData
Mode": 
{
"Basic",
            "
PhoneMobile
RequireScrollingOverAllSignaturesBeforeSigning": 
"string"
true
          },
          "
Pkcs7SignerData
SigningGroup": 
{
0
        },
        "
AllowedPkcs7SignatureTypes
View": 
[
{
          
"
LocalCertificate
RecipientConfiguration": {
            
]
"PersonalMessage": "string",
          
}
  
}
"AuthenticationConfiguration": {
      
}
    
],
    "
AddFormFields
AccessCode": {
      
"Forms": {
          "
additionalProp1
Code": 
[
"string"
           
{
   },
              "
Name
SmsOneTimePassword": 
"string",
{
                "
ReadOnly
PhoneNumber": 
false,
"string"
             
"Required":
 
false
},
              "
X
SwedishBankId": 
0,
{
                "
Y
PersonalNumber": 
0
"string",
                "
Width
AllowAnyPersonalNumber": 
0,
true
            
"Height": 0
  },
              "
Page
OAuthAuthentications": 
0,
[
       
"DiscriminatorType":
 
"string"
        {
  
}
        
],
        "
additionalProp2
ProviderName": 
[
"string",
         
{
         "Validations": [
  
"Name": "string",
              
"ReadOnly":
 
false,
   {
         
"Required":
 
false,
            "
X
FieldReferenceId": 
0
"string",
            
"Y
          "ExpectedValue": 
0,
"string"
            
"Width":
 
0,
       }
     
"Height": 0,
            
"Page": 0,
 ]
            
"DiscriminatorType":
 
"string"
   }
       
}
       
],
              "
additionalProp3
SamlAuthentications": [
          
{
      {
      
"Name":
 
"string",
           
"
ReadOnly
ProviderName": 
false
"string",
            
"Required":
 
false,
     "Validations": [
      
"X":
 
0,
            
"Y": 0,
 {
            
"Width":
 
0,
         
"
Height
FieldReferenceId": 
0
"string",
            
"Page": 0,
          "
DiscriminatorType
ExpectedValue": "string"
           
}
         
]
}
      
}
       
},
    
"OverrideFormFieldValues":
 
{
]
      
"Forms": {
          
"additionalProp1": [
}
              ]
          
{
  },
            "
Name
SendEmails": 
"string"
true,
            "
DiscriminatorType
AllowAccessAfterFinish": 
"string"
true
          },
        
],
  "ViewingGroup": 0
        
"additionalProp2": [
},
        
"SignAsP7M": {
          
"
Name
RecipientConfiguration": 
"string",
{
            "
DiscriminatorType
PersonalMessage": "string",
           
}
 "AuthenticationConfiguration": {
      
],
        "
additionalProp3
AccessCode": 
[
{
          
{
      
"
Name
Code": "string"
,

            
"DiscriminatorType": "string"
  },
          
}
    "SmsOneTimePassword": {
   
]
      
}
   
},
    "
Name
PhoneNumber": "string"
,

     
"EmailSubject": "string",
        
"EmailBody": "string"
 },
    
"EnableReminders":
 
true,
    
"FirstReminderDayAmount":
 
0,
    "
RecurrentReminderDayAmount
SwedishBankId": 
0,
{
      
"BeforeExpirationDayAmount":
 
0,
    
"DaysUntilExpire":
 
0,
    "
CallbackUrl
PersonalNumber": "string",
    
"StatusUpdateCallbackUrl":
 
"string",
    
"WorkstepEventCallback":
 
{
      "
Url
AllowAnyPersonalNumber": 
"string",
true
      
"Blacklist": [
        },
  
"string"
      
],
      "
WhiteList
OAuthAuthentications": [
        
"string"
        
]
{
    
},
    
"MetaDataXml":
 
"string"
  
} }

Override form fields

In the configuration for sending an envelope from a template you can find the following section:

Code Block
languagejava
themeEclipse
"OverrideFormFieldValues":
 
{
      "
Forms
ProviderName": 
{
"string",
        
      
}
    
},

There you can override form fields.

To override a form field for example a Checkbox or a Radiobutton the following steps are necessary:

  • Create a template
  • Get the envelope (/envelope/{##envelopeID##}
  • Copy the name of the form field
  • Override the form field

Override Checkbox

In this section you can find a description and a sample of how to override a given checkbox from the template which is checked and try to override the value that the checkbox is not checked.

With the get envelope api call you get the workstep configuration of the template. In this configuration you can find the form fields which are placed on the template. Please see the next sample:

Code Block
languagejava
themeEclipse
"Documents": [
"Validations": [
                    {
                      "FieldReferenceId": "string",
          
{
            "
PageSizesInPoints
ExpectedValue": 
[
"string"
                
{
    }
                  ]
   
"Height":
 
792.0,
            }
        
"Width": 612.0
      ],
            
}
  "SamlAuthentications": [
         
],
       {
     
"DocRefNumber":
 
1,
            "
FileName
ProviderName": "
Test.pdf
string",
            
"FormFields
      "Validations": [
                    {
                      "
Name
FieldReferenceId": "
CheckBox_bfa536d5-a360-1924-8adf-c6918ce4f982
string",
                      "
Values
ExpectedValue": 
[
"string"
                    }
                  
{
]
                }
            
"Key": "",
  ]
            },
            "SendEmails": true,
    
"Value
        "AllowAccessAfterFinish": 
"
true
"
,
            "IncludedEmailAppLinks": {
           
}
   "Android": true,
              "iOS": true,
           
]
   "Windows": true
            },
            
]
"AllowDelegation": true,
        
}
    
],

In the section “Documents”:[ you can find all form fields which are placed on the template. In this sample there is only one form field with the name:
CheckBox_bfa536d5-a360-1924-8adf-c6918ce4f982

For the next step we need the send envelope from template configuration and the name of the form field which we want to override. In the next section you can find a sample where the checkbox gets overridden.

Code Block
languagejava
themeEclipse
{ "TemplateId": "##TEMPLATE##", "EnvelopeOverrideOptions": { "Recipients": [
"RequireViewContentBeforeFormFilling": true
          },
          "SignatureMethods": {
            "LocalCertificate": true,
            "DisposableCertificate": {
      
{
        "
RecipientId
DocumentIssuingCountry": "
##RECIPIENT##
string",
        
"OrderIndex": 1,
      "
Email
IdentificationIssuingCountry": "
##EMAIL##
string",
        
"Recipient": {
      
"Email
"IdentificationType": "
##EMAIL##
None",
              "
FirstName
PhoneNumber": "
##NAME##
string",
              "
LastName
DocumentType": "
##NAME##
IdentityCard",
              "
LanguageCode
DocumentIssuedBy": "
en
string",
              "
EmailBodyExtra
DocumentIssuedOn": "
string
2023-04-18",
         
     "DocumentExpiryDate": "2023-04-18",
    
          "
OtpData
SerialNumber": 
{
"string",
              "
PhoneMobile
DocumentNumber": "string"
            },
            "
Pkcs7SignerData
RemoteCertificate": {
              "
AllowedPkcs7SignatureTypes
UserId": 
[
"string",
              "DeviceId": "
LocalCertificate
string"
            
]
},
          
}
  "SignaturePluginData": [
        
}
      
}
{
    
],
     
"AddFormFields":
 
{
      "
Forms
PluginId": 
{
"string",
          
      "Fields": 
[
      
}
    
},
     
"OverrideFormFieldValues":
 
{
  
"Forms":
{
        
"1":
 
[{
           "
DiscriminatorType
Key"
: "
FillCheckBoxFormDescriptor
string",
         
"Name":
 
"CheckBox_bfa536d5-a360-1924-8adf-c6918ce4f982",
          
"
IsChecked
Value": "
false
string"
                  }
       
         ]
        
      }
     
},
      
"Name": "TEST",
 ]
    
"EmailSubject":
 
"##Subject##",
    
"EmailBody": "string"
 },
     
"EnableReminders":
 
true,
    "
FirstReminderDayAmount
SignAsP7MGroup": 
2,
0
      
"RecurrentReminderDayAmount": 1
  },
   
"BeforeExpirationDayAmount":
 
1,
    "
DaysUntilExpire
SignBulk": 
25,
{
    
"CallbackUrl": "string",
      "
StatusUpdateCallbackUrl
RecipientConfigurations": 
"string",
[
    
"MetaDataXml
        {
              "RecipientConfiguration": {
                "PersonalMessage": "string",
  
} } Expand
titleAlternative: SOAP implementation (deprecated)
Code Block
languagexml
themeEclipse
 <overrideOptions>
	<name>new name</name>
	<eMailSubject>new subject</eMailSubject>
	<eMailBody>new body</eMailBody>
	<callbackUrl></callbackUrl>
	<statusUpdateCallbackUrl></statusUpdateCallbackUrl> 
	<enableReminders>true</enableReminders>
	<firstReminderDayAmount>1</firstReminderDayAmount>
	<recurrentReminderDayAmount>2</recurrentReminderDayAmount>
	<beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount>
	<daysUntilExpire>20</daysUntilExpire>
	<overrideFormFieldValues>
		<document docRef="1">
			<checkBox name="CheckBox_bfa536d5-a360-1924-8adf-c6918ce4f982">
				<isChecked>0</isChecked>
			</checkBox>
		</document>
	</overrideFormFieldValues>
</overrideOptions>

The checkbox is now not checked because of the following line:

Code Block
languagejava
themeEclipse
"IsChecked": "false"

Override Radiobutton

In this section you can find a description and a sample of how to override a given radiobutton from the template. In the following sample no button is selected in the given template.

With the get envelope api call you get the workstep configuration of the template. In this configuration you can find the form fields which are placed on the template. Please see the next sample:

Code Block
languagejava
themeEclipse
"Documents": [
              "AuthenticationConfiguration": {
                  "AccessCode": {
                    "Code": "string"
                  },
                  "SmsOneTimePassword": {
                    "PhoneNumber": "string"
                  },
                  "SwedishBankId": {
                    "PersonalNumber": "string",
        
{
            "
PageSizesInPoints
AllowAnyPersonalNumber": 
[
true
                
{
  },
                  "
Height
OAuthAuthentications": 
792.0,
[
                    
"Width": 612.0
{
                
}
      
]
"ProviderName": "string",
            
"DocRefNumber":
 
1,
         
"
FileName
Validations": 
"Test.pdf",
[
             
"FormFields":
 
[
          {
      
{
                    "
Name
FieldReferenceId": "
RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818
string",
                          "
Values
ExpectedValue": 
[]
"string"
                 
}
       }
     
]
        
}
    
],

In the section “Documents”:[ you can find all form fields which are placed on the template. In this sample there is only one form field with the name:
RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818

For the next step we need the send envelope from template configuration and the name of the form field which we want to override. In the next section you can find a sample where the radiobutton gets overridden.

Info

In the configuration you can find the section “SelectedItem” with the following value: RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818#XyzmoIndexSeparator#1

You need this part: #XyzmoIndexSeparator#1 to select which button in the group should be overwritten. In this example, #XyzmoIndexSeparator#1 means that the second button in the group should be overwritten. Note: List starts with 0, therefore, #1 is the second item in the group to be selected.

Code Block
languagejava
themeEclipse
{ "TemplateId": "##TemplateId##", "EnvelopeOverrideOptions": { "Recipients": [ {
     ]
                    }
                  ],
                  "SamlAuthentications": [
                    {
                      "ProviderName": "string",
                      "Validations": [
                        {
                          "FieldReferenceId": "string",
                          "ExpectedValue": "string"
                        }
                      ]
                    }
                  ]
                },
                "SendEmails": true,
                "AllowAccessAfterFinish": true,
                "IncludedEmailAppLinks": {
                  "Android": true,
                  "iOS": true,
                  "Windows": true
                },
                "AllowDelegation": true,
                "RequireViewContentBeforeFormFilling": true
              },
              "SignatureDataConfiguration": {
                "DisposableCertificate": {
                  "DocumentIssuingCountry": "string",
                  "IdentificationIssuingCountry": "string",
                  "IdentificationType": "None",
                  "PhoneNumber": "string",
                  "DocumentType": "IdentityCard",
                  "DocumentIssuedBy": "string",
                  "DocumentIssuedOn": "2023-04-18",
                  "DocumentExpiryDate": "2023-04-18",
                  "SerialNumber": "string",
                  "DocumentNumber": "string"
                },
                "RemoteCertificate": {
                  "UserId": "string",
                  "DeviceId": "string"
                },
                "SwissComOnDemand": {
                  "PhoneNumber": "string",
                  "CommonName": "string",
                  "Country": "string",
                  "Locality": "string",
                  "OrganizationUnit": "string",
                  "Organization": "string",
                  "SerialNumber": "string",
                  "StateOrProvince": "string",
                  "Pseudonym": "string"
                },
                "SmsOneTimePassword": {
                  "PhoneNumber": "string"
                },
                "ATrustCertificate": {
                  "PhoneNumber": "string"
                },
                "SwedishBankId": {
                  "PersonalNumber": "string",
                  "AllowAnyPersonalNumber": true
                },
                "SignaturePluginData": [
                  {
                    "PluginId": "string",
                    "Fields": [
                      {
                        "Key": "string",
                        "Value": "string"
                      }
                    ]
                  }
                ]
              }
            }
          ],
          "FinishActionConfiguration": {
            "SignAnyWhereViewer": {
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForIos": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForAndroid": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "SignificantClientSignatureCaptureForWindows": {
              "RemoveDocumentFromRecentDocumentList": true,
              "CallClientActionOnlyAfterSuccessfulSync": true,
              "CloseApp": true,
              "RedirectUri": "string"
            },
            "KioskSdk": {
              "RedirectUri": "string"
            }
          },
          "BatchConfiguration": {
            "Mode": "Basic",
            "RequireScrollingOverAllSignaturesBeforeSigning": true
          }
        }
      },
      "VisibilityOptions": [
        {
          "DocumentNumber": 0,
          "IsHidden": true
        }
      ]
    }
  ],
  "EmailConfiguration": {
    "Subject": "string",
    "Message": "string",
    "SenderDisplayName": "string"
  },
  "ReminderConfiguration": {
    "Enabled": true,
    "FirstReminderInDays": 0,
    "ReminderResendIntervalInDays": 0,
    "BeforeExpirationInDays": 0
  },
  "ExpirationConfiguration": {
    "ExpirationInSeconds": 0,
    "ExpirationDate": "2023-04-18T08:26:01.208Z"
  },
  "CallbackConfiguration": {
    "CallbackUrl": "string",
    "StatusUpdateCallbackUrl": "string",
    "AfterSendCallbackUrl": "string",
    "ActivityActionCallbackConfiguration": {
      "Url": "string",
      "ActionCallbackSelection": {
        "ConfirmTransactionCode": true,
        "AgreementAccepted": true,
        "AgreementRejected": true,
        "PrepareAuthenticationSuccess": true,
        "AuthenticationFailed": true,
        "AuthenticationSuccess": true,
        "AuditTrailRequested": true,
        "AuditTrailXmlRequested": true,
        "CalledPage": true,
        "DocumentDownloaded": true,
        "FlattenedDocumentDownloaded": true,
        "AddedAnnotation": true,
        "AddedAttachment": true,
        "AppendedDocument": true,
        "
OrderIndex
FormsFilled": 
1
true,
        "
Email
ConfirmReading":
"##Email##"
 true,
        "SendTransactionCode": true,
        "
Recipient
PrepareSignWorkstepDocument": 
{
true,
        "
Email
SignWorkstepDocument": 
"##Email##"
true,
        "
FirstName
UndoAction": 
"##Name##"
true,
        "
LastName
WorkstepCreated": 
"##Name##"
true,
        "
LanguageCode
WorkstepFinished": 
"en"
true,
        
}
"WorkstepRejected": true,
        
}
"DisablePolicyAndValidityChecks": true,
        
{
"EnablePolicyAndValidityChecks": true,
        "AppendFileToWorkstep": true,
        "
OrderIndex
AppendTasksToWorkstep": 
2
true,
        "
Email
SetOptionalDocumentState":
"##Email##"
 true,
        "
Recipient
PreparePayloadForBatch": 
{
true
      }
    
"Email
}
  },
  "AgreementConfiguration": 
"##Email##",
{
    "Translations": [
     
"FirstName": "##Name##",
 {
        
"
LastName
LanguageCode": "
##Name##
AF",
        "
LanguageCode
Text": "
en
string",
        
"Header": "string",
        
}
"IsDefault": true
      }
    ]
,

  
},
  
"
OverrideFormFieldValues
AgentRedirectConfiguration": {
    
"
Forms
Policy": 
{
"Workflow",
    "Allow": true,
    "
1
IFrameAllowList": [
{

      "string"
    ]
  },
  "
DiscriminatorType
RedirectConfiguration"
: 
"FillRadioButtonFormDescriptor",
{
    "AfterSendRedirectUrl": "string",
    
"
Name
BeforeSendRedirectUrl": "
RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818"
string"
  },
  "DefaultSignatureTypeConfiguration": {
    "ClickToSign": {
      "
SelectedItem
IsDefault": 
"RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818#XyzmoIndexSeparator#1"
true
    
},
    "DrawToSign": 
{
      
]
"IsDefault": true
    },
  
  "TypeToSign": {
   
}
   "IsDefault": true
 
}
   },
  
}
  
} Expand
titleAlternative: SOAP implementation (deprecated)
Code Block
languagexml
themeEclipse
<overrideOptions>
"LocalCertificate": {
      "IsDefault": true
    },
    "DisposableCertificate": 
<name>new name</name> <eMailSubject>new subject</eMailSubject> <eMailBody>new body</eMailBody> <callbackUrl></callbackUrl> <statusUpdateCallbackUrl></statusUpdateCallbackUrl> <enableReminders>true</enableReminders> <firstReminderDayAmount>1</firstReminderDayAmount> <recurrentReminderDayAmount>2</recurrentReminderDayAmount> <beforeExpirationReminderDayAmount>1</beforeExpirationReminderDayAmount> <daysUntilExpire>20</daysUntilExpire> <overrideFormFieldValues>
{
      "IsDefault": true
    },
    "Biometric": {
     
<document
 
docRef=
"
1
IsDefault"
>
: true
    },
    
<radioButtonGroup name="RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818">
"RemoteCertificate": {
      "IsDefault": true
    
<selectedItemId>RadioButton_a497ee93-41ef-c2a0-6df0-a587a60be818#XyzmoIndexSeparator#1</selectedItemId>
},
    "OneTimePassword": {
    
</radioButtonGroup>
  "IsDefault": true
   
</document>
 }
  
</overrideFormFieldValues> </overrideOptions>

For the override method the following DiscriminatorTypes are available:

  • FillCheckBoxFormDescriptor
  • FillComboBoxFormDescriptor
  • FillListBoxFormDescriptor
  • FillRadioButtonFormDescriptor
  • FillTextBoxFormDescriptor
    }
    }