You can configure the A5 Fax app to automatically send faxes. There are two ways of doing this, as described below:

  1. Automate Faxing Based on Attachments
  2. Automate by Creating a Sent Fax Record

Automate Faxing Based on Attachments

The standard fax automation tool provided by A5 Fax is based on the Attachment insert and filename. You can configure the app to automatically fax a PDF that gets attached to any record. The most common way to generate the PDF document is with the A5 Documents app. If combining with a document generation tool, it would allow you to customize the fax with Salesforce merge data and then A5 Fax will pick up the attachment and create a sent fax record. See steps below for configuring auto faxing:

  1. Check User Permissions
    • Make sure that all A5 Fax users have enabled the “Send Outbound Messages” permission on their individual profile or with a permission set.
    • If they do not enable this Salesforce System Permission on the Profile level or via a permission set, they will not be able to successfully send outbound faxes where the Outbound Messaging was necessary. This pertains to using automation features of A5 Fax; they will still be able to send faxes manually.
  2. Open the App and go to the Fax Configuration tab
    • In Lighting, you can go to the app launcher and search for the tab. In Classic, go to All Tabs.
  3. Create a New Field Setting
    • In the Field Setting section, click New.
  4. Complete Section: Edit Field Setting 
    • Setting Name: Give this setting a name that provides some description to you like “Auto Send Fax to Contact”.  It could be much more specific if configuring for a certain type of process or document.  Overall, the Setting Name is just for informational purposes.
    • Select Organization Fax Number: Select the Object the Fax is related to.
    • Object: Select the lookup field on the Sent Fax object that provides the relationship to that object.
    • Sent Fax Relationship: Select the lookup field on the Received Fax object that provides the relationship to that object.
    • Received Fax Relationship: Indicate the location of the “send to” Fax Number.  You can reference a field in the object or the fax attachment filename.
    • Fax Number: Indicate how the app will locate the fax number, either a field reference or attachment filename.
      • Field Reference: If the fax number is in a field, select “In Object Field” then select this field.
      • Attachment Filename: If the fax number is in the attachment filename, then select this field and indicate where to find the fax number in the filename using “before” or “after” and the specific text.
        • For example, you could have a process that creates an attachment with the filename “FAX-837-738-3827.pdf” where “FAX-” is always consistent and the number after is always the fax number.  Then you can select “after” and put in “FAX-” in the text field.
    • Autosend When Fax Attachment Filename: Indicate what the filename of the attachment related to this object should contain in order to auto send the fax. Use the matching criteria of “starts with”, “contains”, or “ends with” and input the specific text.
      • For example, the file could always start with the word “Fax”.  Once you attach a PDF file to the object record with this same pattern (in this example, filename starting with the word “Fax”) the attachment will be auto faxed to the specified recipient.
  5. Complete Section: Barcode Configurator 
    • Barcodes are optional. They allow the recipient of the fax to send a response, which will be associated with the original record.
    • Indicate the placement of the barcode on your fax document that will remain in the same place each time a fax is sent with this field setting. If you would like to preview how the barcodes would look on an example PDF image, you can select a PDF file from your documents or upload one using the lookup glass next to Fax PDF File.
    • The first barcode is in the default position.
    • To move and resize, you can click on the barcode and drag, or use the controls on the left.
    • Add another barcode to the document by clicking the Add Barcode button.  This is optional but recommended.  Sometimes when faxes come back an area of the fax gets distorted or has a hair in it.  Having two barcodes on the page increases the chance of successfully reading one.

You are now ready to automate faxing based on attachments. Upon inserting a new Attachment, the A5 Fax trigger will automatically read the filename and, if it matches the rule, will automatically create a Sent Fax record and fax the attachment.

Note: If you are mass updating multiple records at once and this results in more than one Attachment, then the A5 Fax Fax trigger will detect the need for Batch Mode and will create the Sent Fax record and check the box “Sent with Outbound Message” and a A5 Fax workflow rule will send outbound message to A5 Fax server to send the fax.  This is more of an FYI.

