demouser

Get a list of documents for a group

0 votes
I am trying to accomplish the following. Please let me know which SDK classes to use: - Get a list of all documents/templates uploaded onto a group's library (From all senders in the group). Both document ids and names - how do I include a document id(template id) which is in group's library in my package(without actually uploading the document while creating the package. I need to include a pre existing document id) - Block sender's in one group from seeing inbox/drafts/library of another group in my account. - Give ability for a sender in a group to be able to upload a document. After upload is complete, connect user to esignlive display page where they can only edit template and add tags and meta data but not be able to send it from there. Thanks

Reply to: Get a list of documents for a group

0 votes
Hey, Let me look into these for you. I will get an answer for your questions asap.
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
- What I can suggest you to do here is to first use the GroupService to retrieve the email of each group member (e.g. senders) in your groups.
List myGroups = eslClient.getGroupService().getMyGroups();

for (Group group : myGroups) {
             List members = group.getMembers();
             for(GroupMember member : members){
                          System.out.println(member.getEmail());
             }
}
Then, you can use the ReportService to get the completion report. In it, you can query against the list of group members to retrieve a list of packages in each status (e.g. completed, draft, sent, etc.). You can also retrieve the list of documents in each package from the completion report, as shown below.
// Download the completion report for all senders
        CompletionReport sdkCompletionReport = eslClient.getReportService().downloadCompletionReport(status, from, to);
        
        if (sdkCompletionReport == null) {
        	System.out.println("\nNo packages in " + status.toString() + " folder");
        } else {
        	// Display package id and name of packages in DRAFT from sender
            System.out.println();
            for(SenderCompletionReport senderCompletionReport : sdkCompletionReport.getSenders()) {
                System.out.print("Sender: " + senderCompletionReport.getSender().getEmail());
                System.out.println(" has " + senderCompletionReport.getPackages().size() + " packages in " + status.toString());
     
                for (PackageCompletionReport packageCompletionReport : senderCompletionReport.getPackages()) {
                    System.out.println(packageCompletionReport.getId() + " , " + packageCompletionReport.getName() + " , Sender : " + eslClient.getPackage(new  PackageId(packageCompletionReport.getId())).getSenderInfo().getEmail());
                    List documents = packageCompletionReport.getDocuments();
                    for(DocumentsCompletionReport document : documents) {
                    	System.out.println(document.getName());
                    }
                }
            }
        }  
Unfortunately, there is no way to retrieve a list of templates for each sender. - When creating your package, you can store any information you wish in the document attributes. Example below:
DocumentPackage test = PackageBuilder.newPackageNamed("test")
				.withAttributes(DocumentPackageAttributesBuilder.newDocumentPackageAttributes()
						.withAttribute("key1", "document1"))
				.build();
- I'm not really sure what you mean here. Through the web portal, senders can only see packages created by them and no one elses. This also holds true for the main account holder. Are you experiencing another behavior? - Unfortunately, that is not currently possible. Once you give your user access to the designer view (e.g. edit package, place signatures), he/she will always have the ability to send the package.
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
Hi Haris, Thanks for the detailed response. I will try to explain my use case better . 1. I want to have one main Admin user and multiple groups and multiple senders in each group. Each member of the group be able to view all the templates uploaded by other members in their group. 2. Initially, I just want to connect to user's Esl (eSignLive) account and get a list of all the templates that he/she can use :- For this, I was thinking, I could use API key and group name and get list of all available templates and their ids. Looks like, I would need to create a package in order to get a list of templates. Also, from your reply above I cannot get list of templates associated with a group. Display this list to the user. 3. User selects an existing template or uploads a new one. 5. User opts to edit a template/modify tags etc., and save it but not send it by connecting to esign live designer (via an iframe or link which connects using single sign on). From your reply above looks like it is not possible. Is there any other way of accomplishing this? Thanks

Reply to: Get a list of documents for a group

0 votes
Hey, Groups in eSignLive are only for signing purposes. In other words, you can assign a signature to a group and any member in the group can sign the document. Hence, you can't create a template per group or get a list of templates per group. There is no special functionality per say between members in a group other than signing purposes. What you can do is set the visibility when creating templates/packages. You can set the visibility element to either ACCOUNT or to SENDER depending on if you want the new package to be visible account wide, or just to the sender. The default setting is ACCOUNT.
DocumentPackage test = PackageBuilder.newPackageNamed("Example package")
				.withSenderInfo(SenderInfoBuilder.newSenderInfo("[email protected]"))
				.withVisibility(Visibility.ACCOUNT)
				.build();
PackageId packageId = eslClient.getTemplateService().createTemplate(test);
Finally, as for the ability to block a sender to send a package, you are actually able to do so. You can send a request to support ([email protected]) to remove the send button in the designer view for your senders. This way, when your senders will not be able to send the package from the designer view once your sender has finished editing the package. Here is also a list of the changes you can make to the designer view: http://docs.esignlive.com/content/c_esignlive_integrator_s_guide/rest_api/designer.htm Hope this helps :)
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
Thanks for the response Haris. I will try your suggessions

Reply to: Get a list of documents for a group

0 votes
Hi In the example page (link you included in the reply) lists only rest api to get the designer view option settings already available to the user. How do I reset them and post them? are there any post/put calls available to do the same? Thank you

Reply to: Get a list of documents for a group

0 votes
As per the documentation, it appears now that the designer view is now configurable through the REST API. I wasn't aware of this. I will look into this and get back to you :)
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
Thank you Haris, for the quick response. Could you please point me to the documentation. I had downloaded the sdk code but some explanation/documentation would help me get to the right function quickly :-)

Reply to: Get a list of documents for a group

0 votes
The documentation I was mentioning is essentially the same as the one I posted previously (http://docs.esignlive.com/content/c_integrator_s_guide/rest_api/designer.htm?Highlight=designer). It says that the designer view is now configurable through the REST API but doesn't show the exact call. That's why I mentioned that I will look into it for you :)
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
For now, you can send support a request to change the designer view. [email protected]
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
final update: the documentation is in fact incorrect. The designer view cannot be modified through the REST API. You can only retrieve the current settings. Any modification will have to be done through support. I apologize for the confusion.
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
Thank you Haris, for the quick response. I will contact support.

Reply to: Get a list of documents for a group

0 votes
My pleasure :)
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
Haris, I had the esign support turn off the send option for senders. But, that turns off send capability from web as well as from api. I was trying to accomplish the following : - Have few senders be able to upload/edit/save document via the embedded designer view url. - Admin/manager can later access those documents and be able to send them using the api. Since admin/manager cannot view the packages of a sender even when a sender gives 'delegation' access to the admin user, now there is no way of sending packages once they have been created and saved as draft. Is there a way this can be accomplished. Thanks

Reply to: Get a list of documents for a group

0 votes
Turning off the "send" button from the designer view does not affect in any way the ability to send the package through the api. What you can do is have your own custom "send" button outside the iframe for your admin/manager that makes an api call to send the package and close the iframe. You will have to keep track on your side which senders can see this button.
Haris Haidary OneSpan Technical Consultant

Reply to: Get a list of documents for a group

0 votes
This may already have been resolved but just in case, I had to be pretty explicit with my instructions to the support team. You can define multiple "profile"s so the first time I asked support to make changes, they edited my only profile, which was called "default". My next request was more explicit: Please add a second profile named "demo" to my Designer settings. I can now open a Designer page with either the default settings or my new "demo" profile by adding ?profile=demo to the URL. Complete URL for the src attribute of my iframe:
https://sandbox.esignlive.com/auth?authenticationToken=&target=https://sandbox.esignlive.com/designer/?profile=demo

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