How to Auto Email Documents
to Customers in Sage X3

By: | Category: ERP

Sage ERP X3 has a number of add-ons that you can take advantage of to streamline emailing documents to your customers, including Net at Work’s Document Distribution Module.

However, you can auto email a single document (e.g., a Sales order invoice) to a customer by setting up a workflow in standard Sage X3. In this blog post, we will show you how.

SET UP THE WORKFLOW

Before proceeding, make sure the appropriate email settings are set up for workflows. 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 if it already exists or create a new workflow by changing APRINT to a new name. Be sure to deactivate APRINT or add [F:ARP]RPTCOD<>”SBONFAC” to the Conditions so that only one workflow is triggered. Also, double check that you did not make a typo. Typos will result in an error and no warning messages will be displayed. Emails will simply not generate.
  10. Set the condition on the header to only run when using your Crystal report, for example, [F:ARP]RPTCOD=”SBONFAC”.
  11. Examples using other out of the box Crystal Reports:

    • [F:ARP]RPTCOD=”DEVICLIENT” For Sales Quote
    • [F:ARP]RPTCOD=”ARCCLIENT” For SO Ack
    • [F:ARP]RPTCOD=”SBONFAC”. For Sales Invoice
    • [F:ARP]RPTCOD=”BONCDE2″. For PO

    auto email documents sage x3

  12. Select Trigger Mail and Trigger Tracking under the Management section.
  13. On the Recipients tab, select [F:SIH]BPR as the recipient and the appropriate function.
    • For Sales Quotes Use – [F:SQH]BPCORD
    • For SO Acknowledgements Use – [F:SOH]BPCORD
    • For Sales Invoice Use – [F:SIH]BPR (BPR is a Field Linked From BPARTNER Table To SIH; Not Shown On Invoice Screen)
    • For PO Form Use – [F:POH]BPSNUM

    auto email documents sage x3

  14. On the Message tab, verify that GFILPATH is set under attached documents.
  15. auto email documents sage x3

  16. Click Save and Validate.
  17. Open Common Data, Customers, Customers.
  18. Select the customer you like to email.
  19. 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).
  20. Open Sales, Invoices, Invoices.
  21. Create a new invoice for the customer above.
  22. Click Print to print the invoice.
  23. Select SBONFAC report (this is the report we set as part of the workflow)
  24. Choose output of message. (need to select MSGPDF in Destination which should default to Output to “Message”).
  25. Note: You may also create a Destination that defaults to Message.
  26. 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.”
  27. Your customer will receive an email with the attached invoice.

ADDITIONAL INFORMATION

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

For more information on how to auto email documents to customers in Sage X3, or for any other questions about Sage X3, please contact us.