Docusign Rest API: Not able to associate docusign with salesforce record












0














I am in salesforce and when say Opportunity record is created, I am using DocuSign rest api to send the document for signature which includes information from salesforce record. I am creating envelope in apex code and sending to customer using email. I intend to associate the envelope(Docusign status related list) to that particular salesforce record.



I am able to send the envelope in email successfully from apex code but not able to relate it to the source salesforce record.



Below is my json which I am using.



{
"templateId":"48fe922d-f395-47d8-97d4-d0047c3c8d18",
"status":"sent",
"emailSubject":"Send Envelope via REST from Salesforce",
"customFields":
{
"textCustomFields":
[{"value":"0062v000019uceT","show":"false","name":"Opportunity"}]
}
}


FYI, I am bit confused with value(Opportunity) for name property in above json if it is correct. I tried giving different value(DSFSSourceObjectId || field from docusign status object which is lookup to parent opportunity object) as well it did not work.



Additional Info



I have installed docusign for salesforce managed package. With this one additional observation, there are two types of account with docusign.




  1. 30 day free trial account with which docusign Connect works
    automatically and APIs communication do not. This is the account
    which is created when we install and connect docusign to salesforce
    and reverse under admin tab.

  2. Developer Account with which Docusign Connect do not work but api communications can happen.


If my above statements are correct is it true to say that Docusign connect and Docusign API will not work together? If yes, the envelope created and sent using docusignAPI in apex will not automatically update the docusign status back in salesforce as it happens with docusign connect for salesforce? Do we need to poll another api at regular intervals to check the docusign status and update in salesfoce? Or can it be done in standard way by using docusign connect and API together? Is it something i am not able to do because of free trial version and will be able to do in live org?



Please clarify.










share|improve this question
























  • Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
    – Larry K
    Dec 26 '18 at 19:25










  • @LarryK Thank you. I have made the edit to question. Please let me know if not clear
    – Vikash Tiwary
    Dec 27 '18 at 12:05












  • I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
    – Vikash Tiwary
    Dec 27 '18 at 17:10
















0














I am in salesforce and when say Opportunity record is created, I am using DocuSign rest api to send the document for signature which includes information from salesforce record. I am creating envelope in apex code and sending to customer using email. I intend to associate the envelope(Docusign status related list) to that particular salesforce record.



I am able to send the envelope in email successfully from apex code but not able to relate it to the source salesforce record.



Below is my json which I am using.



{
"templateId":"48fe922d-f395-47d8-97d4-d0047c3c8d18",
"status":"sent",
"emailSubject":"Send Envelope via REST from Salesforce",
"customFields":
{
"textCustomFields":
[{"value":"0062v000019uceT","show":"false","name":"Opportunity"}]
}
}


FYI, I am bit confused with value(Opportunity) for name property in above json if it is correct. I tried giving different value(DSFSSourceObjectId || field from docusign status object which is lookup to parent opportunity object) as well it did not work.



Additional Info



I have installed docusign for salesforce managed package. With this one additional observation, there are two types of account with docusign.




  1. 30 day free trial account with which docusign Connect works
    automatically and APIs communication do not. This is the account
    which is created when we install and connect docusign to salesforce
    and reverse under admin tab.

  2. Developer Account with which Docusign Connect do not work but api communications can happen.


If my above statements are correct is it true to say that Docusign connect and Docusign API will not work together? If yes, the envelope created and sent using docusignAPI in apex will not automatically update the docusign status back in salesforce as it happens with docusign connect for salesforce? Do we need to poll another api at regular intervals to check the docusign status and update in salesfoce? Or can it be done in standard way by using docusign connect and API together? Is it something i am not able to do because of free trial version and will be able to do in live org?



Please clarify.










share|improve this question
























  • Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
    – Larry K
    Dec 26 '18 at 19:25










  • @LarryK Thank you. I have made the edit to question. Please let me know if not clear
    – Vikash Tiwary
    Dec 27 '18 at 12:05












  • I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
    – Vikash Tiwary
    Dec 27 '18 at 17:10














0












0








0







I am in salesforce and when say Opportunity record is created, I am using DocuSign rest api to send the document for signature which includes information from salesforce record. I am creating envelope in apex code and sending to customer using email. I intend to associate the envelope(Docusign status related list) to that particular salesforce record.



I am able to send the envelope in email successfully from apex code but not able to relate it to the source salesforce record.



Below is my json which I am using.



{
"templateId":"48fe922d-f395-47d8-97d4-d0047c3c8d18",
"status":"sent",
"emailSubject":"Send Envelope via REST from Salesforce",
"customFields":
{
"textCustomFields":
[{"value":"0062v000019uceT","show":"false","name":"Opportunity"}]
}
}


FYI, I am bit confused with value(Opportunity) for name property in above json if it is correct. I tried giving different value(DSFSSourceObjectId || field from docusign status object which is lookup to parent opportunity object) as well it did not work.



Additional Info



