[SalesForce] Approval Process with Attachment & Email Response

Background: We have a custom Opportunity Object with a related Content List (documents like Solution Plans pertaining to an opportunity is uploaded into the Content via the related list). Few of the documents uploaded should go through a review before it is finalized.

We are trying to develop an Approval Process with the below characteristics:

[1] Choose an Approver – Salesforce User and/or non Salesforce User
[2] Choose a document from the Content and send it as an Attachment via the Email (alternatively the document link will also work)
[3] Capture the comments via Email (Email response)

After investigating we found the following limitations:

[1] Non Salesforce Approvers cannot be chosen
[2] Approvals cannot have attachments
[3] Email response is only available for Salesforce Users (need to have "API Access" in profile)

Workarounds:

To develop Apex controller(s) to handle attachments via Email to salesforce & non Salesforce users;

Is there a way to achieve the below:

[1] Capture Review Comments (from both Salesforce & Non Salesforce Users) as we are not using the OOB Approval Flow.
[2] Send document link uploaded in Content rather as an Attachment.

Best Answer

Thanks for this lovely question. I was thinking about this.

There is one approach that I was thinking. Flow -

  • Create a force.com site for approval related stuff Reference - Sites
  • Create custom field on object record of which you want to be approved. CF to store approver email etc (as user is not from SF)
  • Create custom button for detail page to send for approval.

NOw for your reqquirements,

  1. Choose an Approver - Salesforce User and/or non Salesforce User

Use the custom email field to specify email of the SF user or non SF user to which the record will go for approval. Once user clicks on Submit for Approval custom detail page button, send an email with standard details.

  1. Capture the comments via Email (Email response)

On click of button , need to open a custom VF page which can list down all related attachments for the record (very easy to do) for user to attach link in email and then send for approval.

NOTE - The mail that user will receive will have a link of a VF page in Force.com site. on site, it will be read only detail page of the record along with link to download the attachment. (they do not need the attachment directly in mail, thus saving on with multiple SF governor limits of SF)

  1. Capture the comments via Email (Email response)

You have 2 options, either create a inbound email response or on site page add a text area to add comment (again no need for inbound emails then)

Approved or Rejected status can be captured directly as a status field on that object record.

Do let me know if it is remotely helpful or for any doubts in this or implementation.!!

Thanks,

Ray

Related Topic