IMPORTING & EXPORTING DATA

Slides:



Advertisements
Similar presentations
Wintouch eCRM A Customer Relationship Management Solution designed specifically for AS/400 or iSeries Users.
Advertisements

1.  Understanding about How to Working with Server Side Scripting using PHP Framework (CodeIgniter) 2.
© 2012 Cisco and/or its affiliates. All rights reserved. Presentation_ID Cisco Public Cisco SocialMiner: Developer Network Forum 2.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
Sharepoint Portal Server Basics. Introduction Sharepoint server belongs to Microsoft family of servers Integrated suite of server capabilities Hosted.
Build a CMS Website. The topics this chapter covers are: What is CMS ? What you can do with CMS The benefits and disadvantages of using a content management.
© 2012 Cisco and/or its affiliates. All rights reserved. CDN-4698 Cisco Public Collaboration Enabled Business Transformation (CEBT) Integration Platform.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
AJAX in ASP.NET James Crowley Developer Fusion
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
EQUELLA Product Strategy and Development
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Enabling High-Quality Printing in Web Applications
© 2012 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 1 © 2012 Cisco and/or its affiliates. All rights reserved. 1 Voice Mailbox.
Peter Laird. | 1 Building Dynamic Google Gadgets in Java Peter Laird Managing Architect WebLogic Portal BEA Systems.
Technical Workshops | Esri International User Conference San Diego, California Supporting High-Quality Printing in Web Applications with ArcGIS 10.1 for.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Automated Scheduling and Operations for Legacy Applications.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
Data, data, data In-depth session on data integration.
ICM – API Server & Forms Gary Ratcliffe.
ICM – API Server Gary Ratcliffe. 2 Agenda Webinar Programme API Server Overview JSON-RPC iCM API Service API Server and Forms New services under.
Integrated Mobile Marketing Platform Emergic mConnector Integrated -Mobile Marketing Platform Presented By: Sales Person Name ID: Mobile:
© 2015 Cisco System Inc. All rights reserved Cisco Confidential 1 © 2015 Cisco System Inc. All rights reserved. 1 Subject Line Customization for Notifications.
Module 1: Introduction to Microsoft SQL Server Reporting Services
Interactions & Automations
Sitecore.net Training, Oct ECM 2.1 UPDATE 2 PART 1 CRAWL BEFORE YOU WALK.
Esri UC 2014 | Technical Workshop | Administering ArcGIS for Server with Python Jon Bodamer.
NCI CBIIT LIMS ISIG Meeting– July 2007 NCI CBIIT LIMS Consortium Interface SIG Mission: focus on an overall goal of providing a library of interfaces/adapters.
Introduction The concept of a web framework originates from the basic idea that every web application obtains its foundations from a similar set of guidelines.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
CrownPeak Integrations
PARTNER UPDATE V9 MILESTONE 1 & 2.
ADVANCED HOSTING Adrian Newby, CTO.
REDCap General Overview
Export Services Deep Dive
Patrick Desbrow, CIO & VP of Engineering October 29, 2014
PARTNER SUMMIT 2014 CrownPeak Customer Success and Product Teams
Patrick Desbrow, CIO & VP of Engineering October 29, 2014
DYNAMIC CONTENT DELIVERY
Summit 2006: Knowledge is Power Steve Heister Helen Robie
Fahd Shaaban, Director of Professional Services
5/12/2018 3:54 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Custom Functions in Excel
Fahd Shaaban, Director Of Professional Services
AUTHORING EXPERIENCES
Working with Feature Layers
z/Ware 2.0 Technical Overview
Building Custom Application With Office Add-Ins for OneNote
Data Transport for Online & Offline Processing
Data Virtualization Tutorial… CORS and CIS
Overall Architecture and Component Model
Tim Griffiths, Sales Engineer October 28, 2014
Paul Taylor, Solutions Architect October 29, 2014
Developing Production Quality SQL Code
Ashish Pandit IT Architect, Middleware & Integration Services
Ambir nSign Presentation Synopsis
April Webinar: Advanced Configuration of Order Forms in Workflow
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Lecture 1: Multi-tier Architecture Overview
Using JDeveloper.
Testing RESTful Web APIs
Site scripts and Site Design
SharePoint 2019 Overview and Use SPFx Extensions
RESTful Web Services.
Technical Integration Guide
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
#01# ASP.NET Core Overview Design by: TEDU Trainer: Bach Ngoc Toan
Cross Site Request Forgery (CSRF)
Presentation transcript:

