{"id":31149,"date":"2025-08-29T12:51:17","date_gmt":"2025-08-29T12:51:17","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagex3\/?p=31149"},"modified":"2025-08-29T12:51:17","modified_gmt":"2025-08-29T12:51:17","slug":"sage-x3-automation-inactivating-suppliers-after-900-days-with-recurring-tasks-and-excel-output","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/08\/29\/sage-x3-automation-inactivating-suppliers-after-900-days-with-recurring-tasks-and-excel-output\/","title":{"rendered":"Sage X3 Automation: Inactivating Suppliers After 900 Days with Recurring Tasks and Excel Output"},"content":{"rendered":"\n<p>Managing supplier data effectively is essential for maintaining a clean and accurate vendor list in <a href=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/sage-x3-erp\/development-services\/\" rel=\"noreferrer noopener\">Sage X3<\/a>. Over time, some suppliers may become inactive \u2014 perhaps due to discontinued business relationships or long periods without transactions. Rather than manually tracking and inactivating these suppliers, Sage X3 allows us to automate the process using recurring tasks and workflows. In today&#8217;s fast-paced business environment, maintaining an up-to-date supplier database is crucial for efficient operations. Inactive suppliers\u2014those with no transactions for an extended period\u2014can clutter your system and create unnecessary maintenance overhead.<\/p>\n\n\n\n<p>Recently, we received a requirement from one of our clients to automatically inactivate suppliers who have had no transactions in the last 900 days, on a daily basis. Additionally, the client requested an Excel report listing all the inactivated suppliers, to be sent via email notification.<\/p>\n\n\n\n<p>In this blog, we will share how we implemented an automated solution for a client to inactivate suppliers with no transactions in the last 900 days and send an Excel report of the changes every night.<\/p>\n\n\n\n<p>Benefits of This Automation:<br>\uf0b7<strong>Time-Saving<\/strong> \u2013 No manual checks or updates.<br>\uf0b7<strong>Accuracy<\/strong> \u2013 Eliminates human errors in supplier management.<br>\uf0b7<strong>Visibility<\/strong> \u2013 Automated reporting keeps the team informed.<br>\uf0b7<strong>Clean Data<\/strong> \u2013 Helps maintain an up-to-date supplier list.<\/p>\n\n\n\n<p><strong>Step 1: Create the Recurring Task<\/strong><\/p>\n\n\n\n<p>Sage X3\u2019s <strong>Recurring Task<\/strong> functionality allows you to schedule processes to run automatically at specified intervals.<\/p>\n\n\n\n<p>Below are the steps and screenshots to create the recurring task.<\/p>\n\n\n\n<p><br><strong>\uf0b7Create the custom script &#8211;<\/strong><br>We developed a custom 4GL script that uses the <strong>SQL Requester<\/strong> to identify suppliers who have not had any transactions in the last 900 days. This script then inactivates those suppliers.<br>After updating the supplier status, the script also inserts the details of the inactivated suppliers into a custom table which includes the Supplier code and date column. This table will later be used to generate the daily supplier inactivation report for the client.<\/p>\n\n\n\n<p><br><strong>\uf0b7Create the Task Code &#8211;<\/strong><br>Once the script is ready, create a Task Code in Sage X3 and link it to the custom script containing the supplier inactivation logic.<\/p>\n\n\n\n<p><strong>Path<\/strong>: All > Usage > Batch Server > Task Management<\/p>\n\n\n\n<p><strong>New Stuff<\/strong>: <a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/08\/29\/key-functionalities-of-custom-stock-change-transaction\/\" target=\"_blank\" data-type=\"link\" data-id=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/08\/29\/key-functionalities-of-custom-stock-change-transaction\/\" rel=\"noreferrer noopener\">Key Functionalities of Custom Stock Change Transaction<\/a><\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-01-\u2013-Task-Code-1024x454.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-01-\u2013-Task-Code-1024x454.png\" alt=\"Figure 01 \u2013 Task Code\"><\/a><\/center>\n<font size=\"2\"><center>Figure 01 \u2013 Task Code<\/center><\/font>\n\n\n\n<p><strong>\uf0b7Create the Recurring Task &#8211;<\/strong><br>Next, create the <strong>Recurring Task<\/strong> and schedule it according to the client\u2019s requirement.<br>Path: All > Usage > Batch Server > Recurring Task Management<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-02-\u2013-Recurring-Task-1024x554.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-02-\u2013-Recurring-Task-1024x554.png\" alt=\"Figure 02 \u2013 Recurring Task\"><\/a><\/center>\n<font size=\"2\"><center>Figure 02 \u2013 Recurring Task<\/center><\/font>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step 2: Create an Excel export template.<\/strong><\/p>\n\n\n\n<p><br><strong>\uf0b7After scheduling the recurring task<\/strong>, create a <strong>custom report<\/strong> using the custom table that we updated with the daily list of inactivated suppliers in <strong>Step 1<\/strong>.<br>We designed this report in Crystal Reports, adding parameters for <strong>Date <\/strong>and <strong>Folder <\/strong>to make it more flexible. Once the report design was complete, we created the <strong>Report Code<\/strong> in Sage X3, as shown in the screenshot below.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-03-\u2013-Custom-Report-Code-Creation-1024x462.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-03-\u2013-Custom-Report-Code-Creation-1024x462.png\" alt=\"Figure 03 \u2013 Custom Report Code Creation\"><\/a><\/center>\n<font size=\"2\"><center>Figure 03 \u2013 Custom Report Code Creation<\/center><\/font>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>\uf0b7<\/strong>In the <strong>custom script<\/strong> created in Step 1, add the report execution logic with the required parameters. Refer to the screenshot below for reference.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-04-\u2013-Report-Execution-Logic-1024x410.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-04-\u2013-Report-Execution-Logic-1024x410.png\" alt=\"Figure 04 \u2013 Report Execution Logic\"><\/a><\/center>\n<font size=\"2\"><center>Figure 04 \u2013 Report Execution Logic<\/center><\/font>\n\n\n\n<p>Step 3: Configuring the Workflow Notification<br>The final step is to configure a workflow notification so that the generated report is sent automatically to the intended recipients via email.<\/p>\n\n\n\n<p><br><strong>\uf0b7Create the custom workflow code<\/strong><br><strong>\uf0b7Select Event Type:<\/strong> Miscellaneous Code<br><strong>\uf0b7Event Code<\/strong>: ARP<br><strong>\uf0b7<\/strong>In the Condition tab, add the Report Code: ZINACTSUP<br><strong>\uf0b7<\/strong>Tick the Trigger Mail option.<br><strong>\uf0b7<\/strong>In the Recipient tab, add the recipient email address and set Send Email to Yes.<br>\uf0b7In the Message tab:<br><strong>o<\/strong>Under Object, enter the email subject.<br><strong>o<\/strong>In the Text section, add the email body content.<br><strong>\uf0b7<\/strong>Tick the Group by Recipient option.<br><\/p>\n\n\n\n<p>Refer to the screenshot below for configuration details.<\/p>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-05A-\u2013-Custom-Workflow-1024x383.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-05A-\u2013-Custom-Workflow-1024x383.png\" alt=\"Figure 05(A) \u2013 Custom Workflow\"><\/a><\/center>\n<font size=\"2\"><center>Figure 05(A) \u2013 Custom Workflow<\/center><\/font>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-05B-\u2013-Custom-Workflow-1024x389.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-05B-\u2013-Custom-Workflow-1024x389.png\" alt=\"Figure 05(B) \u2013 Custom Workflow\"><\/a><\/center>\n<font size=\"2\"><center>Figure 05(B) \u2013 Custom Workflow<\/center><\/font>\n\n\n\n<center><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-06-\u2013-Email-Notification-1024x452.png\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" class=\"size-full\" style=\"border: 1px solid #A9A9A9; padding: 2px; margin: 2px; \nalign: center;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2025\/08\/Figure-06-\u2013-Email-Notification-1024x452.png\" alt=\"Figure 06 \u2013 Email Notification\"><\/a><\/center>\n<font size=\"2\"><center>Figure 06 \u2013 Email Notification<\/center><\/font>\n\n\n\n<p><\/p>\n\n\n\n<p>With Sage X3\u2019s combination of recurring tasks, custom 4GL scripts, and workflow-driven Excel reports, repetitive tasks like supplier inactivation become effortless. Automating supplier inactivation in Sage X3 using a 900-day transaction rule is an effective way to keep your supplier database clean and efficient.<\/p>\n\n\n[about_us_blog_common]\n","protected":false},"excerpt":{"rendered":"<p>Managing supplier data effectively is essential for maintaining a clean and accurate vendor list in Sage X3. Over time, some suppliers may become inactive \u2014 perhaps due to discontinued business relationships or long periods without transactions. Rather than manually tracking and inactivating these suppliers, Sage X3 allows us to automate the process using recurring tasks\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2025\/08\/29\/sage-x3-automation-inactivating-suppliers-after-900-days-with-recurring-tasks-and-excel-output\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[461,1632,1822,2841,2432],"class_list":["post-31149","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","category-integration","tag-crystal-report","tag-recurring-task","tag-sage-x3","tag-suppliers","tag-workflow"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=31149"}],"version-history":[{"count":10,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31149\/revisions"}],"predecessor-version":[{"id":31159,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/31149\/revisions\/31159"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=31149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=31149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=31149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}