Automate by Creating a Sent Fax Record

If you do not want to automate based on the Attachment insert and filename, you can automate sending a fax by simply creating a Sent Fax record with the required field values. You can create a Sent Fax record using Process Builder, Flow, Apex, or Importing. How you create the record depends on whether your org uses Attachments or Files. If using Files, you can review Files Permissions article.  

Create a Sent Fax Record with Process Builder

The A5 Fax app is uses Attachments, which is compatible with Salesforce Classic. If your org is in Classic, you can automate the creation of a Sent Fax record with Process Builder.

  1. Choose the object and when to start the process (Figure 1).
    • Select Sent Fax Object
    • Start process When a record is created or edited.
  2. Configure the Criteria to fit your organization’s business processes (Figure 2).
    • You can define any criteria you want. For example, a custom picklist to indicate status with a field, “Fax Preferred” that indicates how the recipient prefers to receive the document.
  3. Create the Sent Fax Record, Record Type is “Sent Fax”, and set the field values (Figure 3). Listed below are mandatory fields as well as frequently used optional fields.
    • Fax Number (efaxapp__Fax_Number__c): Mandatory field. This is the number to which the fax will be sent.
      • 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): Mandatory field. This is the date when the fax should be sent, most commonly set to TODAY().
    • Subject (efaxapp__Subject__c). Mandatory field. This is the subject of the fax.
    • Attachment ID (efaxapp__Attachment_ID__c): Mandatory field. This is the Id of the attachment.
    • Attachment ID2 (efaxapp__Attachment_ID2__c) Attachment ID10 (efaxapp__Attachment_ID10__c): Optional field. This is the Id of any additional attachments. For example, to attach a cover page. You can send a max of 10 attachments in one fax.
    • Organization Fax Number (efaxapp__Org_Fax_Number__c): Optional field. This is the number from which fax will be sent, if not set it should be the default org fax number.
    • Sent With Outbound Message (efaxapp__Sent_With_Outbound_Message__c): Optional field. This is a boolean field which, if the value equals true, indicates that the fax will be sent as soon as the job picks it up. The fax will not be sent if the value equals false. The default value of this field is false.
    • Barcode Position from Left (efaxapp__Barcode_Position_Left__c): Optional field. Sets the position of the QR code from left edge of the document in pixels.
    • Barcode Position from Top (efaxapp__Barcode_Position_Top__c): Optional field. Sets the position of the QR code from top edge of the document in pixels.
    • Barcode Size Width (efaxapp__Barcode_Size_Width__c): Optional field. Sets the QR code width in pixels.
    • Account (efaxapp__Account__c):Optional field. This is a lookup that can be used to relate the fax record to standard Account record.
    • Contact (efaxapp__Contact__c): Optional field. This is a lookup that can be used to relate the fax record to standard Contact record.
    • Case (efaxapp__Case__c): Optional field. This is a lookup that can be used to relate the fax record to standard Case record.
    • Opportunity (efaxapp__Opportunity__c): Optional field. This is a lookup that can be used to relate the fax record to standard Opportunity record.
  4. Optional: You can add additional actions to support your business processes. For example, once the Sent Fax record is created and the fax is sent, update a custom status field to “Sent” (Figure 4).

Figure 1

Figure 2

Figure 3

Figure 4

Create Sent Fax Record with Flow

