2

I want to integrate Salesforce with Docusign. However, I'm struggling with something as simple as the signing order. For testing purposes, I made my custom button as simple as possible:

{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")} 

//********* Option Declarations (Do not modify )*********// 
var RC = '', RSL='',  RSRO='', RROS='', CCRM='',
    CCTM='', CCNM='', CRCL='', CRL='',  OCO='',
    DST='',  LA='',   CEM='',  CES='',  STB='',
    SSB='',  SES='',  SEM='',  SRS='',  SCS ='', RES=''; 
//*************************************************// 

// Docs: https://support.docusign.com/guides/dfs-admin-guide-customize-envelope-contacts

// Adding Notes & Attachments 
LA='0'; 

// Custom Recipient Contact List 
var 
  recip1 = "Email~recip1@acme.com;" +
           "LastName~Recip1;" + 
           "RoutingOrder~2;",
  recip2 = "Email~recip2@acme.com;" +
           "LastName~Recip2;" +
           "RoutingOrder~1"; 

CRL = recip1 + "," + recip2;

//Custom Envelop from Docusign 
DST='9c448207-13ed-4933-8217-89a5dc5bec02'; 

//********* Page Callout (Do not modify) *********// 
window.location.href =
  "/apex/dsfs__DocuSign_CreateEnvelope?DSEID=0&"
  +"SourceID={!Opportunity.Id}&RC="+RC
  +"&RSL="+RSL+"&RSRO="+RSRO+"&RROS="+RROS+"&CCRM="+CCRM
  +"&CCTM="+CCTM+"&CRCL="+CRCL+"&CRL="+CRL+"&OCO="+OCO
  +"&DST="+DST+"&CCNM="+CCNM+"&LA="+LA+"&CEM="+CEM+"&CES="+CES
  +"&SRS="+SRS+"&STB="+STB+"&SSB="+SSB+"&SES="+SES
  +"&SEM="+SEM+"&SRS="+SRS+"&SCS="+SCS+"&RES="+RES;
//*******************************************//

As shown in Screenshot 1, the template is correctly selected and the signing order for the recipients is respected:

Screenshot 1

However, clicking Send Now will ignore the signing order. If I click Next and then Edit Recipients in the next screen, one can see that the signing order is ignored:

Screenshot 2

Additionally predefining the signing order in the template is not a viable solution either - my number of recipients will change dependent on the Salesforce record I am on. Also, I noticed issues with custom anchor tags when predefining recipients in a template. E.g. \s2\ will be merged for Signer 2, but \tbx_2_title\ will be merged for Signer 1.

Edit: It seems that when I do not use template preselection, the signing order is preserved. But requiring the user to manually select the template and adding the mergefields manually is not a viable solution...

1

The standard anchor tags are being assigned by the order you have the roles in your Salesforce DocuSign Admin

Example:

Signer 1

Signer 2

Signer 3

However, the custom anchor tag that I created in DocuSign are being assigned by how I have the roles set up in the template

Example:

Signer 2

Signer 3

Signer 1

Apparently, DocuSign is working on fixing this. Not relying on the automatic anchor text placing and instead manually placing them on the layout fixed it for me

-1

Try switching places of signers inside CRL variable.

Example:

CRL = recip2 + "," + recip1;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.