Duo_Liang submitted December 19 2018

Prerequisite:
This tool is encapsulated as an Executive Jar, so you need to install the JRE/JDK environment in order to run the Jar.

Before you start:

Before you get started, please contact our support team at [email protected] and make sure all the necessary account settings have been transferred to the target account.

Copy Modes:

Mode 1 - Copy templates and layouts of all senders to respective senders under target account.

Mode 2 - Copy templates and layouts of all senders to the target account owner.

Mode 3 - Only copy the templates and layouts under the API key holder.

Worthy of Note:

- Source and target accounts can be in the same environment.

- It's expected that templates migrated from Sandbox environments will have watermarks remaining. To work this around, move the original documents to a specified folder, name them as they are in the templates and select the folder before performing the migration.

 

For more detailed instructions on how to use the tool, check the developer blog "Template Layout Copy Tool".

 

Update 1.6.1 - 2022/01/13:

- When copying layouts, the tool will download the flattened document in order to reduce the file size

 

Update 1.6.0 - 2021/11/30:

- Templates and Layouts will be sorted in Alphabetic order

- When select copy mode 1 and match source senders to target senders, clicking on sender's label will bring over individual sender to the target account

- Allowed going back and forward to review the migration results

- Added a confirmation message after successfully migration the layouts

- Corrected some grammar errors

 

Update 1.5.8 - 2021/11/26 :

1. When there are conditional fields, the tool will check if the document IDs and the field IDs exist in the original template/layout before creating a new template/layout in the target account.

 

Update 1.5.7 - 2021/09/23 :

1. Fixed an issue that after copying, the new package sender still appears the old sender's first and last name, instead of applying the actual sender profile name

 

Update 1.5.6 - 2021/08/04 :

1. Trying to fix the issue introduced by 1.5.5 - when destination account has removed the default-consent form already, an error saying "Copy Reminder or Visibility fails for template xxx" appears. Now, as long as the end user didn't toggle the remove option, the tool won't hit the same error.

 

Update 1.5.5 - 2021/06/01 :

1. introduced an additional option to remove auto-generated default consent form when copying template.

 

Update 1.5.4 - 2021/04/27 :

1. fixed the "pastDueDate" issue by removing the "due" and "created" attributes when copying the template / layout.

 

Update 1.5.3 - 2020/07/13 :

1. fixed an issue caused by different API modelling in sandbox vs production environments, when copying senders.

 

Update 1.5.2 - 2020/04/27 :

1. fixed a bug introduced by previous code change and caused that the layout copy function didn't work properly.

2. modified the option texts in process 3.

3. fixed duplicated slashes in the API URLs.

 

Update 1.5.1 - 2020/04/24 :

1. fixed a bug for on-prem environment that the endpoint URL wasn't concatenated properly

 

Update 1.5.0 - 2020/04/06 :

1. add the proxy capability, allow to manually choose proxy ip/port or use a proxy script, also allow proxy authentication

2. for on-premise users, allow to specify environment URL

Rate this Code Share

Comments

Reply to: Template & Layout Copy Tool - Java version

0 votes
Can't find the documents for Fresh Start Finance

Reply to: Template & Layout Copy Tool - Java version

0 votes
Hi Darlene, Did you encounter an issue running the tool? Could you describe more detailed information on "can't find the documents"? Duo

Reply to: Template & Layout Copy Tool - Java version

1 votes
Hi, when doing a copy of the layout from one sand box account (sandbox.e-signlive.ca) to another using this tool I get the error re: certificates. "sun.security.validator.validatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuildderException: unable to find valid certification path to requested target Could you please advise a solution to this?

Reply to: Template & Layout Copy Tool - Java version

1 votes
This error happens on "test Connection" - using both options : With API KEY or With Credentials

Reply to: Template & Layout Copy Tool - Java version

0 votes
Hi Klee, Does your local machine connected through a proxy? Can you change another network like using hotspot from mobile and try again? This issue should be caused because JVM was not specified with proxy configuration. Duo

Reply to: Template & Layout Copy Tool - Java version

0 votes
Thanks ! I used the tool on a different n/w as you suggested and it worked fine.

Reply to: Template & Layout Copy Tool - Java version

0 votes
Glad to hear that!

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo,

Regarding this Copy tool, does it only copy the template and layout between the accounts? or it can copy all the account settings between accounts? and can they copy between different environment? for example, can I copy the accounts between DEV env and PTE env?

 

thanks,

Cindy

Reply to: Template & Layout Copy Tool - Java version

0 votes

When you use the tool to copy templates from a sandbox to production account, the SANDBOX watermark appeared to be on the documents. Is there anyway to remove this? Or do the layouts need to be saved to maintain the fields and the documents need to be deleted and uploaded to the template again?

