Spryker facilitates companies to develop astute transactional business models in enterprise marketplaces, B2B & B2C. One of the best cloud-native platform-as-a-service solutions, it helps developers, marketers, and sales teams alike. Alumio, on the other hand, is touted as one of the best iPaaS solutions that make integrations a cakewalk. Integrating Spryker with Alumio is as easy as it can get, and anyone can do it within minutes!
This guide takes a swipe at how to integrate Spryker with sFTPs. For understanding, we will consider four integrations which are created and we will tour through them one by one. Out of these four, three are unique entities while one replicates bulk capabilities.
Two routes retrieve data from the SFTPs and send them to Spryker - Merchant Data from sFTP to Spryker and Product Offer from sFTP to Spryker.
Also, the product data routes are duplicated (or replicated) to show batch processing- [Bulk] Product Offer from sFTP to Spryker.
There are the four integrations that we will discuss in this guide.
How To Integrate Spryker With Alumio?
To begin with, go to Connections (on the left panel) of Alumio.
Step X1: Click on Routes (under Connections).
Step X2: Utilize the filter Name and search for Spryker.
Step X3: The four routes created for Spryker will be shown.
Merchant Data from sFTP to Spryker
Step 1: Click on Merchant Data from sFTP to Spryker
-
You will observe that there are routes consisting of Incoming Configuration as well as Outgoing Configuration. While the former is responsible for data import, the latter is responsible for data export.
-
There is also an option to Activate retrying of failed tasks. Should you choose to activate it, you can customize its settings on various parameters such as Number of attempted retries, Retry interval in minutes, Statuses (Failed/Skipped), Enable realtime processing.
Note: If you choose to enable realtime processing, you simply need to establish data imports and the export will happen automatically from the data imports.
Here’s how to do that.
Enabling Real Time Processing (Going The Manual Way)
Step 1: Go to Connections and click on Routes again and run the Incoming Configuration (sFTP- Get Merchant Data).
Step 2: Click on Logs and then on the refresh button at the top right corner.
Step 3: You will observe that a new process has started. Click on the Logs button for the new process. The logs will open and you will see the tasks that are created, Alumio exercising API calls to the end-points which are accepted by Spryker, the finished tasks, etc)
Step 4: You can also take a deeper look at the incoming configuration by clicking on the Edit button.
-
You can view the Subscriber, Filesystem, Patterns (for example, merchant_data.csv), Parser, etc.
-
There is also an option to Limit the number of files and Limit the number of parsed items. The latter can come handy if the file size is very big. For example, if you want to read 10,000 files at a time, then it can be configured from here (Limit the number of parsed items).
-
You can also add Plugins for the incoming configuration to activate some extra functionalities whenever required.
-
There is also an option to Add Entity Transformers.
Step 5: Now, click on Tasks (on the left panel). You can see all the merchant tasks listed there.
Not Enabling Real Time Processing
Let’s consider a scenario where we do not Enable real time processing. In this case, when you pull some information, new tasks will be reflected when you go back to the Dashboard. If you open it, all merchant data will pop up in a list.
- If you open a task and click on Entity Data, you can visualize the data pulled from the CSV, translated to a JSON format by Alumio. It makes data processing easy for the data strip when the router starts functioning.
Here’s how to process it manually.
Step 1: Click on Routes (under Connections).
Step 2: Click on the “…” button on the top-right corner and click on Run Route.
Step 3: Click on Logs and then on the refresh button at the top-right corner.
Step 4: You will see that tasks with status (NEW) disappear from the list (or queue) as they are getting processed and eventually being sent to Spryker.
Step 5: Deactivate the New filter (top-left corner) and you will see that the tasks have been completed.
Step 6: Open one of the tasks to verify and go to Export Messages. You will see that the specific merchant data has been sent to Spryker.
If you observe closely, sometimes you will notice that the data that was sent to Spryker is slightly different from the data that was originally retrieved from the CSV.
To mitigate this, you can map the data from the incoming schema to where it is destined for using a transformer. Here is how to do it!
Step 6.1: Simply copy the Entity Data.
Step 6.2: Click on Routes (under Connections) and go to Outgoing configuration for the merchant data.
Step 6.3: Head for Entity Transformers and click on View configuration underneath it. You can visualize the transformer that has been configured here.
There might be some data transformers reflecting move actions.
Step 6.4: For the Value mapper transformer, you will see an opening_hours key, for which you need to implement the transformer called Json: Decode to array.
Note: This transformer is designed to take a Json string and convert it to an array, as required by Spryker.
Step 6.5: If you wish to test the transformer, paste the **Entity Data (**that you had copied on step 6.1 ) under Transformer tester > Entity Data (on the left) and hit the Run Test button.
You will see that the incoming data is converted to an array which will eventually be sent to Spryker.
Order Data from Spryker to sFTP
Step 1: Repeat the steps X1, X2, and X3 (mentioned in the beginning)
Step 2: Click on Order Data from Spryker to sFTP
Step 3: Once again, you will come across the Incoming Configuration and Outgoing Configuration to pull the order information from Spryker and create the orders on sFTP respectively.
The entire process will run automatically if you Enable real-time processing.
Step 4: Click on Scheduled Jobs. There will be a scheduled job present attached to this route - Order Data from Spryker to SFTP- Incoming & Outgoing.
From here, you can set the time interval for the tasks executed. For example, you can set it at 1 minute, 2 minutes, and so on.
Step 5: Now, click on Logs. Here, you can view all the tasks that are being executed for the time interval you have set.
Product Offer from sFTP to Spryker
Step 1: Repeat the steps X1, X2, and X3 (mentioned in the beginning).
Step 2: Click on the Incoming Configuration of Product Offer from sFTP to Spryker to begin with.
Step 3: Click on the “…” button on the top-right corner and click on Run Route. A pop-up will appear at the top which says “Subscriber has been consumed”.
Step 3: Now, click on the Dashboard (on the left panel) of Alumio. You will see that there are zero New Tasks being shown.
If you click on Click to view more information on the pop-up being shown above. You will see every iota of data is being filtered since the Delta Storage mechanism is being implemented (in this scenario). It is used to detect changes.
Step 4: Click on the Storages (on the left panel) of Alumio and then on Storages again**.**
Step 5: Click on [Spryker PoC] Consumed Product Offers and open it.
Step 6: Next, click on the Entities. It lists all the product offers. If you open any of the Identifiers, you will see it encapsulates the entirety of data.
Now, it compares whether there has been a change in the data. If yes, it will filter the data, or else, it will simply update the storage and create a new dial.
For a test run, here is what you can do.
For example,
- You can change the value of the variable quantity_max to 14 and click on the Save button. This will make the identifier data different from what had been retrieved from the CSV.
- You can also delete an Identifier of your choice.
Step 7: Now, you can revisit the Incoming Configuration (step 2) and re-run it. Subsequently, go back to the Dashboard again. Now, you will see two New Tasks have been created, courtesy to our changes in one identifier and the deletion of the other.
Step 8: On clicking the New Tasks, you can view them. Click on the Route for the first one. Click on the “…” button on the top-right corner and click on Run Route to run it.
Step 9: Go back to the Tasks segment and deactivate the New filter (top-left corner) and hit the refresh button at the top-right corner. Now, you will see that the task is being processed
Step 10: Revisit the Route (step 8) and click on Logs to view the tasks that are being processed. The frequency of the tasks accomplished is dependent on the systems being communicated.
To speed up the process, you can implement Build Processing since it is supported by Spryker. Instead of transferring entities separately, this approach makes it possible to send the entire file at once or in batches (in bulk).
[Bulk] sFTP- Get Product Offer Data
Step 1: Repeat the steps X1, X2, and X3 (mentioned in the beginning).
Step 2: Click on the Incoming Configuration of Product Offer from sFTP to Spryker and then run it by clicking on the “…” button > Run Route.
Step 3: Go to Tasks (on the left panel) of Alumio. You will see that a new task has been created.
Step 4: Click on the task (the Identifier) to open it. Then, click on Entity Data. Here, you will see that it contains all the offers wrapped under it and it has been transformed to the data format that Spryker requires.
Step 5: Click on Connections > Outgoing. Click on [Bulk] Product Price - Create. Scrolling down, you will see that it has a transformer (List: split into chunks) which is responsible for splitting the list into chunks.
You can change the Length field as per your requirements (let’s say 200).
Step 6: Run the route again by repeating (Step 2). Open the task again (Step 4) and click on the Export Messages and check the data logs. You will see that there are multiple API calls with 200 products each as per the length set by you (Step 5).
For example if there are 1018 products, there will be 6 API calls with 5 of them having 200 products each while the last one will have the remaining 18 products.
Closing Note!
Alumio is an industry-leader when it comes to providing top-notch iPaaS solutions to help companies and businesses integrate numerous systems seamlessly while having a centralized control and management for those. As this guide shows, whether it is one-to-one or one-to-many integrations, bulk-processing, real-time integrations, etc Alumio. To learn more, stay tuned to our other documentations and guides and feel free to contact our experts today!