Our Director of Professional Services, Lorren Zemke, will be taking you through the SmartConnect processing sequence for this week’s Tech Tuesday!

In this article I am continuing my series of discussions on how SmartConnect processes data. Previously I’ve used examples on summing values and working with line sequence numbers. Today I will diagram the process flow of SmartConnect, using the process of sending data to Microsoft Dynamics GP but the same process is used for all maps.

The basic steps fall into the following categories:
  1. Pre-Map Tasks
  2. Data Read
  3. Transformation
  4. Pre-Document Tasks
  5. Document Send
  6. Post Document Tasks
  7. Post Map Tasks

Pre-Map Tasks 

Pre-Map tasks are executed before the data is read from the data source. This can be document processing tasks such as moving files, running scripts to ask the user for values, running another map and reading data from a SQL table. 


Data Read 

Pre-map tasks have finished executing and the data is being read from the data source. 

One specific task within SmartConnect, after the data is read, is called SQL Validation. This task is used to query SQL tables based on data from the data source. The Validation logic can verify if data exists or does not exist allowing the map to stop processing if the logic is not met. 

This section of data is processed before it is sent to the destination. All of the column calculations are done at this time and the data is prepped for sending to the destination. In the case of Dynamics GP, SmartConnect is creating the XML file that will eventually be sent to eConnect. In a call to a web service destination, SmartConnect is generating the object needed to make the call and send data to that web service.

Pre-Document Tasks

The tasks created in this section happen immediately before each document is sent to its destination. At this point all data has been retrieved and all calculations with the map have taken place.
Use the tasks in this section for setting global variable data that will need to be used for Post Document or Post Map tasks.

If you are using Global Variables in your map, you can clear them out at this time to get them ready for the next document unless you need them for a Post Document or Post Map Task.

Document Send
SmartConnect creates a connection to the destination and sends a single document.

Post Document Tasks
Once a document has been sent to the destination, based on whether the document was successful will determine which set of Post Document Tasks will execute. Tasks can run if the document was successfully integrated or not. If a task needs to run regardless of whether the document was successful or not, the task needs to be placed.

The Pre-Document Tasks, Document Send and Post Document Tasks will continue to loop based on the value set for the Map Keys on the Data Source section of the map.

Post Map Tasks
After all data has been sent to the destination, SmartConnect determines if the map was successful or not to determine which set of tasks to execute. For all destinations but Dynamics GP it will depend if even one document or task is listed as having failed, the tasks that are part of the failed document section will execute. Only if 100% of the documents are successful will the map success tasks execute.

Happy Integrating!

Interested in learning more about SmartConnect? Reach out to our Sales Team at sales@eonesolutions.com for more information!