Sage X3 Business Cloud 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.
Now before you go about any of these steps, make sure you have proper backups in place that you can roll back to
Email settings in place?
Without proper workflow email validation links in place this post will not work. So first let’s go about making sure you are the right links in place before moving further.
When setting the worklfows for Sales Order and Purchase orders, the system generates two links sent on an e-mail so the Signing User can Approve or Reject the Sales order and/or Purchase Order. If this is not working its an indicator that proper links are not in place.
- Make sure that the X3 Web Services are installed on the SAFE X3 management Console.
- Log on your Sage X3 Server.
- Open the SAFE X3 System Management Console.
- Select the WEB Servers option
- Check if there is a Web Server configured.
- Take note of the Port used to connect to the Web Server. This will be used in the configuration steps below.
2 Enter the proper parameters on your Production and/or Test Folder
- Go to Setup, General parameters, Parameter values.
- Double-click SUP Supervisor to expand it.
- Select the SUPERVISOR chapter, FOLDER, <<YOUR PRODUCTION/TEST FOLDER>>.
- Select the Group WRK, the right click and select DETAIL.
- On the parameter values window, enter the following information ( remember that the names has to coincide with the server settings on the X3 Console)
- Parameter SERMES : enter your e-mail server name or IP address
- If you don’t user an e-mail server, enter RELAY.MAILINTERNAL.COM
- Parameter WRKRMTDIR: [install drive]:\Sage\[SolutionName]\FOLDER\[foldername]
- Example: E:\SAGE\SAGEX3V7\FOLDERS\SEED
- Parameter WRKRMTHTTP: <<SERVERNAME>>:<<PORT CONFIGURATION>>/sdata/x3/erp/<<FOLDER>>/$service
- For example: localhost:8124/sdata/x3/erp/<<FOLDER>>/$service
- Parameter WRKRMTMAC : <<SERVERNAME>>:<<PORT CONFIGURATION>>
- Legacy parameter. Leave blank in v7 and above
- For example: Same server name as above (not including http://) and the port shown in X3 Solution’s Main Processor section.
- Parameter WRKSINTER : <<SERVERNAME>>:<<PORT CONFIGURATION>>
- For example: Same server name and port as above (not including http://). Note: This IP address must be able to be “seen” externally from your domain.
- Parameter WRKSINTRA : <<SERVERNAME>>:<<PORT CONFIGURATION>>
- For example: Same server name and port as above (not including http://).
- Parameter SERMES : enter your e-mail server name or IP address
- Click OK to close the page.
- Click SAVE to save the changes.
Workflow setup
Now that you have the appropriate email settings in place. Setup a workflow based on the APRINT workflow, but to print a specific report.
- Open Setup, General parameters, Parameter values.
- Expand SUP chapter and click on Action button for the WRK Group.
- Verify that you have an email server entered for parameter SERMES.
- Click OK.
- Click on Action button for RPT Group.
- Verify that ASAIDEST parameter is set to No.
- Open Setup, Workflow, Workflow rules.
- Select APRINT workflow.
- Create a new workflow by changing APRINT name to a new name.
- 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.
- 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.
- Note: Again, double check that you did not make a typo.
- On the Message tab, verify that GFILPATH is set under attached documents.
- Click Save and Validate.
- Open Common Data, Customers, Customers.
- Select the customer you like to email.
- 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).
- Open Sales, Invoices, Invoices.
- Create a new invoice for the customer above.
- Click Print to print the invoice.
- Select SBONFAC report( this is the report we set as part of the workflow)
- Choose output of Message.
Note: You may also create destination that defaults to Message. - 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.”
- Your customer will receive an email with the attached invoice.
Important Points
Notes:
- The link which is generated is based upon the link used by the user signing into X3. For example: If the user logs in via http://localhost:8124, this will be part of the signature link. Localhost is not resolvable outside the domain.
- 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.
-
If you’ve set an SSL / HTTPS external website as the entry point to X3, the parameters need to have its address as the server.
(This solution is for v7+)
Examples:
Parameter
Description Value AWRKSYRA Syracuse server https://MyExternalserver.com/trans/x3/erp/[foldername] WRKRMTDIR Workflow links directory <same as above> WRKRMTHTTP Workflow links HTTP address MyExternalserver.com:443/sdata/x3/erp/[foldername]/$service WRKRMTMAC Serverworkstaton workflow II <not used in v7+> WRKSINTER Internet workflow feedback MyExternalserver.com:443/ WRKSINTRA Intranet workflow feedback MyExternalserver.com:443/