IMPORTING & EXPORTING DATA Paul Taylor, Solutions Architect October 29, 2014

IMPORTING & EXPORTING DATA - AGENDA Importing & Exporting Data Resources  CMS Publishing Architecture  Your Feedback  Importing Data  Exporting Data 

CMS Publishing Architecture

CMS PUBLISHING ARCHITECTURE IMPORTING / EXPORTING DATA CMS PUBLISHING ARCHITECTURE Any Platform Any Device You will see a number of diagrams this week detailing the CrownPeak CMS architecture. Detail architecture diagram. Any Integration Anywhere…

CMS PUBLISHING ARCHITECTURE IMPORTING / EXPORTING DATA CMS PUBLISHING ARCHITECTURE End User System Content Delivery Content Management Core Content Management Delivery Template-Managed I/O Input Processing Output Generation Policies and Standards Dynamic Services Repository (content, security, workflow) Targeting and Personalization Search Management

CMS PUBLISHING ARCHITECTURE IMPORTING / EXPORTING DATA CMS PUBLISHING ARCHITECTURE Core Content Management Template-Managed I/O Policies and Standards Input Processing Repository (content, security, workflow) Content Delivery Content Management Output Generation Delivery CrownPeak-Hosted Platform Customer-Hosted Platform Third-Party Service

CMS PUBLISHING ARCHITECTURE IMPORTING / EXPORTING DATA CMS PUBLISHING ARCHITECTURE Core Content Management Template-Managed I/O Policies and Standards Input Processing Repository (content, security, workflow) Content Delivery Content Management Output Generation Delivery Java EE (JSP) .Net (ASP) PHP XML CSV JSON

Importing Data

IMPORTING / EXPORTING DATA IMPORTING DATA CrownPeak currently supports 3 methods of importing data into the CMS from external sources SMTP FTP Custom Template (HTTP, REST etc.) Import WS API (Coming Soon!)

IMPORTING DATA SMTP In cases where not practical to create an Asset individually and where data can be obtained in a structured XML or CSV format Preferred for small jobs – only a few updates per hour Configuration mapping defined within CMS interface Import token sent in subject line Data sent in the body of an email, or as an attachment smtp_import.aspx Defines how imported data is mapped to CMS Asset

SMTP – Example - Configuration IMPORTING DATA SMTP – Example - Configuration Available via the Classic UI System > Configure > Import > SMTP Multiple SMTP Import Profiles

SMTP – Example - Template IMPORTING DATA SMTP – Example - Template Within specified Model asset: smtp_import.aspx

IMPORTING DATA FTP In cases where not practical to create an Asset individually and where data can be obtained in a structured XML or CSV format Preferred for large jobs – e.g. bulk content imports Configuration mapping defined within CMS interface Requires your own FTP server to ‘host’ the data to be imported FTP server is automatically polled – schedule configurable Import token included within filename ftp_import.aspx Defines how imported data is mapped to CMS Asset

FTP – Example - Configuration IMPORTING DATA FTP – Example - Configuration Available via the Classic UI System > Configure > Import > FTP Multiple FTP Import Profiles

FTP – Example - Template IMPORTING DATA FTP – Example - Template Within specified Model asset: ftp_import.aspx

IMPORTING DATA CUSTOM TEMPLATE In cases where import via ‘pull’ is required upon a regular schedule Custom Developer Template created Makes HttpWebRequest (Util class) call to external service http://searchg2.crownpeak.net/mtistage.cp- access.com/select/?q=custom_ss_type:Location&rows=10000000&fl=* Reads HttpWebResponse (Util class) Processes data into CMS Can be run one-time (View Output – be careful!), initiated in Workflow, or run on schedule ‘Be careful’ on initiating via ‘View Output’, as preview will also trigger the import – have necessary checking in your code.

