Siebel and Apple iPad Client Integration

15
CRM Application Development POC for the Apple iPad using the Siebel REST API Page 1 4/23/2010 Oracle CRM Whitepaper CRM Application Development POC for the Apple iPad using the Siebel REST-ful Services API Friday, April 23, 2010

description

ok

Transcript of Siebel and Apple iPad Client Integration

Page 1: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 1 4/23/2010

Oracle CRM Whitepaper CRM Application Development POC for the Apple iPad using the Siebel REST-ful Services API Friday, April 23, 2010

Page 2: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 2 4/23/2010

Table of Contents Oracle CRM Whitepaper .................................................................................................................................................. 1Introduction to the Siebel CRM-iPad POC ....................................................................................................................... 4Integration Approaches .................................................................................................................................................... 5

The idea of an employee store ‘portal’ ......................................................................................................................... 5A consumer profile area ............................................................................................................................................... 5

Deployment Architecture .................................................................................................................................................. 7Apple Development Environment ..................................................................................................................................... 7Server Environment .......................................................................................................................................................... 7

Siebel Enterprise Server ............................................................................................................................................... 7Weblogic 11g for REST ................................................................................................................................................ 7Apache 2.2 .................................................................................................................................................................... 7

Siebel REST-ful Service Architecture ............................................................................................................................... 8Integration Scenario 1 – Objective-C / Cocoa Touch ....................................................................................................... 9

Application Structure ..................................................................................................................................................... 9Integration Scenario 2 - Ajax & XSLT implementation and usage ................................................................................. 11

Browser Standards Used in this Scenario .................................................................................................................. 11Web Page Diagram .................................................................................................................................................... 12

Summary ........................................................................................................................................................................ 13Recommendation ........................................................................................................................................................ 13Comparison ................................................................................................................................................................ 14

Page 3: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 3 4/23/2010

Disclaimer

The following is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

Trademark statement

MAC OSX, Cocoa Touch, iPad, iPhone, Xcode, Mobile Safari and Safari are all registered trademarks of Apple Inc.

Page 4: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 4 4/23/2010

Introduction to the Siebel CRM-iPad POC The recent explosion of revolutionary new mobile device platforms such as Apple’s iPad, and Rich User Interface technologies such as JavaFX have provided elegant new ways for companies to interact with their customers. With this in mind, Oracle felt that the debut of the Apple iPad would provide an excellent opportunity to demonstrate not only the ease of extending Siebel CRM to mobile and RIA platforms, but also how Oracle CRM technology can help companies augment their customer relationships in an increasingly mobile-oriented world. For this POC Oracle decided to leverage a retail store scenario for a fictitious company, ‘PCS Sports.’ The scenario demonstrates how the iPad can be used to deliver a personalized shopping experience at the point of consultation. Conceptually, this represents a new channel for customer interaction that complements a company’s existing web presence, call center, and other traditional CRM channels. It is a blend of traditional employee-facing CRM for customer profile information along with collaborative CRM in a more self-service mode. The benefits of delivering these capabilities at the point of contact within a compelling and modern user interface are obvious: increase in customer loyalty, increase in up-sell and cross-sell opportunities, and an improvement in overall customer satisfaction. Siebel CRM is easily adaptable to the iPad and iPhone, enabling the technology platform to leverage them quickly as new UI client opportunities arise, thus extending the CRM footprint.

Page 5: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 5 4/23/2010

Integration Approaches For this POC Oracle wanted to demonstrate multiple integration approaches, identify their strengths and weaknesses, and provide general guidelines on how and when to leverage each approach. Therefore our goal was to explore these technologies separately, namely, native Object-C development using the Cocoa Touch framework, and alternatively, Ajax with XSLT executing within an embedded Safari browser. It was decided that regardless of the technology choice on the iPad itself, the POC would leverage the Siebel REST API due to its simplicity of use and ability to integrate to almost any Siebel data in real time with minimal configuration. In principle, the team could have also leveraged other Siebel integration technologies, such as SOAP web services, but decided for this POC the REST API was an excellent fit. The overall application is built as a native Cocoa Touch application written in Objective-C using iPhone OS SDK 3.2. The application has two key functional areas which leverage alternative integration solutions, specifically it implements, a) The idea of an employee store ‘portal’ and, b) a customer profile area. The idea of an employee store ‘portal’ for a representative to access relevant information, such as current promotions, offer details, etc.

The store employee portal is implemented using a combination of Ajax leveraging XSLT to transform the REST XML response to valid XHTML. Siebel Objects leveraged: Loyalty Promotions Programs

A consumer profile area allowing the representative to interact with the customer more as a personal shopper with access to asset history, personal profile information, service requests, preferences, loyalty etc.