I have installed docusign for salesforce managed package. With this one additional observation, there are two types of account with docusign.




  1. 30 day free trial account with which docusign Connect works
    automatically and APIs communication do not. This is the account
    which is created when we install and connect docusign to salesforce
    and reverse under admin tab.

  2. Developer Account with which Docusign Connect do not work but api communications can happen.


If my above statements are correct is it true to say that Docusign connect and Docusign API will not work together? If yes, the envelope created and sent using docusignAPI in apex will not automatically update the docusign status back in salesforce as it happens with docusign connect for salesforce? Do we need to poll another api at regular intervals to check the docusign status and update in salesfoce? Or can it be done in standard way by using docusign connect and API together? Is it something i am not able to do because of free trial version and will be able to do in live org?



Please clarify.










share|improve this question















I am in salesforce and when say Opportunity record is created, I am using DocuSign rest api to send the document for signature which includes information from salesforce record. I am creating envelope in apex code and sending to customer using email. I intend to associate the envelope(Docusign status related list) to that particular salesforce record.



I am able to send the envelope in email successfully from apex code but not able to relate it to the source salesforce record.



Below is my json which I am using.



{
"templateId":"48fe922d-f395-47d8-97d4-d0047c3c8d18",
"status":"sent",
"emailSubject":"Send Envelope via REST from Salesforce",
"customFields":
{
"textCustomFields":
[{"value":"0062v000019uceT","show":"false","name":"Opportunity"}]
}
}


FYI, I am bit confused with value(Opportunity) for name property in above json if it is correct. I tried giving different value(DSFSSourceObjectId || field from docusign status object which is lookup to parent opportunity object) as well it did not work.



Additional Info



I have installed docusign for salesforce managed package. With this one additional observation, there are two types of account with docusign.




  1. 30 day free trial account with which docusign Connect works
    automatically and APIs communication do not. This is the account
    which is created when we install and connect docusign to salesforce
    and reverse under admin tab.

  2. Developer Account with which Docusign Connect do not work but api communications can happen.


If my above statements are correct is it true to say that Docusign connect and Docusign API will not work together? If yes, the envelope created and sent using docusignAPI in apex will not automatically update the docusign status back in salesforce as it happens with docusign connect for salesforce? Do we need to poll another api at regular intervals to check the docusign status and update in salesfoce? Or can it be done in standard way by using docusign connect and API together? Is it something i am not able to do because of free trial version and will be able to do in live org?



Please clarify.







salesforce docusignapi docusign






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 27 '18 at 15:17

























asked Dec 26 '18 at 18:28









Vikash Tiwary

12




12












  • Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
    – Larry K
    Dec 26 '18 at 19:25










  • @LarryK Thank you. I have made the edit to question. Please let me know if not clear
    – Vikash Tiwary
    Dec 27 '18 at 12:05












  • I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
    – Vikash Tiwary
    Dec 27 '18 at 17:10


















  • Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
    – Larry K
    Dec 26 '18 at 19:25










  • @LarryK Thank you. I have made the edit to question. Please let me know if not clear
    – Vikash Tiwary
    Dec 27 '18 at 12:05












  • I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
    – Vikash Tiwary
    Dec 27 '18 at 17:10
















Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
– Larry K
Dec 26 '18 at 19:25




Your json looks fine--you are adding metadata to the DocuSign envelope. From where are you having trouble looking up the envelope? What have you tried? Please EDIT your question to show how you are trying to look up the envelope. Also, what does OOTB mean?
– Larry K
Dec 26 '18 at 19:25












@LarryK Thank you. I have made the edit to question. Please let me know if not clear
– Vikash Tiwary
Dec 27 '18 at 12:05






@LarryK Thank you. I have made the edit to question. Please let me know if not clear
– Vikash Tiwary
Dec 27 '18 at 12:05














I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
– Vikash Tiwary
Dec 27 '18 at 17:10




I just uninstalled and reinstalled the package and established the docusign connect with developer sandbox. With this achieved one milestone where Docusign Status records are now being pushed to salesforce after creating and sending envelope using API. Still the open issue is DocusigStatus record is not getting associated to parent opportunity record. Any help related to this?
– Vikash Tiwary
Dec 27 '18 at 17:10












1 Answer
1






active

oldest

votes


















0














I was able to resolve this by providing different value for name property in request json.
"Name":"##SFOpportunity"






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53935707%2fdocusign-rest-api-not-able-to-associate-docusign-with-salesforce-record%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I was able to resolve this by providing different value for name property in request json.
    "Name":"##SFOpportunity"






    share|improve this answer


























      0














      I was able to resolve this by providing different value for name property in request json.
      "Name":"##SFOpportunity"






      share|improve this answer
























        0












        0








        0






        I was able to resolve this by providing different value for name property in request json.
        "Name":"##SFOpportunity"






        share|improve this answer












        I was able to resolve this by providing different value for name property in request json.
        "Name":"##SFOpportunity"







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 27 '18 at 18:17









        Vikash Tiwary

        12




        12






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53935707%2fdocusign-rest-api-not-able-to-associate-docusign-with-salesforce-record%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas