1. If you do not want to use the standard fax automation configuration tool provided by A5 Fax that is based on the Attachment insert and filename, you can write your own Apex trigger or class to create and send faxes.  Or you can use Process Builder and or a Flow to create and send faxes.
  2. Be sure to disable the Autosend feature in A5 Fax Configuration if you will write your own automation Apex or Process Builder (there is checkbox under fax configuration that says “enable auto send faxes” which you can uncheck if not using).
  3. You can create a Process Builder and/or Flow that will create a Sent Fax record in the background based on any criteria.  You just need to populate the fields as described below.
    1. IMPORTANT NOTE: Fax Number format for automation needs to be in following clean format: 8665557220 (there should not be any parentheses, dashes, hyphens, or slashes in number format within automation method).
  4. If creating a Process Builder and want to trigger sent fax creation with Files rather than attachment type, please review this article.
  5. Otherwise if using Attachments, and you would like to include more than one attachment in the fax (example cover page for the fax), you can also populate the other attachment fields with other attachment Salesforce IDs: efaxapp__Attachment_ID2__c, efaxapp__Attachment_ID3__c, etc.  You can set a max of 10 attachments to fax in one fax.
  6. Write Apex 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’, // recipient number – mandatory

      efaxapp__Subject__c = ‘Test’,  // any text, mandatory

      efaxapp__Send_Date__c = Datetime.now(), // mandatory,

      efaxapp__Attachment_ID__c = ’00Pi000000LwrJTEAZ’, // attachment id to send, mandatory

      efaxapp__Status__c = ‘Sending’, // mandatory

      efaxapp__Sent_With_Outbound_Message__c = True, // mandatory

      efaxapp__Org_Fax_Number__c = ‘4158880447’, // org fax number from which to send, mandatory

      efaxapp__Barcode_Position_Top__c = ’30’, // barcode options, can be passed

      efaxapp__Barcode_Position_Left__c = ’30’,

      efaxapp__Barcode_Size_Width__c = ’30’

    );

    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.