The Consumer profile functionality is implemented using native Objective-C using the Cocoa Touch framework. All REST requests and XML response data is processed and rendered into the UI using the native Cocoa framework. Siebel Objects Leveraged: Contact Service Request Asset Action

Page 6: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 6 4/23/2010

The catalog functionality in the current version of the POC is rendered through static HTML leveraging the Safari webkit. The use of Webservices against the product catalog and real time decisions engine for real time offers is planned for subsequent iterations of this POC either directly or via a middle tier server. This capability when implemented will allow dynamic targeting of products, up-sells, cross-sells and offers matched to a customer’s attributes and buying profile, i.e. the ability to quickly identify and offer products the customer is most likely to purchase.

The diagram below graphically shows the two integration scenarios. Scenario 1 shows the REST API calls returning the XML response directly from the server for processing and rendering into the UI using Objective-C. In Scenario 2 the embedded Safari browser first retrieves html from the server which contains embedded JavaScript Ajax calls. These calls are then executed on page load. The resulting REST response XML is then formatted according to the XSLT file and then rendered inline within the embedded Safari browser.

Page 7: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 7 4/23/2010

Deployment Architecture To support the POC, various technology assets were used to develop, test and deploy the application.

Apple Development Environment The Apple iPad leverages the same overall development environment as the iPhone. The core of the development process leverages the Apple tooling and SDK 3.2 running on an Apple Macintosh computer running OSX version 10.6.3. The SDK includes a complete set of development tools for creating applications for iPad, iPhone, and iPod touch, including the Xcode IDE, iPhone Simulator and Interface Builder. The iPad simulator was used to test the compiled Objective-C source code, which in turn accessed the server environment to execute the REST API calls against Siebel or to fetch browser based content such as AJAX, XSLT and image resources. All application content – Data, Images, etc. reside on the server.

Server Environment

Siebel Enterprise Server A standard Siebel 8.1.1 Enterprise Server instance was deployed with Siebel Callcenter and Siebel EAI object managers active. The Callcenter object manager is used to support the administration functions and is not necessary to support the REST integration activity. Siebel Tools was used to create and extend the Siebel Integration Objects that support the REST calls within the Siebel server.

Weblogic 11g for REST Weblogic 11g was installed to handle incoming REST requests and facilitate integration activity with Siebel i.e formatting the JCA request and transforming the resulting response to XML.

Apache 2.2 Apache 2.2 was deployed alongside the Siebel instance to provide a publicly accessible network proxy used for AJAX calls to REST.

Page 8: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 8 4/23/2010

Siebel REST-ful Service Architecture Siebel applications have provided strong support for SOAP-based web service integration and custom application development since Siebel 7.8. Since that release, many useful improvements have been made in both the Siebel EAI layer, and the Siebel business layer, allowing more and more business objects and business services full access to the SOAP interface. More recently, however, architectural best practice has begun to prefer a different style of web service – REST services – for some scenarios and especially for the development of custom user interfaces where maximum scalability and stateless operation are desired. Simply put, whereas SOAP web services come with a substantial set of architectural and application server demands, REST web services (in their purest form) are designed to require no more complexity than that required to deliver web pages over HTTP. The Siebel REST Service exposes all the methods and operations provided by the Siebel EAI Object Manager Business Service thru an interface developed to comply with the principles of REST-ful HTTP services.

Figure 1: REST Service Architecture The components are:

• A Siebel server executing one or more instances of a Siebel EAI Object Manager. • A Weblogic server executing one or more instances of the Siebel REST Service. The service is provided as a

J2EE web application (a servlet developed using the JAX-RS standards) and a J2EE resource adapter (wraps the Siebel JDB EAIObjMgrSvc class in a JCA 1.5 interface) packaged together in a J2EE enterprise application.

• Message objects transferred as part of a Siebel REST Service request or response. • Refer to Integration Platform Technologies: Siebel Enterprise Application Integration (available in Siebel

Bookshelf) for more details regarding Siebel EAI Object Manager. • Refer to Siebel REST Service Implementation Guide for more details regarding Siebel REST Service.

Note: The POC was built using the Siebel REST Service version released in December, 2009.

Page 9: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 9 4/23/2010

Integration Scenario 1 – Objective-C / Cocoa Touch The iPad inStore Application was written using the standard Apple SDK, specifically SDK 3.2 Beta 5 and development environment Xcode, interface builder, and iPad simulator. This section is intended as a high level outline of the structure and resources used to build the POC. Obviously there are many ways to design and implement the store scenario within the development framework -- this section documents our approach.

