The Swarzędz plant in Poland is, as R. Twining and Company sp. z o.o. proudly points out, the largest tea factory in Europe. It is not only large, but also modern and highly automated. The latter term refers not only to production, but also to the handling of administrative and business processes using modern IT systems and tools. In the last year, processes that were successfully automated included the generation and distribution of commercial invoices, as well as the preparation of additional documents accompanying the shipment of goods to customers, which are necessary for the correct procedure of authorizing goods for trade in accordance with the laws of individual countries.

Invoices and other documents

Food production is, for obvious reasons, one of the more regulated industries. The sale and distribution of food products are subject to a number of requirements, rules and regulations that result in the need to prepare a set of documents required by various government agencies, including sanitary and customs ones, both in the country of shipment and in the country of destination. A set of such documents must be prepared and available for each shipment, the weekly volume of which is more than 300 and for which almost 400 additional documents (not including the invoice!) must be prepared during the high season.

Different countries have different requirements in this area. As a result, an exporter such as Twinings, which has customers in more than 120 countries, must be ready to prepare a document required, for example, only in Australia or only in the US, with different levels of detail and in an acceptable format. Additionally, one has to be very flexible and ready to quickly respond to the changing legal requirements of destination countries regarding, for example, the presentation of data and its formats in documents, as well as changes in the naming and appearance of the documents themselves.

In addition to sales invoices, the company prepares several different additional documents (some in several variants), which are attached to shipments depending on the destination country and even depending on the type of products in a specific transport. Several IT systems (including SAP and the SharePoint platform) as well as account managers from the Customer Service team are involved in this process.

Project and tools

In 2022, in cooperation with All for One Poland, Twinings initiated a project to automate the invoicing process (the first project) and the preparation of supporting documents accompanying the shipping and distribution of tea (the second project, in the first half of 2023).

Automation 360 – the RPA (Robotic Process Automation) platform from Automation Anywhere was used to automate processes. The development environment was set up on a remote machine. The process was built using the cloud version of Automation 360. It was based on the specifications and descriptions of the processes and their variants prepared by Twinings employees, in which individual documents are created, as well as auxiliary subprocesses used to read configuration files located on the virtual machine, downloading and updating data from the list on the SharePoint platform. The solution also used SharePoint REST API and scripts written in Python and Visual Basic.

Due to the fact that in the second project the process was very extensive and the entire work (from the configuration of the development environment to the implementation of the last subprocess) took six months, it was decided to launch the solution gradually. When a subsequent subprocess was ready, it was added to the schedule. A month and a half passed from the beginning of the creation of the first subprocess to its implementation, and subsequent subprocesses were published on average every three weeks.

This approach allowed for the first automations for additional documents to be launched in a short time after starting the work. Additionally, while working on subsequent subprocesses, we were able to make ongoing corrections for previously unaccounted for cases.

Ewa Zandecka, International Customer Supply Manager, R. Twining and Company sp. z o.o.

Ewa Zandecka, International Customer Supply Manager, R. Twining and Company sp. z o.o.

Bots and people more effective

An invoice prepared in 2 minutes instead of 15. A set of additional documents for shipment ready in less than a minute. Actually, this is where I could end listing the benefits that the Customer Service team has gained from automating invoicing and generating additional export documents. But I would also like to emphasize that our work is now better organized – more balanced and efficient. Employees are more motivated and satisfied with their tasks, and have time and space for conceptual work and improving their competencies.

Instead of performing manual, boring and repetitive operational activities, they can focus on overseeing the processes executed by the bot. We can devote time to tasks directed at activities that bring business, operational and financial benefits. In addition, the knowledge of RPA technology that we gained during the projects inspires us to extend automation to cover other processes and areas.

Ewa Zandecka, International Customer Supply Manager, R. Twining and Company sp. z o.o.

An invoicing bot

Twinings uses the SAP system to handle the sales and invoicing process. The SharePoint platform is the central repository for both templates and shipping documents stored in folders. At the same time, it is the central place for handling shipments where data on shipments ready to be sent is transferred to a dedicated folder (a packing list).

Once launched, the bot prepared by All for One Poland “reads" the packing list, processes the newly added shipments and initiates invoicing on the SAP side. If all the required fields are filled in correctly, an invoice (in PDF format, completed with defined additional information) is generated and sent to the appropriate location on SharePoint as well as e-mailed to the account manager. The packing list is also supplemented with the invoice number generated by the bot.

If the required conditions for a given shipment are not met, an appropriate alert appears in the report and at the same time an e-mail is generated informing about the error category. This e-mail is sent to the designated persons responsible for supervising the entire process.

Once the process is completed, an email is generated and sent summarizing the number of shipments identified, both correctly processed and containing errors (if any), broken down into categories.

The bot works according to a set schedule, i.e. it is launched at specific times, on a daily shift, on average every two hours. If necessary, it is possible to make changes to the bot’s work schedule, e.g. by increasing the frequency of its work during the day or changing the days of the week.

It is worth noting that the bot can be configured without additional development work. It is easy to add a new product category, change the naming scheme, output information, pricing terms, numbers of documents generated, locations, logs, recipients of status emails.

Additional documents

The effective implementation of automation of the invoicing process was an encouragement to take up the challenge of improving another process, i.e. generating additional export documents. The manual filling of document templates and the creation of files recognized by customers as reports and certificates were successfully replaced with the work of another bot.

