How to Automate Drafting for Deleted Products

Created by Aleksandra Furundzic, Modified on Fri, 4 Oct at 3:46 PM by Aleksandra Furundzic


TABLE OF CONTENTS


Description


When managing products across multiple platforms, making sure that deleted products are synced properly is important for maintaining accurate data.


In this article, we'll walk you through the process of automating the drafting of deleted products from Etsy to Dokan


While we use these platforms as examples, the same approach can be applied to other integrations, making it a versatile solution for managing product deletions across various platforms.  



Setting Up the Tasks


In this scenario, we will use Etsy as the source platform and Dokan as the target platform. 

The challenge is that when a product is deleted from Etsy, it remains active and outdated in Dokan. 


To resolve this, we need to automate the process of detecting deleted products on Etsy and drafting them on Dokan.


To achieve this, we will set up two tasks in SyncSpider. 


First and second SyncSpider tasks created to sync and draft deleted products from Etsy to Dokan, showing their source and target platforms.


The first task will pull all existing products from Etsy and store them in a CSV file, while the second task will use this CSV to identify deleted products and draft them on Dokan. 




Step 1: Creating the First Task (Etsy as Source, CSV as Target) 


The first task will pull all current products from Etsy and store them in a CSV file. This step ensures we have a record of the current product status on Etsy, which will later be used to track deletions.


1.1 Create task


In SyncSpider, navigate to the Tasks section and click Add New Task.


SyncSpider task setup showing Etsy as the source and Custom CSV as the target for exporting product listings.

Select Etsy as the source platform where the products are currently listed.


For the target, choose Custom CSV to save the product data.



1.2 Source Configuration


During the source setup, do not apply any filters. We want to export all the products from Etsy. 


SyncSpider source filter configuration page allowing users to set conditions for filtering the source data.


This ensures that the CSV file will contain all active products, making it easier to track any future deletions.




1.3 Target Configuration


Select the appropriate folder where the CSV file will be stored. In this case, we choose the files folder in the home directory.


Selecting the target folder in SyncSpider for saving the CSV file generated during the task.

Name the file something relevant, like "Products_list.csv". 


Set the behavior to Overwrite file each time. This ensures the file will be updated with the latest product information every time the task runs.


Configuring the custom CSV target integration in SyncSpider, including setting the output file name and selecting the overwrite behavior.


1.4 Mapping: Assign Required Fields

In the mapping step, map the following fields:


Mapping fields in SyncSpider, linking the listing ID, title, and SKU from the source CSV file to the corresponding fields in the target.

  • Listing ID: This is the unique identifier for the product and is mandatory for tracking.
  • Title: This is added as a reference so you can identify the product easily in the CSV file.
  • SKU: If applicable, map the SKU field. In this is specific setup it will be used later to update products on the target platform.


After the mappings are set, click Next and complete the task setup.





1.5 Run the task 


Run the task and export the product data from Etsy into the CSV file stored on SyncSpider's SFTP. 


With the newly created CSV file containing all current products from Etsy, we can now move on to the second task, which will track deleted products and draft them on Dokan. 


The second task will use this CSV to track deleted products and update their status to "draft" on Dokan.




Step 2: Create the Second Task (CSV as Source, Dokan as Target) 


This task will use the CSV created in Task 1 to identify deleted products and draft them on the target platform, Dokan. 


2.1 Create new task


Create a new task in SyncSpider. Select Custom CSV as the source and select Dokan as the target platform where the products will be drafted.


SyncSpider task setup showing Custom CSV as the source and Dokan as the target.




2.2 Source Configuration: Track Changes and Deleted Products



In the source configuration, select the CSV file created in Task 1 from the SyncSpider SFTP (e.g., /files/Products_list.csv)


Selecting the CSV file generated in the first task from the SyncSpider SFTP folder during source configuration.


After selecting the CSV file, configure the source settings:


Configuring the source in SyncSpider, selecting the CSV file path, enabling record tracking, and mapping the listing ID as the unique identifier.


Import changed data only: This option will allow SyncSpider to detect only the changes, such as deleted products.


Track record status: This option keeps track of the products that are deleted, updated, or newly added.

Set Listing ID as the unique identifier for each product.




2.3 Source Filtering


Apply a filter where SyncSpider Record Status = deleted.



Applying a source filter in SyncSpider to only process records with a status of 'deleted' for the task.

Filter by SyncSpider Record Status.


Set the condition to Equals to and the value to deleted.


This filter ensures that only products marked as deleted in Etsy will be drafted on Dokan.



2.3 Target Configuration: Dokan Setup


Set the target configuration to Only update products. This ensures that existing products will be updated, but no new products will be created or modified incorrectly.


Configuring the target integration in SyncSpider to only update existing products during the task execution.

2.4 Mapping: Map the Required Fields



In the mapping step, map the following fields:



Mapping fields in SyncSpider, linking SKU, vendor, and status fields from the source CSV file to the corresponding fields in Dokan.


Listing ID: Map the listing ID from the CSV file to the product ID in Dokan.


SKU: If SKU was mapped in the first task, map it here as well.


Vendor: Map the vendor information, specific to Dokan, from the CSV file.


Status: Set a constant value to mark the product status as "Draft" in Dokan.



Step 3: Scheduling and Running the Tasks


After setting up both tasks, the final step is to schedule them to run automatically at regular intervals to keep the products up to date. 


Setting up task automation in SyncSpider, with the option to add a trigger for automatic task execution based on a defined schedule.


Set a trigger to schedule the tasks to run automatically, based on your needs (e.g., daily or twice a week).


This ensures the tasks will run regularly and automatically draft deleted products on Dokan whenever they are removed from Etsy.



And that's it! By setting up these two tasks, you can automate the process of syncing deleted products from Etsy to Dokan.


This approach can be applied to various platforms, providing a flexible solution for product management across integrations. 



Additional Resources


For additional information on Etsy or Dokan check out these resources:





Etsy and Dokan are just one of the tools we support! To check the list of the tools and features we support, please click here!


If you don't see your favorite tool on our list, please take the time to send us a request here to create an integration for you or UP-vote it if it's already on the list.


We develop integrations based on requests and up-votes :)


We hope this covers everything. If you have any further questions or need additional clarification, please reach out to us via [email protected] or our chat widget!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article