Application Structure Primary navigation between the main application areas is implemented via a UINavigationController class. As the user touches the navigation UI elements for ‘login’, ‘swipe card’ and ‘back’ etc the application adds or removes the appropriate UIViewController from the navigation controllers viewstack. The diagram below shows the relationship between the application navigation elements and the individual application areas. It does not document all the classes used but highlights the significant elements used in the application.

The Store Home UIViewController primarily hosts a set of UIWebViews. These are used to display current promotions details as a scrollable list along with other example content types such as video. The integration with Siebel REST API is achieved using Ajax within the Safari browser and will be discussed in more detail in the following section. The Consumer Profile page implements several distinct REST API calls using native Objective-C. For each Siebel data type, namely SR, Contact, Asset and Action a respective Objective-C class was created to support data acquisition and separate classes to support UI rendering behavior. Specific attention was given to encapsulating the REST API call and XML parsing of the response within its own class distinct from its related UI rendering class. The REST API is invoked using the NSXMLParser class, the request URL is constructed and passed to the REST service on the server, the resulting XML response is parsed in an event-driven model and populates an NSMutableArray of NSDictionary items. The array returned from the model class is then used to render and visualize the respective UITableViews or UITextFields with data. Below is an example of the URL construction for the REST API, REST call and resulting XML response.

Page 10: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 10 4/23/2010

Objective C code constructing REST API url for Contact: NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; NSString *rootURL = [prefs stringForKey:@"rest_url"]; NSString * path = [NSString stringWithFormat:@"%@%@%@%@", rootURL, @"Contact?search=[Contact.Contact%20Id]%20Like%20'",contactId,@"'"]; . . Resulting REST url: http://demo.com:7001/oracle-crm/api/rest/siebel/siebserver/Contact?search=[Contact.Contact%20Id]%20=%20'1-3SO' REST api request send: xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:path]; REST Service XML response: <?xml version="1.0" encoding="utf-8" ?> <SiebelREST> <NumOutputObjects>1</NumOutputObjects> <LastPage>true</LastPage> <ErrorCode>0x0</ErrorCode> <ListOfContact> <Contact> <DeDup_0x20_Key_0x20_Modification_0x20_Date>07/07/2005 12:38:54</DeDup_0x20_Key_0x20_Modification_0x20_Date> <Jobs_0x20_in_0x20_Five_0x20_Years>2</Jobs_0x20_in_0x20_Five_0x20_Years> <Prospect_0x20_Flag>N</Prospect_0x20_Flag> <Contact_0x20_Id>1-3SO</Contact_0x20_Id> <Primary_0x20_Personal_0x20_Country>USA</Primary_0x20_Personal_0x20_Country> <Best_0x20_Call_0x20_Time>Early morning</Best_0x20_Call_0x20_Time> <Disable_0x20_DataCleansing>N</Disable_0x20_DataCleansing> <Market_0x20_Cap_0x20_Pref>Large Cap</Market_0x20_Cap_0x20_Pref> <Primary_0x20_Group_0x2f_Household_0x20_Id>1-19DJ</Primary_0x20_Group_0x2f_Household_0x20_Id> <Primary_0x20_Address_0x20_Mod_0x20_Id>1</Primary_0x20_Address_0x20_Mod_0x20_Id> <Life_0x20_Events>Birth of Child</Life_0x20_Events> <Spouse>Melissa</Spouse> <Primary_0x20_Street_0x20_Address>323 Market St</Primary_0x20_Street_0x20_Address> <Investment_0x20_Knowledge>Extensive</Investment_0x20_Knowledge> <Alias>Phil</Alias>

The REST XML result structure is defined within the Siebel metadata, specifically in the Integration Object definitions. Siebel Tools is used to create and modify these definitions either directly or through the Integration Object wizards. The Integration Object provides a mapping to the underlying Siebel Business Object and Business Components specifying which fields and which child objects are to be accessed and then rendered in the XML response. The REST call specifies the specific Integration Object to use and any search criteria when retrieving a result set. In the example above the url is invoking the Contact Integration Object with a search specification for the ‘Contact ID’ field. The resulting XML stream is for Contact ID 1-3S0, ‘Paul Agee’. For a full description of search specifications and Siebel REST usage please refer to Siebel REST Service Implementation Guide for more details.

Page 11: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 11 4/23/2010

The iPad development environment and framework provided a sophisticated set of tooling to create visually compelling and intuitive application. The access and integration of the Siebel content using the REST API proved straightforward.

Integration Scenario 2 - Ajax & XSLT implementation and usage

