docusignapi - Email notification to user is not sent when ClientUserId is provided -


i'm trying create envelope template uploaded account. using following code that:

public static void main(string[] args) throws apiexception {     // enter docusign credentials     string username = "my-user-name";     string password = "my-password";     string integratorkey = "my-integrator-key";      // production environment update "www.docusign.net/restapi"     string baseurl = "https://demo.docusign.net/restapi";      // initialize api client desired environment     apiclient apiclient = new apiclient();     apiclient.setbasepath(baseurl);      // create json formatted auth header     string creds = "{\"username\":\"" + username + "\",\"password\":\"" + password + "\",\"integratorkey\":\"" + integratorkey + "\"}";     apiclient.adddefaultheader("x-docusign-authentication", creds);      // assign api client configuration object     configuration.setdefaultapiclient(apiclient);      //////////////////////////////// login start     // login call available off authenticationapi     authenticationapi authapi = new authenticationapi();      // login has optional parameters can set     authenticationapi.loginoptions loginops = authapi.new loginoptions();     loginops.setapipassword("true");     loginops.setincludeaccountidguid("true");     logininformation logininfo = authapi.login(loginops);      // note given user may member of multiple accounts     list<loginaccount> loginaccounts = logininfo.getloginaccounts();      system.out.println("logininformation: " + loginaccounts);     // use |accountid| retrieved through login api create envelope     string accountid = loginaccounts.get(0).getaccountid();     /////////////////////////////////////// login end      ////////////////////////////////////// create envelope start     // create new envelope object manage signature request through     envelopedefinition envdef = new envelopedefinition();     envdef.setemailsubject("hey! sign following document");      // assign template information including id , role(s)     envdef.settemplateid("ebbe20e3-1c2e-4696-a0c4-41269bf54aeb");      // create template role valid templateid , rolename , assign signer info     templaterole trole = new templaterole();     trole.setrolename("client");     string name = "jake";     string email = "someemail@goes.here";     trole.setname(name);     trole.setemail(email);     trole.setclientuserid("someclientuuid");      // create list of template roles , add our newly created role     list<templaterole> templateroleslist = new arraylist<>();     templateroleslist.add(trole);      tabs tabs = new tabs();     text clientidfield = new text();     clientidfield.settablabel("customerid");     clientidfield.setvalue("i changed text api! works!");     list<text> textlist = new arraylist<>();     textlist.add(clientidfield);     tabs.settexttabs(textlist);     trole.settabs(tabs);      // assign template role(s) envelope     envdef.settemplateroles(templateroleslist);      // send envelope setting |status| "sent". save draft set "created"     envdef.setstatus("sent");      // use |accountid| retrieved through login api create envelope      // instantiate new envelopesapi object     envelopesapi envelopesapi = new envelopesapi();      // call createenvelope() api     envelopesummary envelopesummary = envelopesapi.createenvelope(accountid, envdef);      system.out.println("envelopesummary: " + envelopesummary);     ///////////////////////////////////// create envelope end      string envelopeid = envelopesummary.getenvelopeid();      //////////////////////////////////////// create recipient view     // use |accountid| retrieved through login api     // instantiate new envelopesapi object     // set url want recipient go once done signing     recipientviewrequest returnurl = new recipientviewrequest();     returnurl.setreturnurl("https://www.docusign.com/devcenter");     returnurl.setauthenticationmethod("email");      // recipient information must match embedded recipient info provided in step #2     returnurl.setemail(email);     returnurl.setusername(name);     returnurl.setclientuserid("someclientuuid");      // call createrecipientview api navigate url start signing session     viewurl recipientview = envelopesapi.createrecipientview(accountid, envelopeid, returnurl);      system.out.println("viewurl: " + recipientview);     //////////////////////////////////////// create recipient view } 

and noticed strange thing - when provide clientuserid field templaterole, while creating envelope template - email notification sign document not sent user. when remove field - email sent successfully. problem need clientuserid in templaterole able generate viewurl use in application.

so bug or feature, notification not sent provided clientuserid in templaterole? did not found documentation on official site.

when clientuserid specified recipient considered embedded recipient. default remote recipients receive email notifications.

if want embedded recipients receive email notifications set embeddedrecipientstarturl property.

trole.setembeddedrecipientstarturl("sign_at_docusign") 

see answer more information

official documentation


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -