--- title: "Sending invoice PDF via email" slug: "automatisation-envoi-des-pdfs-de-facture-par-email" updated: 2025-12-23T13:43:30Z published: 2026-01-07T10:04:05Z canonical: "help.frisbii.com/automatisation-envoi-des-pdfs-de-facture-par-email" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.frisbii.com/llms.txt > Use this file to discover all available pages before exploring further. # Sending invoice PDF via email Now that the PDFs are generated automatically, Linda also wants to configure the sending of these invoice PDFs to customers. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-XD37WNF5.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A36%3A53Z&se=2026-10-28T02%3A36%3A53Z&sr=c&sp=r&sig=boEPGK7PB8MCf8XnYaWOK6T%2FCeRolAX3TSomj%2FLRUg0%3D) ## Trigger conditions on the invoice object In order to ensure the proper functioning of the automation, it is necessary to check whether - Auto issuance is checked - the PDFs were created correctly and - if the contacts are filled out correctly on the invoices owing to retrieve email addresses. **Note**: The conditions are given as an indication and need to be customize according to your business needs. If you want to add additional conditions, don't hesitate. | **Contact OK** Formula field (Check box) - Allows you to check if there is a contact with an email address linked to the invoice - Used by the automatic process. This formula is based on the Salesforce field on the Contact object: - Email **Please adapt the condition due to your business needs.** | ```plaintext NOT(ISBLANK(sofactoapp__Contact__r.Email)) ``` | | --- | --- | | **PDF OK** - Formula field (Check box) - Allows you to check if there is a PDF linked to invoice that is neither a draft, nor a pro-forma - used by the automatic process. The formula is based on these packaged fields of the Invoice PDF object: - Proforma Invoice (sofactoapp__Facture_Proforma__c) - Draft (sofactoapp__Facture_brouillon__c) **Please adapt the condition due to your business needs.** | | ## Set up the fields needed for the automation The **Automatic issuance** check box already exists in the objet, **PDF OK** was already configured when the [Automation: Invoice Issuance](/frisbii-app/docs/en/automatisation-emission-des-factures) was implemented. We recommend to read these trailhead articles, if you did not have occasion to train yourself on these topics: - [Add Custom Fields](https://trailhead.salesforce.com/en/content/learn/projects/suggestion_box/suggestion_box_2) - [Use Basic Logic in Checkbox Formulas](https://trailhead.salesforce.com/en/content/learn/modules/advanced_formulas/checkbox_logic_formulas) ### Steps 1. Go to Setup > Object Manager > **Invoice** 2. Click on **Fields & Relationships** 3. Click on **New** 4. In Step 1: Choose the field type **Formula** 5. In Step 2: Choose the output type **Checkbox** and insert the field label **Contact OK** 6. In Step 3: Switch to the tab **Advanced Formula** and compose the formula that fits to your business needs. **Note**: If you copy this formula from the top of the article, please paste it into a text editor in order to take off the formatting of the text. It happens that the Formula editor does not accept copy pasted formulas due to the formatting. 7. Verify the formula syntax. 8. Insert a telling description and a help text that explains the field to the users. 9. In Step 4: **Establish field-level security** by checking the boxes of the profils you want to give the right to modify the field, according to your company security policies. 10. In Step 5: Instead of checking the box here, we recommend to go to each page layout of the invoice object you want to put the fields on, in order to put them manually in the right section. **Note**: In order to easily debug the process, if an invoice is not processed, because of a missing contact, make life easier for users - and reduce your work - by putting the formula in a non-technical language in the help text of these fields. When the user understands why the process is not working for an invoice, he or she can modify the invoice to meet the conditions or at least understands why the invoice has not been processed. **Note:** Please repeat these steps with the **PDF OK** field, if you haven't set it up in one of the previous automations. Here you can see Linda's results: ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-5625YW7G.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A36%3A53Z&se=2026-10-28T02%3A36%3A53Z&sr=c&sp=r&sig=boEPGK7PB8MCf8XnYaWOK6T%2FCeRolAX3TSomj%2FLRUg0%3D) Following the creation of this field, we create an Email template to use in the process. ## Creation of an Email template in order to sent out the PDF invoices ### Steps 1. Do one of the following: - If you have permission to edit public templates, from Setup, enter *Email Templates* in the Quick Find box, then select **Classic Email Templates**. - If you don’t have permission to edit public templates, go to your personal settings. Enter *Templates* in the Quick Find box, then select **Email Templates** or **My Templates**—whichever one appears. 2. Click **New Template**. 3. Choose the *Text* template type, and click **Next**. 4. Choose a folder in which to store the template. 5. To make the template available for use, select the *Available For Use* checkbox. 6. Enter a name in *Email Template Name* like *Invoice PDF sent out* 7. Insert a Subject and add fields thanks to the wizard, like ```plaintext Invoice {!sofactoapp__Factures_Client__c.sofactoapp__Reference__c} - {!sofactoapp__Raison_Sociale__c.Name} ``` 8. Compose the Body of the message and add also fields thanks to the wizard, like ```plaintext Dear {!Contact.Name}, Please find attached your invoice from {!sofactoapp__Factures_Client__c.sofactoapp__Date_de_facture__c}. Do not hesitate to contact {!Contact.OwnerFullName} - {!Contact.OwnerEmail}, if you have any open questions left. Best regards, Your {!sofactoapp__Raison_Sociale__c.Name} team. ``` 9. Save. ![](https://cdn.document360.io/b84e1b5d-2ba6-4465-8c62-fb45a2f31314/Images/Documentation/image-KTF92WOH.png?sv=2026-02-06&spr=https&st=2026-10-28T01%3A36%3A53Z&se=2026-10-28T02%3A36%3A53Z&sr=c&sp=r&sig=boEPGK7PB8MCf8XnYaWOK6T%2FCeRolAX3TSomj%2FLRUg0%3D) ### Email alert in case the contact is not filled out correctly Repeat this procedure in order to create an email template for an email alert in case the contact is not correctly filled out in the invoice. - Exemple for an email template name: ```plaintext Email of the invoicing contact missing ``` - Exemple for an email subject: ```plaintext No email address configured for:{!sofactoapp__Factures_Client__c.sofactoapp__Contact__c} de {!sofactoapp__Factures_Client__c.sofactoapp__Compte__c} ``` - Example for the body of the email: ```plaintext {!Account.OwnerLastName}, Please fill out an email address for {!sofactoapp__Factures_Client__c.sofactoapp__Contact__c} that is linked to the account {!sofactoapp__Factures_Client__c.sofactoapp__Compte__c}. Please verify afterwards in the activities that the invoice {!sofactoapp__Factures_Client__c.sofactoapp__Reference__c} was sent via email. ``` Now that the prerequisites are prepared, let's start to configure the process. ## Testing approach After the configuration, don't forget to test our process. ### Preparation First make sure you have an invoice available that meets the criteria For example in the case of Cloud Kicks: - The invoice status is issued - There is a PDF that exists - The invoice is not a proforma - A contact (with email address) is linked to the invoice and that you have added the **Contact OK** field, and, if not yet done, also the **PDF OK** field in your page layout. ### Steps A) Create an invoice that fulfills the conditions > As soon as the invoice fulfills the conditions, it must be processed by the process. B) If the invoice already existed and it has already fulfilled the conditions: 1) Add a contact 2) Save the invoice or 1) Remove the contact 2) Save the invoice 3) Add the contact again > This triggers the process again. **Note:** Do not forget to test the case of an invoice with PDF and without Contact. ## Was the test successful? If not : 1) Check the configuration of your fields 2) Did the test invoice fulfill the conditions of the process builder? 3) Check the configuration of the process builder by comparing with this article.