I have a choice about today

The alarm goes off. Either, You put it on snooze, trying to grab some shut-eye for the last time or wakeup with the first alarm. I chose not to snooze the Alarm; here is my new post about Bulk upload in adobe campaign.

Why do we need Bulk upload utility in the first place? Most of us work in two type of projects either migration project or new development project for Adobe campaign. Either case we deal with lots of file resources, sometimes we have to move that from one instance to another or get new resources from our third party vendors. Does this scenario sound familiar? well, In Adobe campaign we do not have a facility to upload multiple files in one go as it’s console will permit you adding one resource at a time, which is time-consuming.

 

In addition, it proved to be impossible to transfer images from one instance of Campaign to another – xtk:fileRes records yes, in a package, but absolutely not the associated files. This led us to just accepting for a long time that we had no images in the Dev and QA environment, and so couldn’t properly test anything.

Most of the time our customer demands us to use a library of assets and they update that library in file system and we use assets from that Filesystem library in our instance(DEV, QA, and production alike), with this demand, comes the demand for bulk upload utility so that we can upload multiple assets in one go.

The Solution, Thus facility can be achieved with a custom web application in Adobe Campaign.

file bulk import:Adobe campaign

File bulk import web application workflow

Let’s understand each activity used in this workflow:

Use a query to select all the sources folders for file resources.

Query: template equal to ‘xtkFileRes’ and no this folder is a view

Select all where model is equal to xtkFileRes and it’s  not a view folder(read-only)

JavaScript activity will be used to select folders with write access only.

Select File page activity will be used to prepare a form for bulk upload.

Javascript Activity will be used to unzip the uploaded file and create the resources and this will consider the os type.

Now everything works but we have a limitation that this file will not be available in all frontal servers as mentioned by Vipul in Adobe forms.

to overcome this I dug into the code and found one out of the box method which will solve this.

xtk.fileRes.PublishIfNeededFromId(res.id);

Once you are able to save the resources you can use this function call which will publish this resource to all your frontal servers.

Any questions, drop in the comments below and I’ll endeavor to answer them as soon as I can – or connect with me over LinkedIn athttps://www.linkedin.com/in/campaigndiscovery/. Happy Uploading! 🙂

 


Amit Kumar

Results driven Adobe Certified Architect with extensive experience managing and implementing marketing Strategies to drive business growth. Enjoy optimizing the customer experience through the use of data, futuristic thinking + channel mixing – e.g., using creative combinations of traditional methods + shiny new toys like automation platforms.

4 Comments

Ashish Ghai · February 7, 2018 at 12:40 pm

You rock ! thank you so much 😉

Gunjan · February 8, 2018 at 8:25 am

Hi Amit. Great Article!!

Is there any option to parse .gz.gpg file flowing through an SFTP location. Our client is really worried about data security so will be sending .csv zipped with.gz and encrypted through .gpg
So the filename will be something like abc.csv.gz.gpg

Thank you in Advance!!

    marketingcloud · February 8, 2018 at 8:36 pm

    Thanks, Gunjan, yes it is possible. You can configure your environment to use gpg, for hosted environment raise a ticket with Adobe. Now you have to update the server side js to use this code to decrypt

    function decryptUploadedFile(fileObject) {

    var fullName = fileObject.fullName.toString();

    var outputFile = ‘decryptedFile.xxx’;

    var systemCommand = “gpg –output ” + outputFile + ” –decrypt ” + fullName;

    var result = execCommand(cmd, true);

    }

    To handle multiple keys, you will need to import all of them into your gpg and the use one or another to encrypt by using the switch -r or –recipient when calling gpg.

      Gunjan · February 12, 2018 at 1:33 pm

      Thank you for replying Amit. I will try the solution.

Leave a Reply

Your email address will not be published. Required fields are marked *