[SalesForce] Automation studio SFTP file drop trigger to Import Activity

Background: We have a simple automation studio workflow defined that would trigger when file with a certain name pattern is dropped and that then initiates the import activity (which also relies on a similar file name pattern so that it knows which files it can process).

Problem: What we have noticed is that automation studio trigger does not pass the file name information that triggered the workflow to the Import Activity and that creates a problem for us.

For eg:
file 1 dropped, automation studio kicks off hands it over to import activity and import done successfully (as it finds just one file to process), no problem so far.

file 2 dropped, automation studio kicks off again, hands it over to the import activity, but this time import activity sees two potential files it can process, file 1 and file 2 so it randomly picks one and starts processing it (which is a problem), although I feel that it should know that it just finished processing the file 1 a little while back, so it should not reprocess that.

Now as I understand this maybe by design, so wondering if other folks here have run into similar issues and how they got around it?

I am pretty new to marketing cloud so could use any feedback I can get.

Best Answer

So the way I solve file conflict scenarios if I have no control over the file naming patterns is:

Create 2 File Locations pointing to 2 seperate folders in your FTP:

File Locations:

import/ftp_file_drop_1/file.csv
import/ftp_file_drop_2/file.csv

Setup 2 seperate File Triggered Automations, each automation pointing to 1 of the file locations.

This prevents conflicts with same file naming patterns.

If you have control over the file naming pattern, then @Data_Kid's Answer with time wild cards appended to the file name will solve your problem and then you can just use a Substitution String %%FILENAME_FROM_TRIGGER%% to pick up the latest file name dropped on FTP as each file drop will contain a different timestamp.

Hope this helps.

Related Topic