And there was a lot to fight for. Out of more than a dozen different documents generated manually by the Customer Service team members, the six most frequently recurring ones in customer requirements were selected. They were the most time-consuming documents, filled in on a copy-and-paste basis, and created using output data from various sources.

Additional difficulties in manually generating these documents were caused by different customer requirements regarding the document appearance and the level of data detail, as well as format (Excel spreadsheet, document in .pdf or .docx format) for the same type of document.

As a result, people responsible for the sales process and contacts with customers spent a significant part of their time on “paperwork" – repetitive and tedious filling in boxes in templates, copying data and checking themselves to eliminate and reduce errors and mistakes.

Bots at Twinings

An invoicing bot

  • Saves 8 days of human work – with an average monthly volume of almost 300 invoices issued
  • Exactly duplicates the work of a human (the bot’s algorithm fully reproduces the steps and preserves their order)
  • Performs 67 steps/clicks to issue a commercial invoice – the same number of clicks a human would have to perform
  • Currently issues about 85-90% of invoices per month (the remaining approx. 15% are specific cases, deliberately excluded from automation)
  • It takes it a maximum of 2 minutes to issue one invoice (for the same end-to-end process, a human needs 15 minutes – the difference is 13 minutes per invoice!)
  • Issues invoices according to an established and known schedule that can be modified (process standardization)
  • Reduces the time needed to make documents available to customers, other business partners and subsequent export processes, including customs clearance and as a source/input for additional documents
  • Speeds up financial processes – sales reporting takes place in real time

A bot – additional export documents

  • It takes it a maximum of 45 seconds to create 1 document – instead of an average of 6 minutes of human work
  • Supports the standardization of six documents, which constitute approximately 80% of all additional documents issued by Twinings
  • Accelerates and shortens the process of legalization of documents issued by state authorities
  • Speeds up the availability of additional documents for customers

How does it work?

Preparing to automate the creation of additional documents required organizing the process, creating a list of all subprocesses and exceptional cases, as well as standardizing the appearance of templates and file naming conventions, which is an added value in the entire area of ​​additional documents. In this process, the output data for the bot is an invoice (previously generated by the invoice bot), from which it downloads the indicated data and reports from SAP.

Currently, the machine is activated twice a day and generates the required additional documents for all shipments in progress. The machine downloads data from the packing list to SharePoint, where information about shipments is sent. This includes such data as a shipment ID, an invoice number, a link to the document folder, information about the additional documents needed and the country to which the tea is distributed. Based on this information, the bot launches the appropriate subprocess and downloads the source document templates assigned to it. It decides on its own what kind of files and in what variant are required, which eliminates the risk of making a mistake or forgetting, for example, to prepare a rarely needed document. The connection to SAP is used to extract the needed data. The next step is to edit the document and save it in the appropriate format (.docx, .xlsx, .pdf).

As with invoices, the finished document is saved in the appropriate folder on SharePoint.

Subsequent iterations are run until the process is complete – that is, until the required documents are created for all finished shipments, or errors that prevent the process from running are identified.

The RPA process automatically creates six different additional export documents. Three of them are applications, which are then submitted to two different state administration institutions (Sanepid and WIORIN). They are the basis for issuing ready-made certificates confirming both the health status of plant products as objects exported outside the EU, as well as the compliance of their production process in accordance with the standards required for food products.

Each application is generated on the appropriate template and in the .docx format required by external administrative authorities and has a different layout of data extracted by the bot from the invoice in the .pdf format. It is worth mentioning here that in some cases, ready-made certificates are subject to subsequent legalization processes in other state administration bodies, which is a requirement of some destination countries to which Twinings teas are delivered.

The next two documents generated by the bot are recognized by customers as product quality certificates, produced as internal documents necessary in a direct business relationship. Since the destination countries have different requirements, several scenarios for the preparation of the same certificate are possible due to the detail of the indicated data, the way and form of its presentation on the document, and the format of the document (.docx and/or .pdf).

The sixth document created in this process is a detailed shipment report, including, among other things, critical pallet number data along with production lot details. This document is prepared by editing the appropriate report generated from SAP. Three variants of the final document are included in two different formats: .xlsx and .pdf, depending on customer demand.

Manufacturer’s maintenance

Automation bots prepared for Twinings are covered by the maintenance service provided by All for One Poland. Developers are responsible for the continued maintenance of the bots (including fixing ongoing bugs) and support business users in their operation.

Benefits

The benefits achieved from automating the preparation of invoices and additional documents are primarily the orderliness and significant acceleration of these processes. The bot does not make mistakes in naming files or saving them in the right place, typographical errors or use the wrong template.

Invoices completed with all required information are generated practically on an ongoing basis and there is no risk of suspending the shipment due to the lack of this critical document. It takes from 15 to a maximum of 45 seconds to prepare the rest of the documents, with a guarantee that it will always be the right and complete set, and if not, the bot will inform you of the reason for the error.

This also improves relationships with customers.

It is also worth noting that the prepared solution can be customized and enhanced, for example, by adding new templates for new documents, without involving developers.

Twinings was founded in 1706 in London. Today it is the world’s second largest tea producer. The company’s best-known products include Earl Grey, Lady Grey and English Breakfast. The company is owned by Associated British Foods, one of the largest food corporations in Europe.

The Twinings factory in Swarzędz – R. Twining and Company sp. z o.o. – began operations in 2011 and has recently become the largest and one of the most modern and automated production facilities. Currently, over 400 tea blends are produced in Swarzędz and shipped to nearly 120 countries around the world.