Automating a sales report

Getting started in Linx – Automating my sales report

Franz Rodenacker, Head of User Experience at Digiata Technology Services, tells us how he uses Linx at work, share some advice for first-time users, and take us through the process of automating a sales report.

See Part 1 where Franz explains his everyday use of Linx.

How did you use Linx to automate your sales report?

The data sits in a SQL database. It needs to end up as a table of data in someone’s inbox. I started by splitting my problem up into various sub-tasks.  First I created a process that would do three things for me:

    1. Fetch the sales data from the database


    1. Create the report as an HTML table


  1. Send the table in an HTML email

Next,  I automated the process by adding a timer service. Then I simply uploaded the completed solution to my server, and started the service. I started with a process, but you could create a timer service first and then add functions directly into the service event. Either way, you need the following steps:

    1. Drag on a String type to store the HTML table rows. Set initial value for this string to <table> – I called my string HTMLReportsDataTbl.


    1. Use a SQLExecute to fetch the data you want displayed in your report. Use the return option called row by row to loop through the results.


    1. Use a RazorTemplateTransform function to create each row in the table in the loop (the Model is the row returned by your query and the Template is some html with placeholders for the data.


    1. Drag on a SetValue function to set the string. The value you add in each loop is HTMLReportsDataTbl + RazorTemplateTransform to build up the string.


    1. You may want to test this to make sure your string looks right. Right click on the SetValue function and select Enable Logging. Then hit the Run+Debug button and start the Debug (start button). If everything works, the Debug output window should show you your html rows.


    1. Outside of the loop, add another SetValue with the value of HTMLReportsDataTbl + ‘</table>’ to close off the table html.


    1. Add a SendEmail function and complete the required properties here. Make sure you set the Body Format property to HTML.


    1. Now hit Run+Debug again to make sure it works as expected. This is the point where you may want to tweak and style the html to suit your visual needs by adding a header row, cellpadding, borders and the like.


    1. When you are happy with the result, add a Timer Service from the top bar. Define the schedule when this should run and drag the Process into the Timer Event.


    1. Deploy the solution to your server and browse to the server.


  1. Find the solution and start the timer service.

Ready to get started? Watch the video tutorial

To make it even easier for you to get started, we’ve recorded a helpful two-part tutorial:

Low-code software leads to happier developers

Rodenacker sums it up “Linx is a powerful example of the practical side of digital transformation. As a result of using this platform, I am able to start his day in peace and enjoy his holidays without worrying about work. I’m happier, and so is my colleague in the sales department.”

How could Linx make your life easier?


Scroll to top