Electronic Document Management
Overview
Using the Electronic Documents feature, you can email documents (such as Sales Order Confirmation, Sales Invoice, Purchase Order, and any PDF documents created against any object) as PDF attachments from GoldFinch. These emails can be sent manually or scheduled at certain times throughout the day. This document will help you to configure this feature.
Salesforce Setup
From Setup, search for Deliverability.
Set the access level to "All email".
Setup Electronic Documents
From GoldFinch Setup, create a new Electronic Document.
Document Details
Define the PDF documents that will be attached to emails.
Field Name | Definition |
---|---|
Name | Name of the Document |
Activate | Make the document active |
sObject Type | The object of the document record |
VisualForce Page | This is the document that will be rendered as PDF and attached to the email. You will find a list of available PDF documents (out-of-box or custom PDFs) in the dropdown. (Note: If the sObject Type is Account, you will have to enter the VisualForce Page on the list view). |
Account Field | The Account field that should be used to receive the email. The Account will have related “Electronic Document Setup” records and recipient email addresses. |
Default Recipient Field | You can bypass the Electronic Document Recipient Setup by entering an API value here for a contact field such as “GFERP__Ordering_Contact__c” on Sales Order or Purchase Order or “GFERP__Billing_Contact__c” on Sales Invoice. |
Criteria Field | Optional. You can use a checkbox field on the document record to control if the document is ready to be sent out when scheduling email jobs. This checkbox field can be added as a custom field. Note: If you want to check the criteria field when manually sending a document, you need to create a custom Send Document button and check the condition in the code. |
Field to Update | Recommended. You can use another checkbox field on to record what documents have been sent out. GoldFinch will check this box after the document is sent. This field can work together with the Criteria Field to prevent GoldFinch from sending the document again. This checkbox field can be added as a custom field. |
Filename | You can use generic names such as SalesOrder.pdf, or SalesInvoice.pdf. You can also include fields from the document record. Example: The name of the Account for a Sales Invoice would be {!Name} |
Save as Activity | Check this field if you want Salesforce to capture the email in the Activities. |
Batch Process Size | Specify the number of the emails to process in a batch. Suggested value = 10 |
Enable Preview | Control whether GoldFinch should display the document on the Send Document page when the Send Document button is clicked on the document record. |
Preview Width | Leave default as 800 |
Preview Height | Leave default as 1000 |
Email Template
Define the Email body.
Field Name | Definition |
---|---|
Use Organization-Wide Email | Specify the from address. When it is “None”, emails will be sent using the logged-in user’s email address. Else, select a Salesforce Organization-Wide Address to use. |
Email Subject | Use {!} notation to include fields from the document record. |
Html Format | Yes for Html, No for plain text. |
Email Body | Use {!} notation to include fields from the document record. |
Schedule Details
Here you can schedule the electronic documents to send automatically. Test the documents manually before turning on the scheduler.
To start or stop the schedule, simply go to the electronic document (in view mode) and click the Schedule/Unschedule button.
Apex Job Status
This section displays job execution information only when the job is scheduled.
Assign Electronic Documents to GoldFinch Accounts
After setting up electronic documents, assign them to the GoldFinch Accounts that will be receiving emails.
Go to an Account, and from the related list, find Electronic Document Setup.
Click New. Choose an Electronic Document you have set up, and enter cc and bcc if applicable. Save the record.
Effective Date is Optional. This is used to stage multiple or time-based electronic document templates. When the Effective Date is specified, GoldFinch can only send documents if they are created on or after the effective date.
Configure “To” Recipients
There are multiple ways of setting up “To” Recipients
Use the Default Recipient Field in the Electronic Document by entering an API value of a contact field. For example, when configuring Electronic Document for the Sales Order object, enter “GFERP__Ordering_Contact__c.” Order Contact populated on the Account will be copied to Sales Order automatically and used as the “To” email address.
Enter “GFERP__Ordering_Contact__c” for the Purchase Order object.
Enter “GFERP__Billing_Contact__c” on the Sales Invoice object
You can also configure email "To" recipients by creating Electronic Document Recipient records related to the Electronic Document Setup. You can create one record for each "To" recipient by specifying a contact. Make sure the contact has an email address set up. You can define multiple "To" addresses.
Lastly, on the Electronic Document, you can configure the following fields to email recipients:
Email Contact If True – select a checkbox field from contact. If the field returns true, the contact will be added to the “To” Address on the email. For example, in a formula field that returns “Type = Billing,” any contacts of the Account with Type = Billing will receive a copy of the sales invoice email.
Email Sales Rep if True – select a checkbox field from Salesperson/Purchaser. If the field returns true, the sales rep will be Cc’d on the email. For example, create a new checkbox “Send me Order confirmation” on the Salesperson/Purchaser object, the sales rep will receive a copy of the sales order confirmation email.
Email Account Owner if True – select a checkbox field from the Account. If the field returns true, the account owner will be Cc’d on the email. For example, create a new checkbox “Copy me on Invoice” on the user record, and the account owner will be Cc’d on the customer invoice.
Test Sending Emails
To test the setup or to manually send an Email, go to a document record (for example, a sales invoice record) and click the Send Documents button
If you don’t see the button, ask your administrator to add the button.
On the Send Document page, you will see all the details about the email, including the from address, to, cc, bcc, Subject, email body, and attachment. Click the Send Document button to send the email manually.
Email Activity
When "Save as Activity" is enabled, you can see sent emails from the document's activity timeline.
Electronic Document Entries
Every email activity creates an Electronic Document Entry. Open the Electronic Document Entries page to see all processed and pending emails. Processed emails are marked as "Processed."