Desktop Integration Connect For PHP Slides


RightNow Connect for PHP
Chris Fellows
August 11th, 2010
© RightNow Technologies, Inc.
Disclaimer
Statements included in this presentation, other than statements or characterizations of historical fact,
are forward-looking statements. These forward-looking statements are based on our current
expectations, estimates, and projections about our industry, management s beliefs, and certain
assumptions made by us, all of which are subject to change. Forward-looking statements can often
be identified by the words such as  anticipates,  expects,  intends,  plans,  predicts,  believes,
 seeks,  estimates,  may,  will,  should,  would,  could,  potential,  continue,  ongoing, similar
expressions, and variation or negatives of these words. These forward-looking statements are not
guarantees of future results and are subject to risks, uncertainties, and assumptions that could
cause our actual results to differ materially and adversely from those expressed in any forward-
looking statement.
The risks and uncertainties referred to above include, but are not limited to, our assessment of
current trends in the CRM market, possible changes to our approach to CRM and our core product
strategies, changes to the functionality and timing of future product releases, customer acceptance
of our existing and newer products, possible fluctuations in our operating results and our rate of
growth, interruptions or delays in our hosting operations, breaches of our security measures, and our
ability to expand, retain, and motivate our employees and manage our growth. Further information
on potential factors that could affect our financial results are included in our annual and periodic
filings with the Securities and Exchange Commission.
By sharing our product roadmap with you, we are not undertaking an obligation to develop the
software with the features and functionality discussed herein.
The forward-looking statements in this presentation are made as of August 20, 2010 (today). We
undertake no obligation to revise or update publicly any forward-looking statement for any reason.
RightNow Connect for PHP
Agenda
Overview  RightNow Object
Model and Connect for PHP
State Model/Lifecycle of PHP
objects
Introspection
Backward Compatibility
NameSpacing
Quick Example with Contact
Object
RightNow Connect for PHP and
Custom Objects
Use Cases
Customer Portal and Standard Objects
RightNow Connect for PHP - Overview
RightNow Connect for PHP  Overview
and Object Model
What is Connect for PHP and
why does it matter
A fully backward compatible API
based on the RightNow Connect
Framework.
Exposes the RightNow object
model through PHP objects.
Allows interaction with custom
objects created by the Object
Designer.
RightNow Connect for PHP  Overview
and Object Model
Based upon Connect Common
Object Model
Currently Connect for SOAP is the
only API based on this Common
Object Model.
With a few exceptions the Connect
PHP Object Model is identical to
the Connect Web Services for
SOAP Object Model.
Types of objects
Primary objects
Sub-objects (Threads)
Custom
Primary Objects
All Inherit from RNObject
Service
Answers
Contacts
Incidents
Organizations
Tasks
Sales
Opportunities
Management & Configuration
Account
Sales Product
Service Categories
Service Disposition
Service Product
Initialize Connect for PHP
In order to use Connect for PHP a module
or extension has to be loaded. A function
will be made available to load the module
when requested.
Example
// Load up the ConnectPHP Extension
include( Connect_init.php );
RightNow Connect for PHP  Overview
Standard Operations
Allows you to do CRUD
Objects have save() and
destroy() methods according to
their visibility in the model.
No get() or read() method. Get
and reads are implicitly
performed when an ID is set and
a property that is not a primary
key is read (Lazy Loading).
RightNow Connect for PHP  Overview
Active Record Methods for
Standard Objects
fetch($ID, VALIDATE_KEYS_OFF)
 validates and returns the
corresponding object based on
$ID.
find($query)  performs a ROQL
Object Query on objects of the
same type using $query as the
 where clause.
