Placeholder Update
Thursday, August 9, 2018 at 09:30amHello,
I have already a template with 2 placeholders called Signer1 and Signer2.
When creating a document packge from the template, how I can update these placeholders to add the email address and first and last name for the signers.
Do you have such an example? Already my placeholder created inside a template in sandbox.
Thanks
Reply to: Placeholder Update
Thursday, August 9, 2018 at 11:39amDocumentPackage package_old = eslClient.GetPackage(new PackageId(packageId)); string id1 = package_old.Placeholders.ElementAt(0).Id; string id2 = package_old.Placeholders.ElementAt(1).Id; or string id1 = ""; string id2 = ""; foreach (var signer in package_old.Placeholders) { if (signer.PlaceholderName == "Signer1") { id1 = signer.Id; } else if (signer.PlaceholderName == "Signer2") { id2 = signer.Id; } }If you create your template through WebUI, the only thing to locate the specific signer is the placeHolderName I believe. So if you can, still suggest to use SDK to create the template so that you can assign your placeholder ID already. DuoReply to: Placeholder Update
Thursday, August 9, 2018 at 09:49amPOST /api/packages/{template ID}/clone { "name":"Package created from template through REST API", "status":"SENT", "roles":[ { "id":"role ID for signer1", "type":"SIGNER", "signers":[ { "id":"signer1ID", "firstName":"1.firstname", "lastName":"1.lastname", "email":"[email protected]" } ], "name":"Role1 Name" }, { "id":"role ID for signer2", "type":"SIGNER", "signers":[ { "id":"signer2ID", "firstName":"2.firstname", "lastName":"2.lastname", "email":"[email protected]" } ], "name":"Role2 Name" } ] }From my experience, if you create the template from WebUI, your roles' IDs will be generated randomly, so I'd suggest to create templates through calling API/SDK. Hope this could help you! DuoReply to: Placeholder Update
Thursday, August 9, 2018 at 10:26amReply to: Placeholder Update
Thursday, August 9, 2018 at 11:20amString packageId = "zS4Ja624YHq3XZMgEWTURNP_dfk="; DocumentPackage package = PackageBuilder.NewPackageNamed("test from template") .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]").WithFirstName("1.firstname").WithLastName("1.lastname").WithCustomId("fd651a15-b2f4-4937-bd44-f96e3a60f076").Build()) .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]").WithFirstName("2.firstname").WithLastName("2.lastname").WithCustomId("e399a1bf-1417-49a0-b4e4-18088f4692ff").Build()) .Build(); PackageId newPackageId = eslClient.CreatePackageFromTemplate(new PackageId(packageId),package);You just need to create a new package object with signers you want to replace the placeholders and other infos you want to replace from the template and callCreatePackageFromTemplate()function. The request payload is almost the same as above JSON. DuoReply to: Placeholder Update
Thursday, August 9, 2018 at 11:25amReply to: Placeholder Update
Friday, August 10, 2018 at 04:05am