/
2024.2 3. Export process

2024.2 3. Export process

As mentioned in 1. The overall design of the system, the Export process is a two-step process where the first step is split thru multiple modules. This section will be updated with a specific workflow for each.

Adding Export action to Queue

As an example, we can look into \RocketWeb\NetSuiteOrder\Observer\OrderPlaceObserver::execute() where we see a simple logic of few checks (if the Connector is enabled; if the feature is enabled; if an order should be skipped for some reason) which leads to a Message being created & populated with data and pushed to Queue.


Process Export Queue

Each process starts in the netsuite:cron command. When run mode is export this workflow is triggered. Let's take a closer look on how this works.

The main method that is called is \RocketWeb\NetSuite\Model\Process::processExport(). 

Fetch Batch of Queue Messages

Similar to Import process, we fetch a batch of queue messages. The batch size is defined in configuration.

Loop over Messages and Process them

We loop thru all of the $messages and unpack each $message. Based on the $message action type, the Processor $processModel is fetched. We run the \RocketWeb\NetSuite\Model\Process\Export\AbstractExportProcessor::process() which takes care of sending the Record/Data to NetSuite. 

Related content