Reply to: Template & Layout Copy Tool - Java version

0 votes

When you use the tool to copy templates from a sandbox to production account, the SANDBOX watermark appeared to be on the documents. Is there anyway to remove this? Or do the layouts need to be saved to maintain the fields and the documents need to be deleted and uploaded to the template again?

Reply to:

0 votes

Hi Serena,

 

For layout, watermark shouldn't be a concern, because for document itself, only the page size and the page number matters.

For template, I provided an option to let you choose a folder where you'd collect all the original documents inside with the original name as specified in the Template.

 

Duo

 

Reply to:

0 votes

Hello Duo

When I use the file, I am receiving an error that the number of uploaded files does not match number of documents specified in the package.  I have checked all the templates to the files in the folder and there is one copy of each file.  If I re-use a file from one template to another, do I need to have multiple copies of the file in the folder as well? Why would I receive this message? 

Deanne 

Reply to:

0 votes

Hello Duo

When I use the file, I am receiving an error that the number of uploaded files does not match number of documents specified in the package.  I have checked all the templates to the files in the folder and there is one copy of each file.  If I re-use a file from one template to another, do I need to have multiple copies of the file in the folder as well? Why would I receive this message? 

Deanne 

Reply to: Template & Layout Copy Tool - Java version

0 votes

Duo,

before copying the layout & template, we'd like to backup the source account setting first ( or just backup the existing layout and templates)  in case something goes wrong. so what do you suggest to backup the account setting?

 

thanks,

Cindy

Reply to:

0 votes

Hi Cindy,

 

Theoretically, the tool won't change anything in the source sender.

But if you want to back up all existing templates, you can (1)in sender UI (2)create a new template, chosen the template from each of the original template (3)give this backup a different name, so that you can distinguish them when you run the tool.

Similarly, for layouts, you can apply the layout to a same page size document, and re-save it as a new layout. Or directly re-save the layout from the original template/package. 

 

Duo

Reply to:

0 votes

basically you saying duplicate the templates/layouts, and copy the original ones when selected. actually, in our exercises, we normally copy all to the destination, otherwise, we need to let the admin know which ones need to copy (I guess in the tool, it lists the name of layout/templates to choose), right?

thanks,

Cindy

Reply to:

0 votes

Duo,

 

from copy tool, if I choose the source account as owner account, it will list all the layout/templates including the ones created by sender account.

and if I query list of template via API (/api/packages?type=TEMPLATE&from=1&to=100), it only target to individual account (either owner or sender based on API key). 

So is there API call which can get the full list same as what copy tool does? or in copy tool, it queries individual account and combine the result together?

 

thanks,

Cindy

 

Reply to:

0 votes

Hi Cindy,

 

Yes, in the copy tool, I first queried the API Keys of all senders, then pulled templates and layouts using each individual's API Key. If you want to do the same, you need to do the same: (1)get sender's API Key: GET /api/account/senders/{senderId}/apiKey

(2)get templates: GET /api/packages?type=TEMPLATE&from=1&to=100

 

Duo

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo,

we tried to use 'copy tool' copy 1 layout from sender account to 1 owner account. (this sender is under the owner). 

after copying, the Owner said he can't see this layout unless he clicked "show share", then he can see it. I use API call to queried the Owner account and found the layout is in the owner's account. so do you have an idea why the owner can't see it even it's already there?

 

thanks,

Cindy

 

Reply to:

0 votes

Duo,

no worry about the question i asked this morning, we tried it again and it works.

sorry for any inconvenience. 

By the way, I have a suggestion for improvement, every time when I finish one copy, i can't continue to the next, i have to close the tool and re-launch it again. if can go back to step 1 after finishing 1 copy will be much easy.

Cindy

 

Reply to:

0 votes

Duo,

nice to see the new function.

I am curious, when I put our on-prem environment with API key, it can validate the connection,  from the command prompt, it seems you all used API call, but if I need to connect to our on-prem env, I need certification/identity to connect. but it seems you don't need. I am just wondering is it secure?

thanks,

Cindy

Reply to:

0 votes

Duo,

nice to see the new function.

I am curious, when I put our on-prem environment with API key, it can validate the connection,  from the command prompt, it seems you all used API call, but if I need to connect to our on-prem env, I need certification/identity to connect. but it seems you don't need. I am just wondering is it secure?

thanks,

Cindy

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo, Thank you for this nice tool. I've started to get error when i clicked the "invite senders" button in process 2 option 1. I am using the latest version v1.5.2 Please see the error log: Fail to invite sender: <i hid the email> , Reason: {"messageKey":"error.internal.default","technical":"Unrecognized field \"kmsTenantId\" (Class com.silanis.esl.api.model.Account), not marked as ignorable\n at [Source: [email protected]; line: 1, column: 557] (through reference chain: com.silanis.esl.api.model.Sender[\"account\"]->com.silanis.esl.api.model.Account[\"kmsTenantId\"])","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"} This was working just fine last month. I believe some api changes causing the issue. Thanks, Ali

Reply to:

0 votes

Hi Ali,

 

Thanks for bringing it up to me! I can reproduce the same and seems it's caused by the different API modelling between OneSpan Sign sandbox and production environments. ("kmsTenantId" field exists in sandbox sender profile but can't be recognized in production environment) I've did some code changes and should work now, kindly download the latest version 1.5.3, and have some quick tests on sandbox environments before applying to your production account.

 

Duo

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo Liang,

We're attempting to use this to duplicate the templates in an account.  This is for the purpose of refreshing the consent forms in a template.

Curious how this applet will handle a connection failure/connection reset. I can imagine a potential implementation of the app specification where it checks the templates in the destination match up. However, we just want the templates to duplicate once.

Could you take some time to explain?

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi jchan,

 

For recovery consent form purpose, I have another Add Consent Document Tool specifically for this use case. And below are steps you may want to follow:

Step1: Create a copy of existing template

- Log onto the sender portal: https://sandbox.esignlive.com/a/login / https://apps.esignlive.com/a/login

- Navigate to Templates list

- Create a new template, and choose the existing one as a template

- Give the new template a different name (template name should be unique) and create

Step2: Execute the tool, upload your customized consent form, and choose the target template

Step3(optional): If you've removed the default consent, recover it by contacting support team ([email protected]). This is because if there's no consent form specified at the account level, even if your template has consent form, transactions created out of the template still won't inherit it.

 

Duo

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi,

I tried using the 'copy tool' to copy the layouts under a sender account from sandbox to production. Only 4 out of 32 were copied successfully, the other 28 gave the error message that the due date should be in the future shown below. From a user perspective they only are able to create a new layout template, not edit or view any details associated with them. Please let me know how to resolve this error.

Log output:  https://apps.esignlive.com/api/packages : {"messageKey":"error.validation.settingDueDate.pastDueDate","message":"Due date must be in the future.","code":400,"name":"Validation Error"}

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hello, in the transfer from sandbox to production in some templates I get this error:

null oYTMHNZ9ioopRxatP61Sd6P7kuc= : https://apps.e-signlive.com/api/packages : {"messageKey":"error.validation.invalidPageLocation","parameters":{"approvalDataName":"RW65Vy03q3w1","scaledPositionPage":20,"documentPageSize":18},"message":"Invalid position. Object placed outside of document page boundary.","code":400,"name":"Validation Error"}  

 

 

Reply to:

0 votes

Hi Malejora,

 

As the error message suggested, the signature/field is outside of the document page boundary. Are you placing all the original documents in a folder and specifying the path in the tool? Could you do a quick test without specifying the path - in which case the sandbox watermark will also be copied to the production environment.

 

Duo

Reply to: Template & Layout Copy Tool - Java version

0 votes
I am getting an error that states: "Copy Reminder or Visibility fail for template....." when trying to copy templates. what does this mean?

Reply to:

0 votes

Hi Candice,

 

I believe even with the error, the template should have been copied to the new account (this is because the copy visibility and reminder is the very latest step which won't affect the previous progress). You can have a quick check in your production sender portal and run some smoke tests to see if everything functions as expected, especially the reminder settings.

 

Back to the issue, I believe the error was introduced because of the "remove default consent form" logic (you might have noticed there's an option in the tool UI). This might occur if the destination account has default-consent removed already. I will release a new version 1.5.6 in short time and if you are interested, you could (1)delete the existing copied template (2)re-execute the tool and see if the error message went away.

 

Duo

 

 

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo,

I am trying to copy template layouts from Sandbox to PROD using v1.5.6.  I have used this many times without issue.  Today I am receiving the following error:  "Request did not success.  Error retrieving sender's api key with email....xxxxxxxxxxxxx, please try again."  Note: I am trying to copy under Option 2 - under target account owner.  I need these templates to PROD for tomorrow.  Are you able to assist?  I have raised a ticket with Support as well.

 

Reply to: Template & Layout Copy Tool - Java version

0 votes

Hi Duo,

I am trying to copy template layouts from Sandbox to PROD using v1.5.6.  I have used this many times without issue.  Today I am receiving the following error:  "Request did not success.  Error retrieving sender's api key with email....xxxxxxxxxxxxx, please try again."  Note: I am trying to copy under Option 2 - under target account owner.  I need these templates to PROD for tomorrow.  Are you able to assist?  I have raised a ticket with Support as well.

 

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off