Versin 0.91
2014 CrwnPeak Technlgy, Inc. All rights reserved. N part f this dcument may be reprduced r transmitted in any frm r by any means, electrnic r mechanical, including phtcpy, recrding, r any infrmatin strage and retrieval system, withut permissin frm CrwnPeak Technlgy. Dcument Histry Authr/Editr Date Reasn fr Change Versin Jasn Y 6/24/2014 Draft 0.90 Jasn Y 9/10/14 Added an example 0.91 CrwnPeak Technlgy 2
Table f Cntents Dcument Histry... 2 FTP Imprts Overview... 4 FTP Imprts Benefits... 4 FTP Imprts... 4 Cnfiguring FTP Imprts... 5 Flder... 5 Mdel... 5 Imprt Cnnectr... 5 Aut Generated Tken frm Imprt Cnnectr... 7 Using FTP Imprts... 8 CrwnPeak Technlgy 3
FTP Imprts Overview In cases where it is nt practical t create each page individually and where existing data can be btained in a structured XML r cmma-delimited CSV frmat, CrwnPeak CMS ffers FTP Imprts t transfer cntent r data int the CMS. The CMS can imprt ASCII data files (TXT, XML, CSV, etc.) and parsing them fr data. FTP Imprts Benefits Ability t pll the cntent r data int the CMS autmatically Schedule: A certain number f times per day (daily, every six hurs, every hur, every 30 mins, every 15 mins, r every 5 mins) Easier t imprt multiple files and handle large jbs FTP Imprts FTP Imprts can be cnfigured t supprt many different prcesses. The first steps that need t be decided is what cntent/data will be imprted int the CMS and hw cntent/data will be used in the CMS. Befre starting the cnfiguratin, it is beneficial t slidify the scpe f the cnfiguratin. What cntent will be imprted int the CMS? Structured XML Cmma/Tab/Pipe delimited CSV Plain Text Others Hw cntent will be used in the CMS? Pages Cnfiguratins Data Others Schedule? Autmatic r Manual? Hw ften it will trigger an imprt? Manual Autmatic Daily Every Six hurs Every hur Every 30 minutes Every 15 minutes Every 5 minutes CrwnPeak Technlgy 4
Cnfiguring FTP Imprts Nte: As f June 2014, Imprt Cnnectrs can nly be cnfigured in the classic UI. Once the Business Prcess is understd, FTP Imprts will be cnfigured in the fllwing way: Flder Create a flder where the file generated dcuments are stred Template Create a new template in /System/Templates/ flder. Add ftp_imprt.aspx file. (Template must include an ftp_imprt.aspx template file which will execute when the imprt is successful.) This template will read/imprt the files frm the remte FTP server and cnvert the cntent/data t the assets (page, cnfiguratin, r data) within the CMS. (Tips: Build the imprt cde in CMS library methds and simply drp the methd in ftp_imprt.aspx. Mve t the next steps after cnfirming the cde using a test asset) Mdel Create a mdel asset in /System/Mdel/ flder Select the template abve Set access prperties t inherit Set apprpriate wrkflw Imprt Cnnectr Once Template and Mdel have been created, the Imprt Cnnectr can be added. Create a new FTP Imprt Cnnectr in System > Cnfigure > Imprt > FTP. Tken: It will be autmatically generated. Label: Name f the FTP Imprt Cnnectr Expires On: Specify the date Daily Max Plls: Specify maximum files per DAY that can use this tken. (Nte: 0 value means there s n limit) Maximum Plls: Specify maximum files that can use this tken. (Nte: 0 value means there s n limit) Dcument User: Specify the wner f the imprted files Flder: Specify the flder where the file generated dcuments are stred Mdel: Specify the mdel that will be used t create the files within the CMS Hstname: Specify the remte ftp hstname t cnnect fr imprting Username: Specify the remte ftp username t use fr lg int the ftp hstname CrwnPeak Technlgy 5
Passwrd: Specify the remte ftp passwrd t use fr l int the ftp hstname Rt Flder: Specify the remte ftp flder where the files t imprt are lcated Cnnectin Mde: Select the remte ftp cnnectin mde (Passive, Active) Use Secure FTP: Select the remte ftp security type (Yes, N) On Cmpletin: Select what shuld happen nce the file(s) have been prcessed (Delete Remte File, Mve T Remve Flder) Frequency: Select the ftp plling frequency (day, 6 hurs, hur, 30 minutes, 15 minutes, 5 minutes) Send Errrs: Specify email address CrwnPeak Technlgy 6
Aut Generated Tken frm Imprt Cnnectr The Tken creates the prper relatinships between the remte files and the template. CrwnPeak Technlgy 7
Verify that if the Tken in the template matches an existing FTP Imprt Cnnectr and part f the remte files name. Example: Template (ftp_imprt.aspx) <% string sztken = "TKlInuxabQn6bzeJ"; //Get this frm FTP Imprt Cnnectr string szfilename = cntext.ftpfilename; bl btkenexists = cntext.ftpfilename.cntains(sztken); if (btkenexists) { // Cde here } %> Using FTP Imprts Once the cnfiguratin is cmplete, the imprt cnnectr will trigger an imprt within 5-10 minutes. After the first trigger, it will autmatically plls the remte FTP/SFTP server a certain number f times based n the cnfiguratin. The remte file needs t have the crrect imprt Tken in it. The Tken has t be part f the file name in rder t be recgnized by the CMS. The imprt cnnectr autmatically triggers an imprt based n cnnectr cnfiguratin (frequency). FTP Imprt can be triggered manually in System > Cnfigure > Imprt > FTP. Select ne f the imprts, and click Prcessed ftp files menu t check the prcessed files. CrwnPeak Technlgy 8
When executed, the template file (ftp_imprt.aspx) will create ne r mre assets in the CMS based n template cnfiguratin. Asset will be created in /Playbks/Imprts/FTP Imprt/ flder. The flder lcatin can be changed in the imprt cnnectr. File name will be the asset s label by default, but the label can be re-named in the template file. CrwnPeak Technlgy 9