IMPORTING DATA CUSTOM TEMPLATE - DEMO Deploy a Custom Developer Template in order to import data from an external XML-based web service Define Asset Template Import data into new Asset Folder, based upon Template Demo Steps: - Create project folder, with ‘locations’ folder within; - Create output.aspx in template ‘HTTP_Import_Locations_From_SearchG2_Sample’, following content: <%@ Page Language="C#" Inherits="CrownPeak.Internal.Debug.OutputInit" %> <%@ Import Namespace="CrownPeak.CMSAPI" %> <%@ Import Namespace="CrownPeak.CMSAPI.Services" %> <%@ Import Namespace="CrownPeak.CMSAPI.CustomLibrary" %> <!--DO NOT MODIFY CODE ABOVE THIS LINE--> <% context.DisablePreviewCache = true; const string importEndPoint = "http://searchg2.crownpeak.net/mtistage.cp-access.com/select/?q=custom_ss_type:Location&rows=10000000&fl=*"; var assetSaveFolder = Asset.Load("/Samples/Data Import & Export Samples/Locations/"); var assetSaveModel = Asset.Load("/System/Models/Samples/SearchG2 Spatial Search/Location/Location"); var getHttpParams = new GetHttpParams {TimeOut = 300}; var getHttpResponse = Util.GetHttp(importEndPoint, getHttpParams); if (getHttpResponse.StatusCode >= 200 && getHttpResponse.StatusCode < 300) { var result = Util.LoadXml(getHttpResponse.ResponseText, "result").First(); foreach (var doc in result.XmlNodes) var docNodes = doc.XmlNodes; var assetData = new Dictionary<string, string>(); var assetName = docNodes.First(node => node.Attributes["name"] == "custom_s_name").Value; assetData.Add("name", assetName); assetData.Add("address", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_s_address") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_s_address").Value : String.Empty); assetData.Add("latitude", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_p_location") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_p_location").Value.Split(',')[0] : String.Empty); assetData.Add("longitude", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_p_location") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_p_location").Value.Split(',')[1] : String.Empty); assetData.Add("telephone", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_tel_number") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_tel_number").Value : String.Empty); assetData.Add("fax", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_fax_number") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_fax_number").Value : String.Empty); assetData.Add("email", (docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_email_address") != null) ? docNodes.FirstOrDefault(node => node.Attributes["name"] == "custom_ss_email_address").Value : String.Empty); var newAsset = Asset.CreateNewAsset(assetName, assetSaveFolder, assetSaveModel, assetData); Out.WriteLine("New asset created ({0}) with ID ({1}).", newAsset.Label, newAsset.Id); } %> - Run preview to import content. Next Steps: - Add logging; - Add check asset logic for update.

Exporting Data

IMPORTING / EXPORTING DATA Lots of ways to export data from the CMS All require Developer Template to translate Asset content Uses Asset.Load() to pull in content from CMS Assets Uses Template Files to render content into required format Will require publication of content to the Delivery Server(s) ‘Be careful’ on initiating via ‘View Output’, as preview will also trigger the import – have necessary checking in your code.

EXPORTING DATA EXPORTING DATA - DEMO Deploy a new Custom Developer Template in order to export data from a folder of assets into a JSON file Define Asset Template Export data Demo Steps: - Create output.aspx in template ‘HTTP_Export_Locations_to _JSON’, following content: <%@ Page Language="C#" Inherits="CrownPeak.Internal.Debug.OutputInit" %> <%@ Import Namespace="CrownPeak.CMSAPI" %> <%@ Import Namespace="CrownPeak.CMSAPI.Services" %> <%@ Import Namespace="CrownPeak.CMSAPI.CustomLibrary" %> <!--DO NOT MODIFY CODE ABOVE THIS LINE--> <% context.DisablePreviewCache = true; const int modelId = 15830; var parameters = new FilterParams { FilterStatus = Util.MakeList(asset.WorkflowStatus.ToString()) }; var locations = asset.Parent.GetFilterList(parameters); var jsonOutput = new StringBuilder(); foreach (var location in locations.Where(location => location.CreatedFromModelId == modelId)) { jsonOutput.Append( String.Format("{{\n\t\"name\": {0},\n\t\"address\": {1},\n\t\"telephone\": {2},\n\t\"fax\": {3},\n\t\"email\": {4},\n\t\"position\": {{\n\t\t\"latitude\": {5},\n\t\t\"longitude\": {6},\n\t\t\"zoom\": {7}\n\t}}\n}}", TidyForJson(location["name"], true), TidyForJson(location["address"], true), TidyForJson(location["telephone"], true), TidyForJson(location["fax"], true), TidyForJson(location["email"], true), TidyForJson(location["latitude"]), TidyForJson(location["longitude"]), TidyForJson(location["zoom"]) ) ); } Out.Write("{\"locations\":" + "[" + jsonOutput + "]" + "}"); %> <script runat="server" data-cpcode="true"> private static string TidyForJson(string source, bool addQuotes = false) var dest = source; if (string.IsNullOrEmpty(dest)) dest = string.Empty; dest = dest.Replace("\"", """); dest = dest.Replace("\r\n", "\n"); dest = new System.Text.RegularExpressions.Regex("\n+").Replace(dest, "\\n"); if (string.IsNullOrWhiteSpace(source) && !addQuotes) return "\"\""; return string.Format("{1}{0}{1}", dest, (addQuotes ? "\"" : "")); </script> - Create Index file in root of Locations, with Basic Workflow –> View Output to see JSON. Next Steps: - Add logging

Resources

IMPORTING / EXPORTING DATA RESOURCES Playbooks – Available on CrownPeak Connect Best Practice Articles https://connect.crownpeak.com/blogs/developers/c_best_practices_ftp_imports https://connect.crownpeak.com/blogs/developers/template_best_practices_smtp_imports https://connect.crownpeak.com/blogs/developers/importing_content_into_the_cms_best_prac tices Discussion https://connect.crownpeak.com/developers_and_partners/forums/integrations

Before we go… Your Feedback 

We are here to hear your ideas and requests. PARTNER SUMMIT - FEEDBACK We want your feedback! We are here to hear your ideas and requests. You have our ear - here at the conference, through support, through Connect. We want to open a dialogue that starts here and continues well beyond So please share your feedback cos we are always looking for ways to improve our product. Product improvements come from 3 channels- Product Management Innovations from Customer Success team- And of course Feedback and contributions from Developers like you Through conversation at the conference or by posting on Connect Product Management Customer Success Community Feedback Developers

Twitter Forums on Connect - FEEDBACK Template development PARTNER SUMMIT - FEEDBACK Twitter @CrownPeak #CrownPeakPartners For ongoing discussions with the CrownPeak community on Template development User & Developer Experience Solutions and Extensions Product features & roadmap Hosting & Publishing Integrations Forums on Connect Twitter hashtag and QR Code <a href="https://twitter.com/intent/tweet?button_hashtag=CrownPeakPartners" class="twitter-hashtag-button" data-related="CrownPeakHelp,CrownPeak">Tweet #CrownPeakPartners</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> <img src="http://qrfree.kaywa.com/?l=1&s=8& d=https%3A%2F%2Ftwitter.com%2Fintent%2Ftweet%3Fbutton_hashtag%3DCrownPeakPartners" alt="QRCode"/> Forums QR code <img src="http://qrfree.kaywa.com/?l=1&s=8&d=https%3A%2F%2Fconnect.crownpeak.com%2Fdevelopers_and_partners%2Fforums" alt="QRCode"/>

    Access to Customer Success and Product Teams - FEEDBACK PARTNER SUMMIT - FEEDBACK Access to Customer Success and Product Teams You have access the Product and Customer Success teams to give direct feedback on features and best practices Meet the team during the presentations and Q&A sessions Make suggestions – we are capturing it. Team members are armed with Post-its! Ask questions – We want to start a conversation that last well beyond the summit Any Questions?  MEET THE TEAM  MAKE SUGGESTIONS  ASK QUESTIONS  Partners and Developers

Partners and Developers PARTNER SUMMIT - FEEDBACK FEEDBACK?  Partners and Developers

CrownPeak + Web Experience Management  CrownPeak + Web Experience Management