first($query)  returns the first
object found based on $query
which is the  where clause.
RightNow Connect for PHP  Overview
Transactional methods  saves
and destroys aren t committed to
the database unless commit
method is called or the script
exits without error.
Commit  Commits any changes to
the database
" RNCPHP\ConnectAPI::commit();
Commit is implicit upon successful
completion of script.
Rollback  Rolls back any changes
that have been made since the last
commit
" RNCPHP\ConnectAPI::rollback();
RightNow Connect for PHP  Overview
ROQL
Support for both Object and
Tabular queries.
Object Query
use RightNow\Connect\v1 as
RNCPHP;
RNCPHP\ROQL::queryObject();
Tabular Query
use RightNow\Connect\v1 as
RNCPHP;
RNCPHP\ROQL::query();
RightNow Connect for PHP  Overview
Connect for PHP Object model
differences (between Connect for
SOAP)
All arrays/lists will be exposed as
arrays using PHP ArrayAccess
interface.
File attachments only expose the
URL on retrieval.
There are no Generic Objects or
related interfaces. PHP
introspection replaces the need for
Generic Objects.
There is no batching or chaining like
in Connect for SOAP.
State Model/Lifecycle of PHP objects
State Model
Lifecycle of PHP objects
Object Lifecycle  Connect PHP objects have
a similar lifecycle of other PHP objects except
Cloning is disabled
The fetch() method is used to fetch/get a Connect
PHP Primary Object with the given id.
Setting the ID or LookupName property of a
Primary Object is not allowed. This can only be
done indirectly via new()/save().
destroy() will remove the record from the
database, but it does not unset the object.
Objects with ID s are internally stored through a
shared cache independent of PHP variables.
Lifecycle of PHP objects
The primary key(s) of a Connect for PHP
Primary Object may only be set as below:
Instantiating a object via the new() method and
setting the required fields and save().
Calling the fetch() method with the primary
key(s) as a parameter.
Using the find() or first() methods
Invoking ROQL::queryObjects()
Introspection
Introspection
Inheritance, class/object properties and
methods can be discovered using the normal
PHP methods. Examples:
get_class()
get_class_vars()
get_parent_class()
&
You can also use the following static method
ConnectAPI::getClassNames()  Gets all Classes
including custom classes
ConnectAPI::getPrimaryClassNames()  Gets all
primary Classes including custom classes
Versioning/Backward Compatibility
Versioning/Backward Compatibility
By using namespace aliases, developers
may choose the latest or an older version.
Versioned namespaces and packages are
used to version the Public Object Model.
This aliases version 1 of Connect for PHP as
RNCPHP
use RightNow\Connect\v1 as RNCPHP;
RNCPHP\ConnectAPI::getClassNames();
Connect for PHP API version is not
necessarily tied to a RightNow CX Version.
Example with Contact Object (create)
$contact = new RNCPHP\Contact();
$contact->Title =  CIO ;
$contact->Name = new RNCPHP\PersonName;
$contact->Name->First =  John ;
$contact->Name->Last =  Wilson ;
$contact->Login =  jwilson ;
$contact-
>save(RNCPHP\RNObject::SupressAll);
RNCPHP\ConnectAPI::commit();
RightNow Connect for PHP and Custom
Objects
Connect for PHP and Custom Objects
Custom Objects will be exposed as a typed
Connect PHP Object.
For Example: RMA custom object can be
exposed as a RMA class.
Namespace determined by Custom Object
Designer.
Custom Object packages will be mapped to
Namespaces.
Example #1  Connect for PHP and
Customer Portal
Connect for PHP and Customer Portal
use RightNow\Connect\v1 as RNCPHP;
class Contact_model extends Model
{
function __construct()
{
parent::__construct();
//This model would be loaded by using $this->load->model('custom/Contact_model');
}
function createContact($args)
{
require_once( "Connect_init.php" );
initConnectAPI( "username", "password" );
// contact would get created here
}
Example #2  Connect for PHP and
ROQL
Questions?
Thank You!
RightNow Connect for PHP
© RightNow Technologies, Inc.


Wyszukiwarka

Podobne podstrony:
instructions for php scripts
Mac Connected For Life (Feat Ice Cube, W C , Butch?
SAP Business One Integration Toolkit for mySAP Business Suite 1 5 Administration Guide
Integrated Plant for the Municipal Solid Waste of Madrit 01bm691
Mazatrol Fusion Conversational Programming Class for 640MT & MT Pro For Integrex Outline
2006 06?sy Raider Raid Options for the Linux Desktop
2007 04 Choosing a Router for Home Broadband Connection [Consumer test]
Islam Italiano Prospects for Integration of Muslims
2008 07 No Barrier the Adriane Desktop for the Sight Impaired
Modeling Of The Wind Turbine With A Doubly Fed Induction Generator For Grid Integration Studies
slides for the final
c talb19 4 Key Recommendations for Cloud Integration
Brandy Corvin Howling for the Vampire
integracja funkcji

więcej podobnych podstron