For POC Scenario 2, the team mainly relied upon the native integration capabilities found in the Mobile Safari browser, the primary web browser in use on the iPhone and iPad. After a bit of experimentation on our part, the team found that Mobile Safari is a great platform for the delivery of dynamic web content. Not only does Apple provide support for JavaScript, XML, and the Document Object Model in Mobile Safari, but also they provide support for web development standards such as AJAX and XSLT translation. For more information on Apple support for AJAX and XSLT please see the following links. XMLHttpRequest Object Support in the Safari Browser XSLTProcessor Object Support in the Safari Browser Delivering dynamic content using Ajax via XSLT/JavaScript is a cross-platform approach leveraging web technology standards supported by most, if not all, available browser platforms today. Specifically to Apple hardware, Apple’s WebKit engine makes these standards available to both the desktop Safari browser and to Mobile Safari devices such as the iPhone and iPad.

Browser Standards Used in this Scenario

Browser Technology Standard

Technology Explanation

Document Object Model Level 2 Browser language-independent mechanism for displaying dynamic HTML, XHTML, and XML content via JavaScript

XSLT Document definition format describing how XML is to be presented to the user

XMLHTTPRequest Browser object used for sending asynchronous HTTP requests to the server (AJAX)

XSLTProcessor Browser object used for translating XML into XHTML

JavaScript (ECMAScript 3) Browser scripting language that stitches together client side web application functionality.

XHTML 1.0 XML based HTML format generated by XSLT translation of XML

Page 12: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 12 4/23/2010

Web Page Diagram The following diagram shows how Client-side JavaScript retrieves REST XML real-time from Siebel via AJAX, and translates it into a rich user Interface using XSLT translation.

Page 13: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 13 4/23/2010

Summary In the end, the POC proved invaluable in understanding how to deploy Siebel CRM functionality to the Apple iPad. The POC team learned many useful lessons along the way. Key points among them include:

• Integration with the Siebel REST Service API using either Objective-C or Ajax+XSLT was a relatively straightforward process. However, it’s recommended that you plan in advance which fields and objects will be used by determining which integration objects will be leveraged within the Siebel environment. Doing this at the start of the project will help avoid unnecessary rework on the iPad later.

• The REST services integration work was implemented relatively quickly. Significantly more time was spent rendering data and implementing the various user interface elements, such as graphic assets, navigation flow, animation, and UI transitions.

• Objective-C programming skills and familiarity with the Apple development environment are a prerequisite to starting any project. While it is possible to bootstrap these skills, this approach can introduce significant delays and could require significant development rework later. It is strongly recommended that the development team acquire the appropriate skill sets up front before any development has begun.

• The Ajax XML/XSLT approach followed in the POC still requires some level of Objective-C skills, mainly to build a reusable application framework with the appropriate view navigation elements etc. However, once this application framework is complete, the majority of the html work from that point on can be performed independently in the web server environment using traditional web development tools. Modification to Ajax based web pages does not require any iPad code changes.

• Ajax based assets can be repurposed relatively easily for use with other delivery platforms.

Recommendation Apple’s Objective-C and Cocoa Touch framework provide innumerable UI benefits that users are sure to appreciate. If the goal is to deliver an enterprise application with native platform appearance and behavior, then you’ll need to use Objective-C. This approach guarantees the application full support for native iPad controls, multi-touch user interaction, and native UI animation and transitions that have become synonymous with the iPhone OS. In addition, Cocoa Touch provides easy access to Siebel data via the Siebel REST interface. However, if the web application content to be delivered is more traditional in nature, then using Ajax and XSLT is an option to consider. While not completely able to match Cocoa Touch in terms of UI interactivity, it’s still possible to build applications that have the flavor of Cocoa Touch, by using a combination of AJAX, and Apple’s Webkit extensions (CSS). The web content itself can be delivered and hosted in the context of a compiled Cocoa Touch application as shown in our approach, or completely separately using the Mobile Safari browser.

Page 14: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 14 4/23/2010

Comparison

Native Objective-C with Cocoa Touch Framework

Ajax with XSLT in embedded Mobile Safari browser

Ability to leverage full capabilities of iPhone OS and Cocoa Touch framework, achieving a native look and feel

High Low

Cocoa Touch development proficiency

High Low

Level of effort to integrate with REST API and render results

Medium Medium

Integration with other applications, such as email, Mapping etc

High Medium

Native animation support

High Low

Level of effort to deploy new content and extend existing content

More Less

Flexibility & Extensibility

High Medium

Table showing relative merits of each approach within the POC

Page 15: Siebel and Apple iPad Client Integration

CRM Application Development POC for the Apple iPad using the Siebel REST API

Page 15 4/23/2010

CRM Application development POC for the Apple iPad using the Siebel REST API April 2010 Author: Bob Taylor, Kirk Leibert Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com

Copyright © 2009, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

0109