Considering the fact that A5 Fax uses Attachments and Lightning Experience is compatible with Files, if your org is in Lightning Experience, you will use Flow to execute the fax automation. Flow allows you to do a “Get Record” query to retrieve the Files document link. Follow the steps outlined below:

  1. Choose object and set Criteria (Figure 1)
    • How you will launch the Flow that creates a Sent Fax record depends on your organization’s business processes.
    • The example in Figure 1 shows a Flow built on the Contact object with criteria based on a custom picklist, “Send Fax From Files”.
  2. Create two variables, one for the target record Id and one for the fax number.
    • Data Type = Text
    • Availability Outside the Flow = Available for Input
  3. Use Get Records to get the latest Content Document Link record related to target record (Figure 2).
    • Get Records of This Object
      • Object = Content Document Link
    • Filter Content Document Link Records
      • Condition Requirements = Conditions are Met
      • Field = LinkedEntityId; Operator = Equals; Value = [set this to the Record Id]
      • Sort Content Document Link Records
      • Sort Order: Descending
      • Sort By: SystemModstamp
      • The Sort By and Sort Order field settings will ensure that the latest record is selected.
      • The record will be saved in the automatically created variable which has the same name as the API name of the Get Records action.
    • How Many Records to Store= Only the first
    • How to Store the Data = Automatically store all fields
  4. Use Create Records to create a Sent Fax record and set its fields (Figure 3).
    •  How Many Records to Create = One
    • How to Set the Record Fields = Use separate resources, and literal values
    • Create a Record of This Object
      • Object = Sent Fax
    • Set Field Values for the Sent Fax
      • To create a Sent Fax record these are mandatory fields for an org that uses Files:
      •  Fax Number (efaxapp__Fax_Number__c): This is the fax number where you are sending the fax
      • Subject (efaxapp__Subject__c): This is the subject of your fax
      • Send Date (efaxapp__Send_Date__c): Set this to display the current date at the time you send the fax
      • Attachment ID (efaxapp__Attachment_ID__c): This is the Attachment Id
        • To set Attachment ID you can use the API Name of the Get Records action you used to get Content Document Link record.
      • Sent With Outbound Message (efaxapp__Sent_With_Outbound_Message__c): This needs to be set as “True”
      • Set the Record Id
        • Ex. If the Sent Fax record were related to the Contact object, you would set Contact (efaxapp__Contact__c) to be the Contact Id.

Figure 1

Figure 2

Figure 3

Create a Sent Fax Record with Apex

To create a sent fax record with Apex, you can write an Apex class or trigger that will Insert a Sent_Fax record with the following value guidelines:

efaxapp__Sent_Fax__c fax = new efaxapp__Sent_Fax__c(

      efaxapp__Fax_Number__c = ‘8665557220’, //Mandatory. This is the recipient’s fax number. Format needs to be clean, with no parentheses, dashes, hyphens, or slashes.

      efaxapp__Subject__c = ‘Test’,  //Mandatory. Any text to populate the subject.

      efaxapp__Send_Date__c =, // Mandatory. Typically current date/time as depicted in the code, but this can also be configured to send the following business day, on a specific day of the month, etc. 

      efaxapp__Attachment_ID__c = ’00Pi000000LwrJTEAZ’, // Mandatory. This example references the Id of a specific attachment. You could also set Attachment ID as we set up the Flow in the previous section, which used the Get Records action to get Content Document Link record.

      efaxapp__Status__c = ‘Sending’, // Mandatory

      efaxapp__Sent_With_Outbound_Message__c = True, // Mandatory

      efaxapp__Org_Fax_Number__c = ‘4158880447’, // Mandatory. Org fax number from which to send.

      efaxapp__Barcode_Position_Top__c = ’30’, // Optional. Barcode options.

      efaxapp__Barcode_Position_Left__c = ’30’, // Optional. Barcode options.

      efaxapp__Barcode_Size_Width__c = ’30’ // Optional. Barcode options.


    insert fax;

To add a second barcode position to the Apex automation:

You can add new positions/size via a comma, for example:

efaxapp__Barcode_Position_Top__c = ‘17,245’,
efaxapp__Barcode_Position_Left__c = ‘211,45’,
efaxapp__Barcode_Size_Width__c = ‘54,54’
where second integers (245,45,54) related to a second barcode.