Solved

Automatic emailing of Customer Invoice PDF

  • 15 December 2022
  • 3 replies
  • 664 views

Userlevel 2
Badge +8

We are using IFS APP10 UPD13 and would like to send automatically an email to the customer with the customer invoice PDF attached in the email as soon as the invoice is create.

I am new to IFS so bear with me. I am a quick learner but this one got me baffled. I have read a lot of threads regarding sending reports by email but none have helped me get the job done. My understanding is that when the invoice is created, the PDF is created. The PDF is then available in Report Archive.

I have tried through Event Action with CREATE_INVOICE as the trigger. I get the email but I do not know what parameter to provide to get the appropriate PDF attached.

I have tried through Event Action with PDF_REPORT_CREATED as the trigger and REPORT_TITLE = Invoice as the condition. I do not get any emails even though PDFs of invoices are created (visible in report archive).

I have tried through Report Rules but got lost trying.

Thank you in advance for your help. 

 

icon

Best answer by MatthewConk 15 December 2022, 18:45

View original

3 replies

Badge +4

@clilouise 

I have found that setting a Report Rule is one of the easiest ways to do this. The key is getting the Customer Email Address into the Report Rule. 

This can be done with fields already on the report, a custom field added to the report, or an SQL statement in the XPath window when configuring the Action Properties.

 

You can test this functionality by type your email into the To email address and then printing an Invoice.

Userlevel 2
Badge +8

Thanks @MatthewConk it works!

 

I just have two additional questions:

  • Is it possible to get the Customer Name only?  The [@CUSTOMER_ORDER_IVC_REP/CUST_NUMBER_NAME] gives me the customer number followed by the customer name but I do not need the customer number, I just need the name. Or are there any string function that would allow me to extract the name?
  • How do you control which customer email address the report rule will use when the customer has more than one and the default one is not the one we should use to send the invoice to?
Badge +4

Thanks @MatthewConk it works!

 

I just have two additional questions:

  • Is it possible to get the Customer Name only?  The [@CUSTOMER_ORDER_IVC_REP/CUST_NUMBER_NAME] gives me the customer number followed by the customer name but I do not need the customer number, I just need the name. Or are there any string function that would allow me to extract the name?
  • How do you control which customer email address the report rule will use when the customer has more than one and the default one is not the one we should use to send the invoice to?

Yes, you can control both of these values in the Set Expression Popup window. You can either create a Custom Field in the Header of the Customer Invoice and it will then show up in this list and you can select it.

 

Or you can use PLSQL and pull from the Database:

 

While on the Report Rule Screen, Press F1 and you should see the details about ½ way down about Expressions and what you can do.

Reply