Sending a copy of the Report Generator via email
As you probably already know, documents concerning key functions can be sent out en masse to relevant parties.
These are:
- Balance notifications
- Payment reminders
- Payslips
- Invoices paid by suppliers (remittance advices)
However, what to do if you need to send a Report Generator file to customers, suppliers or employees, meaning any document to your contact list? In a nutshell, this is for sending balance notifications (e.g. comparing quantities). For example:
- if you want to compare the purchased quantities with suppliers’ data (necessary in waste management)
- or if you want to send the sales of the period together with the amounts of discounts in a special format to customers for comparing
This solution works with the Report Generator and for this you need to add a rule under Global Attributes. On the main page, search for “Global Attributes” and add the following rule:
- Name=GLOBAL_GENERATOR_EMAIL
- Value=email content HTML (described below)
- AltValue=from which field to get the contact email
- Value2=via which field to connect contact records (for example ENTITY.REGISTRATION_CODE. If there are 20 lines with the same registration code, these will be aggregated into one email)
Then, save the changes, log out of the account and back in for the changes to apply.
Detailed description of the rules
- Name: GLOBAL_GENERATOR_EMAIL
the scheduled job is the generator’s information description
- Value: email parts
For example: Hello!<br><br>We are sending new documents. |<br><br><table style=”border:1px solid black;width:100%;border-collapse: collapse”><tbody><tr><th>Nr</th><th>Kp</ th><th>Sum</th></tr>|ALL:DOCUMENT.NUMBER,DOCUMENT.DATETIME,DOCUMENT.SUM_NO_VAT|</tbody></table>|<br><br>Have a nice day, < br><br>Your partner
- AltValue: where to take the email address. If there already is an email address, then it will be sent to that email.
Example: BooksContactPersonEmail
- AltValue2: grouping value
Example: BooksContactRegistrationCode
- AltValue3: email subject
Example: Quantity balance notification
- AltValue4: send to all emails
If multiple emails were found in that group, then:
- If True –> sends to all of them.
- If False and recipient count > 1 –> error
- AltValue5: entity field name. Only necessary for storing information about who has received the email or not (email.entityId).
- AltValue6: field used for the summing function
For example purchasedQuantity
- AltValue7: global = not used, scheduled job = mapper for filter values.
Example for last month: year=CURRENT_YEAR|month=MONTH_MINUS1