Skip to content
logo Knowledgebase

How to create a workflow that will email an invoice to a customer

Created on  | Last modified on 

Summary

Sage Business Cloud X3 has a number of add-ons that you can take advantage of to streamline emailing your documents to your customers, such as EDD, EDM, PIA, but in standard X3, a workflow can be setup to email a single document like a Sales order invoice to a customer in an automatic way, by following the steps below.

Description

Notes:

  • You must print from the actual invoice (Print>Record) to pull the email from the recipient.
  • The workflow will only generate one file and one email. It will choose the last email it finds if it finds multiple.
  • To know if the email is successful either add yourself as a Copy recipient or mark the Debug mode check box on the General tab of the workflow rule to receive a trace file.
  • You cannot customize the name of the attached .pdf file without modification to the code.

An additional topic on workflows in SageCity: https://sagecity.na.sage.com/support_communities/sage_erp_x3/f/40/p/84952/258168#258168

Cause

Resolution

Before proceeding, make sure the appropriate email settings are setup for workflows. See linked article 56835, titled,"HTG - How to properly setup workflow email validation links to work." Failure to set this up properly means emails will not generate.

Setup a workflow based on the APRINT workflow, but to print a specific report.

    1. Follow article 56835, titled,"HTG - How to properly setup workflow email validation links to work."
    2. Open Setup, General parameters, Parameter values.
    3. Expand SUP chapter and click on Action button for the WRK Group.
    4. Verify that you have an email server entered for parameter SERMES.
    5. Click OK.
    6. Click on Action button for RPT Group.
    7. Verify that ASAIDEST parameter is set to No.
    8. Open Setup, Workflow, Workflow rules.
    9. Select APRINT workflow.
    10. Create a new workflow by changing APRINT name to a new name.
    11. Set the condition on the header to only run when using your report, for example, [F:ARP]RPTCOD="SBONFAC".
      • Note: You may also want to either deactivate APRINT or add [F:ARP]RPTCOD<>"SBONFAC" so that only one workflow is triggered. Also, double check that you did not make a typo. Typos will result in no error messages being displayed to warn you. Emails will simply not generate.

    12. On the Recipients tab, select [F:SIH]BPR as the recipient and the appropriate function.
      • Note: Again, double check that you did not make a typo.

    13. On the Message tab, verify that GFILPATH is set under attached documents.
    14. Click Save and Validate.
    15. Open Common Data, Customers, Customers.
    16. Select the customer you like to email.
    17. Click on Contacts tab and select the contact you like the email to go to and set them to the same function as the workflow function( in this example, Buyer).
    18. Open Sales, Invoices, Invoices.
    19. Create a new invoice for the customer above.
    20. Click Print to print the invoice.
    21. Select SBONFAC report( this is the report we set as part of the workflow)
    22. Choose output of Message.
      Note: You may also create destination that defaults to Message.
    23. Click Print. If everything was set up properly, you should receive a popup box showing you which email will be sent the attachment. Click OK.
      • Note: If you do not receive this popup box, you either made a typo in one of the above sections, or you did not set up your email settings correctly. See linked article 56835, titled,"HTG - How to properly setup workflow email validation links to work."
    24. Your customer will receive an email with the attached invoice.
DocLink: HTG - How to properly setup workflow email validation links to work
DocLink: How can I change the name of the file created from a workflow email?