0
votes

I have a custom button that explicitly needs to sort a hard coded recipient with a specific DocuSign role and Sort Order and at the same time load in all contact roles from the related opportunity.

The code below brings in all contact roles (good) but the role of the 'Any Recipient' (which is not a (Salesforce contact role) is defined as 'Customer' (bad) when it should be defined as 'Legal'.

In the (Salesforce) DocuSign Admin | Envelopes settings the roles are defined as 'Customer' and 'Legal' where customer is the first entry and legal is the second. It appears that the sorting of the recipients is based on the the first entry in DocuSign roles because when I make the first entry 'Legal' and second entry 'Customer' I get the anticipated results.

CRL='[email protected];FirstName~Any;LastName~Signer;Role~Signer 2;RoutingOrder~2,LoadDefaultContacts~1';

When using the code below with the DocuSign role entries of Customer (1st) and Legal (2nd) the mappings are working but none of the contact roles are added (bad) as recipients just the entry defined in CRL (good) with the correct DocuSign role - Legal. The LoadDefaultContacts~1 is not respected since none are brought in as recipients.

CRL='[email protected];FirstName~Any;LastName~Signer;Role~Signer 2;RoutingOrder~2,LoadDefaultContacts~1'; CCRM='Signer 1~Customer;Signer 2~Legal';
CCTM='Signer 1~Signer;Signer 2~Signer';
How do I bring in all contact roles but explicitly define the DocuSign role for the CRL recipient?

1

1 Answers

1
votes

Keep in mind the CCRM parameter is used to map a Salesforce role to a DocuSign Role. In this scenario, a "ContactRole to DocuSign Template Role".

Your current button logic is saying "Only pull contacts with the contact role of Signer 1 and Signer 2".

CCRM is typically irrelevant if you're not using DocuSign Server Templates. To answer your question:

1. You would need to reference all the Contact Roles within CCRM and CCTM

2. All DocuSign roles must be different because you can't merge two contacts with the same role

My example below references all the Salesforce default contact roles:

CES='Stackoverflow Example';

CRL='FirstName~Any;LastName~Signer;Email~{!URLENCODE("[email protected]")};RoutingOrder~2;Role~Signer 2,LoadDefaultContacts~1';

CCRM='Decision Maker~Customer;Signer 2~Legal;Business User~Customer2;Economic Buyer~Customer3;Economic Decision Maker~Customer4;Evaluator~Customer5;Executive Sponsor~Customer6;Influencer~Customer7;Technical Buyer~Customer8;Other~Customer9';

CCTM='Decision Maker~Signer;Signer 2~Signer;Business User~Signer;Economic Buyer~Signer;Economic Decision Maker~Signer;Evaluator~Signer;Executive Sponsor~Signer;Influencer~Signer;Technical Buyer~Signer;Other~Signer';

enter image description here

enter image description here