I am very new to DocuSign and trying to create a proof-of-concept for integrating DocuSign with our own Managed Package for Salesforce. I understand how I can create an envelope, how to create a document based on a template, how to fill it with the data of my Salesforce record and also how to send it.
My issue though is that the data which needs to be filled into the DocuSign document is not entirely saved within the specified record. Some data such as certain KPIs are loaded from AWS but belong to the record you're looking at. To me it seems that when creating an envelope, you need to specify the record-id of the record you're trying to pull data from.
Is it possible to extend that by not specifying a record-id but rather an Apex Object or List for example?
Related
I am new to salesforce and I am trying working on an integration, where I need to send object schema to a third party system. I was able to create a simple apex class to create a JSON message and send it to an end point.
I am trying to figure out how to automate this, meaning.. I want to trigger this apex class when an new field is created or an existing field is modified in a specific custom object.
Created an apex class to generate a JSON with the list of custom fields in the object and their properties. I want to be able to trigger this automatically when object is updated
There's a "you're doing it wrong" element to it. It's metadata, not data, not so easy to trigger from inside Apex. Salesforce has mechanisms for easy pulling of this info, not pushing. External system can call "describes" with If-Modified-Since, querying EntityDefinition, FieldDefinition with Tooling API...
Even if you pull it off - technically it'll be useless to external system. When you created new field but didn't modify Profiles/Permission Sets yet - attempts to query it will fail. Same error is thrown for genuine syntax errors in SOQL and for "yes, we do have such field but you're not authorised to see it".
If you really want to continue down this path you can look into scheduling Apex (say run every 5 minutes, will that be good enough? Class to check EntityDefinition or Setup Audit Trail and send the message if needed)
We are trying to create a solution that would allow us to dynamically create an envelope using pre-defined DocuSign templates. Meaning that the templates will be pre-built, but depending on certain field values in Salesforce, we could programmatically (dynamically) create an envelope so that:
In one scenario, an envelope will be created with documents A and B
In another scenario, an envelope will be created with documents A, B, and C
In a third scenario, an envelope will be created with only document C
Our requirement being that the selection and creation of this envelope is not manually done by the user, but programmatically and dependent on Salesforce field values from a custom object.
We're beginning to explore the newly released Apex Toolkit, and we'd greatly appreciate a point in the right direction & some insight from the devs behind the Docusign for Salesforce - Core package.
Thank you!
This is one of the potent use cases for us building the Apex toolkit. The scenario outlined above can be definitely achieved via the pre-built envelope creation methods exposed as a part of the Apex toolkit. Please go through the sample code provided in this link below.
https://developers.docusign.com/salesforce/code-examples/salesforce-sending-signing-template
Ideally you should be able to invoke this and tie it to any custom logic that references Apex in your Salesforce instance. Do let us know if you have any specific question regarding the same and we will assist you.
Sample example:
Account Stage set to XYZ
Trigger on Account for after update
Incorporates a future method with callout=true and this future method will call the Apex toolkit methods for creating envelopes
We have a situation where some of our DocuSign documents do not get signed within the DocuSign system. We have someone that manages these "paper signatures" and then uploads them to DocuSign which connects to Salesforce.
We need to relate these envelopes to either an Opportunity or a Quote to get them to populate fields on these records.
When creatng the envelope, we have the option to "Relate to Salesforce" objects: Leads, Contracts, Opportunities, etc. We tried to use Opportunities and then use the Search to find the Opportunity to attach it to. However, if the Opportunity is in a Closed status (which it is 99% of the time), it will not show up in the search to select.
We could also attach to a Quote, however, there is no option on Salesforce Connect to relate to this object.
Does anyone know a workaround for this that will still allow our person to upload through DS and connect to the appropriate record?
Thanks,
Shannon
It will not unfortunately work with closed ops or quotes.
The only way I can think to do it would be to add a non-required envelope custom field in your account called ##SFOpportunity and when uploading that wet signed doc into DocuSign add the objectID as that envelope custom field (it's how the manage package relates back to proper objects when sending from SFDC).
It's a bit of manual process, but it should work.
I have a specific field that I am trying to find. The salesforce instance I am in has hundreds of tables/objects so I can't look through them manually.
I also only have read only access, so I can't run an APEX script or create objects. I am using an API to access the database, and store the data outside of salesforce.
What I need is to find the object/table that this field is stored in so I can write an SOQL query to get the field's values. Any ideas?
Easiest way is with Workbench.
I am using Powerforms as an approach to get signatures using the DocuSign. What I want is to send some part of the data back to Salesforce from the PDF while the user signs it. I created custom fields on the PDF, related them to Salesforce, checked the writeback and allow sender to edit boxes but the data hasn't got back to SF yet. Any help?
When you send from Salesforce, there is information passed to document (such as the SourceID and Source Object Type), that DocuSign Connect will attempt to match to a record to process a request to push the data back into Salesforce.
If you are using a PowerForm, you would have to pass along similiar data and setup DocuSign Connect correctly for it to relate the data back to a Salesforce record.
This is something that is doable with customization, but not functional out of the box.