Drafting Deleted Products from Shopify to Dokan

Created by Aleksandra Furundzic, Modified on Thu, 28 Nov at 10:36 AM by Aleksandra Furundzic

TABLE OF CONTENTS


Description


In this article, we explore a common use case for SyncSpider: automating the management of deleted products from Shopify to Dokan


Specifically, this process involves transferring product information from Shopify to a CSV file and then updating Dokan to mark deleted products as drafts.


To achieve this, we will configure two tasks in SyncSpider. 




Step 1: Shopify to CSV Task 


This first task exports primary product data from Shopify to a Custom CSV file hosted on SyncSpider's SFTP server.



1.1 Starting the Task and Selecting Integrations


Begin by creating a new task in SyncSpider and click 'Next' to proceed.


Select Shopify as your Source Integration and choose the Product entity from the dropdown. 

Select Custom CSV as your Target Integration, and choose Custom CSV as the entity. 


Note: With a SyncSpider subscription, you gain access to an SFTP server hosted within SyncSpider’s infrastructure. This server will be used to store the CSV file generated by this task. see below example custom CSV integration configuration. 





1.2 Configuring the Source Integration (Shopify)


Configure the source by selecting All Products in the "Products to import" dropdown. 


 

No additional filters are required, so you can skip Source filtering and move on to Target Configuration. 



1.3 Configuring the Target Integration (Custom CSV)


For the target configuration, it is important to first select an SFTP path to the folder where the CSV will be stored.  To do so click on the magnifying glass icon next to the SFTP path to folder field, which will open a pop-up window.





From the pop-up, select the "files" folder under HOME.




Next, provide a descriptive name for the output file, such as "Deleted Products Draft.csv," to avoid confusion with other CSV files.



Set the export behavior to Overwrite file each time to ensure the file always reflects the most recent data.




Lastly, create two columns: Product Code and Product Name. Including the product name is optional but helps with quicker product recognition when reviewing the file.


 


1.4 Mapping


Map the Inventory/Variant ID from Shopify to Product Code in the CSV. 

Map the Title from Shopify to Product Name in the CSV. 


 




1.5 Setting Task Automation


On the task settings page, under Task automation,  set the Trigger to Schedule and the repeat frequency to Daily



Step 2: CSV to Dokan Task


This second task retrieves data from this CSV and updates Dokan to reflect the necessary changes. 

Please note that you need to run the first task before setting up the second task. 


2.1 Starting the Second Task and Selecting Integrations


Begin by creating a new task in SyncSpider for the second step of the automation process and click 'Next' to proceed.


Select Custom CSV as your Source Integration and choose the Custom CSV entity. 

Select Dokan as your Target Integration, and choose Product as the entity. 




2.2 Configuring the Source Integration (Custom CSV)


For the source configuration, begin by locating the file that was generated in the first task. 

Again, make sure the first task has been successfully run before proceeding; otherwise, the file will not be available. 


Use the magnifying glass icon in the SFTP path to file field to browse and select the appropriate file.




In the Record Processing section, select Import changed data only to ensure that only products that have been deleted or otherwise modified are imported, and enable the Track record status option to monitor these updates.



Finally, set Product Code as the unique column by checking the corresponding box in the column settings.




2.3 Source Filtering 

In this step, you need to apply a filter to ensure only the deleted products are processed in this task.


Set the filter as follows:

  • Filter By: SyncSpider Record Status.
  • Choose Condition:  Equals To.
  • Enter Value: deleted.





2.4 Step 4: Configuring the Target Integration (Dokan)


For the target configuration, you will need to set up the parameters for the Dokan integration as follows: 


  • Choose Product Unique Identifier Field (UID): Select SKU as the unique identifier to match products.
  • Batch Size: Keep the default or set an appropriate size based on your data (e.g., 50).
  • Create Parent Product Automatically: Deselect this option to ensure that no new parent products are created.
  • Only Update Products: Enable this option to ensure that only existing products in Dokan are updated.
  • Update Only Mapped Attributes: Enable this option to restrict updates to only the attributes that are mapped in the next step.




2.5 Mapping 


In this step, you will map the data from the CSV file to Dokan. Start by mapping Product Code from the CSV to SKU in Dokan. 



Next, map a Constant Value from the CSV to Dokan Vendor, which will trigger a pop-up window allowing you to select the appropriate Dokan vendor who owns the product.



Finally, map SyncSpider Record Status from the CSV to Status in Dokan. 


Configure this mapping by setting the Source Attribute to deleted and the Destination Attribute to Draft to ensure that deleted products are correctly marked as "Draft" in Dokan.

 




2.6 Setting Task Automation



For this task, configure the automation to run after the successful completion of the first task. 


In the Task Automation section, set the Trigger to On event, and choose Task succeeded event as the condition. Then, select the first task (e.g., Draft Delete Products pt.1) as the event to trigger this task. 


 




Congratulations! You have now set up an automated process to update deleted products from Shopify to draft status in Dokan.



Additional Resources


For additional information on Shopify, Custom CSV or Dokan check out these resources:





Shopify, Custom CSV and Dokan are just some 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