sfdc integration basics gerry winning. integrating your progress app with sfdc ovid back office app...
TRANSCRIPT
SFDC Integration BasicsGerry Winning
Integrating Your Progress App with SFDC
• Ovid Back Office App is Fully Integrated with SFDC (about two and a half years ago)
• Just Getting Starting was 90% of the Frustration• Start For Your to Hammer Out Your Own
Framework
– Progress TempTable to and from SFDC
SFDC Web APIs• SOAP
– Full Featured API for Full Application Integration– Progress Soap, Sax Parser/Reader
• BULK (“REST-ish” Arbitrary WebAPI)– Schedule Jobs, Pole for Results, then Download Larges
Amount of Data Quickly as CSV or XML (Big Reports)– DotNet WebClient, Progress Soap
• REST– JSON or Whatever (Thin)– Currently Great for Phone Apps– DotNet WebClient, Progress JSON Object
SOAP API• Download WSDL from SFDC
– Setup->Develop->API->Generate Enterprise WSDL – File->Save As (Then Fix the Extension)
• SOAP XML– XML Sent to Operations and XML is Returned– https
://wiki.developerforce.com/page/Sample_SOAP_Messages_(10.0_API) – (Shows what the XML should look like)
• Two “Connects”– Login with your UserID and “Password + Security Token” to
Get SessionId and New Endpoint– Login to the New Endpoint and Add Header Callback
Procedure
Security Token
Bulk API
• Allows You to Use a SOAP Login and Pass the SessionId in the Header of the REST-Like Calls
• Get a Lot of Records as XML or CSV VERY quickly• Asynchronous Calls• Supports Batching
– Avoid Timeouts and SFDC Limits– Speed it Up With Asynchronous batch calls– We Pull 500,000 Records Without Breaking it Up
REST API
• No Soap Structure Overkill– Make a Call to a URL (Access Token in the Header)– Get back a bunch of JSON
• Uses OAUTH2 – Allows for User/Password Login (Put Garbage in the Callback)– Setup->App Setup->Create->Apps->Connected Apps
(See Next Slide)– Allows You to Define Permissions and Optional Callback URL
• Does not Provide all the Functionality of the SOAP API
Alternative to Replication / APIs
• SFDC Developer Embeds our Page– Benefits
• Space is Money• Avoid Complex Business Rules in Two Places• No SFDC Development Resource Needed for Modifications
– Calls our SOAP API to get back a security token• We Create a Record in our DB Storing the Token and the User• Token Expires After 24 Hours
– Passes Context and Token to our Starting Page
Demo
• SOAP API– Library That You Can Take and Use– Temp-Tables are Defined that Match Your Schema with
Serialize Names that Match SFDC Schema• Just Add a Field to the TT and it is Replicated Like Magic• Not Too Generic as there are ALWAYS Exceptions in Generic Code
• Bulk API– Library That You Can Take and Use
• Rest API– Some Very Simple Examples Using DotNet WebClient
Gotchas
• If ANY session of your API user is logged out, ALL sessions are logged out.
• Account Owner must be an active user when inserting/updating a record.
• You must have a user license eaten up for API access.• It’s the Little Things…
– One “Address Street” Field in SFDC “Shipping Street”– “;” Separated List Instead of “,”– API Errors on Insert/Update if Email is Not Valid– Field Size is Enforced on SFDC