If you would like to setup automatic fax sending with files instead of attachments that are used with our automation feature included with A5 Fax package, there is one major difference. When using attachments, Attachment record ID (starts with 00P) must be saved in Attachment ID fields of the Sent Fax record. When using files, it has to be Content Version ID (starts with 068). The easiest way to do that is to use Latest Published Version Id field on Content Document record.

For most use cases, automation process would require:

  1. Setting up a process builder which will be activated after some process specific triggering event occurs,
  2. Invoking a flow or apex class from the process builder and creating a Sent Fax record there.

In this article, we will cover the option using a flow.

To create a Sent Fax record, its following fields should be set:

  • Fax Number (efaxapp__Fax_Number__c) – number to which fax will be sent, this is mandatory.
    • IMPORTANT NOTE: Fax Number format for automation methods needs to be in following clean format: 8665557220 (there should not be any parentheses, dashes, hyphens, or slashes in number format within automation method).
    • You can also use formula instead of string and put this reference: $Setup.efaxapp__eFax_General_Settings__c.efaxapp__Default_Fax_Number__c.
      This will take a value of Default Fax Number from eFax General Settings custom setting. That way when you change the default fax number, you won’t have to change every action/condition in your process builders.
  • Send Date (efaxapp__Send_Date__c) – date when the fax should be sent, most commonly set to TODAY(), mandatory
  • Subject (efaxapp__Subject__c) – subject of the fax, mandatory
  • Attachment ID (efaxapp__Attachment_ID__c) – Id of the attached file/document/attachment, mandatory
  • Organization Fax Number (efaxapp__Org_Fax_Number__c) – number from which fax will be sent, if not set it should be the default org fax number, optional
  • Sent With Outbound Message (efaxapp__Sent_With_Outbound_Message__c) – boolean field which, if set to true, indicates that the fax will be sent as soon as the job picks it up—fax will not be sent if this field is false, defaults to false, optional
  • Barcode Position from Left (efaxapp__Barcode_Position_Left__c) – position of the QR code from left edge of the document in pixels, optional
  • Barcode Position from Top (efaxapp__Barcode_Position_Top__c) – position of the QR code from top edge of the document in pixels, optional
  • Barcode Size Width (efaxapp__Barcode_Size_Width__c) – QR code width in pixels, optional
  • Attachment ID2 (efaxapp__Attachment_ID2__c) – Attachment ID10 (efaxapp__Attachment_ID10__c) – Id of additional attached files/documents/attachments, optional
  • Account (efaxapp__Account__c) – lookup that can be used to relate the fax record to standard Account record, optional
  • Contact (efaxapp__Contact__c) – lookup that can be used to relate the fax record to standard Contact record, optional
  • Case (efaxapp__Case__c) – lookup that can be used to relate the fax record to standard Case record, optional
  • Opportunity (efaxapp__Opportunity__c) – lookup that can be used to relate the fax record to standard Opportunity record, optional

Any other custom lookup field can be used to relate sent fax record to some other object record.

When configuring action in process builder, one would need to select Launch a Flow, and pass it target record Id and fax number, as shown in the figure below.

Figure 1. Configuration of the process builder action

In the flow, one would need to:

  1. Create two variables, one for target record Id and another for fax number,
  2. Use Get Records to get the latest Content Document Link record related to target record. This record would already have all the information we need,
  3. Use Create Records to create a Sent Fax record and set its fields as already described in this article.

This process and configuration is shown in figures below.

Figure 2. Diagram of the flow

Figure 3. Configuration of a variable used to store target record Id passed from process builder, which we named varAccountId

Figure 4. Configuration of a variable used to store fax number passed from process builder, which we named varFaxNumber

Figure 5. Configuration of Get Records action. We named the action Get Latest Content Document Link. Notice the sorting of  fetched records. We do that to make sure that the latest record is selected. The record is saved in the automatically created variable which has the same name as the API name of the Get Records action, Get_Latest_Content_Document_Link.

Figure 6. Configuration of Create Records action. We named it Create Sent Fax. Notice that not all fields are set, just mandatory ones, Account, and Sent With Outbound Message. To set Attachment ID we used {!Get_Latest_Content_Document_Link.ContentDocument.LatestPublishedVersion.Id}, where Get_Latest_Content_Document_Link is the API Name of the Get Records action we used to get Content Document Link record. Instead of {!Flow.CurrentDate}, you can also use {!Flow.CurrentDateTime}.

For more information about Content Documents and Content Versions, visit these links:
 

If you would like assistance in setting this automation method up or need help resolving the process you made, we offer paid premium app support as a service: http://kb.a5faxapp.com/contact-support/.