Salesforce API Series: Release Management with the Metadata API webinar


Published on

The Metadata API allows you to make changes to your Salesforce instance and then deploy those changes through sandboxes to production. There are many tools, both Salesforce-provided or community developed, that allow you to interact with the Metadata API. The API is a fundamental part of release management but actually managing the “change” is what literally makes or breaks an implementation. This webinar focuses on building automation into your release management process using commonly available enterprise tools.

Key Takeaways
:: Learn about the Metadata API and some common API calls
:: Explore the tools built on top of the API
:: Learn how to leverage a version control system manage multiple development streams
:: Build deployment pipelines with automated testing

Intended Audience
:: Developers / Quality Assurance, Technical Leads, Architects, Application Directors

Published in: Technology

Salesforce API Series: Release Management with the Metadata API webinar

  1. 1. API Series: Metadata API October 02, 2013
  2. 2. #forcewebinar Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non- products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available., inc. assumes no obligation and does not intend to update these forward-looking statements.
  3. 3. #forcewebinar Speakers Raj Chowhan Sr. Technical Solution Architect @rajanchowhan Srinivasan Thirumalai Technical Solution Architect @srinithirumalai 
  4. 4. #forcewebinar Follow Developer Force for the Latest News @forcedotcom / #forcewebinar Developer Force – Community +Developer Force – Community Developer Force Developer Force Group
  5. 5. #forcewebinar Agenda §  What is the API? §  How can I access it? §  ANT: The what, where and how? §  Version Control §  Continuous Integration §  Build Pipelines §  New Features
  6. 6. #forcewebinar Change: Needed but Often Feared
  7. 7. #forcewebinar The Metadata Home Accounts Contacts Products Custom ObjectCustom Code Custom Fields Custom Workflows
  8. 8. #forcewebinar What is the API? §  Text-based (XML) version of an org §  ALL Most tools use the metadata API –  See last slide on the Tooling API! §  SOAP based and Asynchronous (poll for updates) §  File and CRUD calls –  File-based = Deploy(), Retrieve() –  CRUD based = more granular §  Not complete but getting closer on every release!
  9. 9. #forcewebinar Metadata API Nouns
  10. 10. #forcewebinar What is Metadata? Create your database tables Define schema attributes Create new database fields <CustomObject xmlns=""> <label>PTORequest</label> <pluralLabel>PTORequests</pluralLabel> <nameField> <label>PTORequest Name</label> <type>Text</type> </nameField> <sharingModel>ReadWrite</sharingModel> <fields> <fullName>StartDate__c</fullName> <label>Start Date</label> <type>Date</type> </fields> <fields> <fullName>Duration__c</fullName> <label>Duration</label> <type>Number</type> <precision>2</precision> </fields> <deploymentStatus>Deployed</deploymentStatus> </CustomObject>
  11. 11. #forcewebinar Deploy() flow
  12. 12. #forcewebinar Demo 1: Deploy using ANT
  13. 13. #forcewebinar Deployment Tools
  14. 14. #forcewebinar Change Sets Upload, Deploy Packaging Upload, Install Metadata API Retrieve, Deploy Force Migration ToolC: ISV Friendly IT Friendly Tools built on top of tools
  15. 15. #forcewebinar IDE (Eclipse) 1. Choose file(s) and deploy 2. Credentials 3. Backup destination incase you need to rollback!
  16. 16. #forcewebinar IDE (Eclipse) 3. IDE works out the differences (new additions versus overwrite)
  17. 17. #forcewebinar Pros §  Single place for developers §  Can easily traverse metadata files §  Automatic package.xml generation Cons §  No automation §  Hard to govern when/what changes §  Can become tedious for repeated deployment retries §  Does not run tests between sandboxes §  Must migrate whole objects versus individual fields, rules etc IDE (Eclipse) Summary Good for smaller teams where the developer and release manager role are the same person. Useful for small changes between sandboxes.
  18. 18. #forcewebinar Change Sets §  When you want to send customizations from your current organization to another organization, you create an outbound change set. Once you send the change set, the receiving organization sees it as an inbound change set. §  Sending a change set between two organizations requires a deployment connection.
  19. 19. #forcewebinar Pros §  Non-developer skillset §  Simple, declarative interface §  Handles dependencies §  History of migration maintained in org itself Cons §  No automation §  Does not run tests between sandboxes §  Cannot modify change sets, must create new §  Does not scale well. Change Sets Summary Smaller orgs with non-developer skillset. More configuration than code in the org. Migrating single items (fields) is easier.
  20. 20. #forcewebinar ANT Migration Tool §  Java/Ant-based command-line utility §  ANT “tasks” wrap the metadata API calls for ease of use. Also has pre-built tasks for source control systems §  Build automation tools can call ANT scripts §  Three files the are important –  package.xml –  build.xml –
  21. 21. #forcewebinar ANT Migration Tool: What?, How?, Where?, §  package.xml = What to deploy §  build.xml = How to deploy. Called by ANT to orchestrate e.g. checkout, deploy § = Where. best practice to use properties file for variables like username, password, instance
  22. 22. #forcewebinar Files build.xml package.xml
  23. 23. #forcewebinar Pros §  Can be integrated into automated test/build systems §  Integration to source control §  Run tests between sandboxes Cons §  Overhead to setup initially §  Requires developer skillset §  Still limited my metadata API, so still some manual tasks ANT Migration Tool Summary Enterprises with existing build/release management infrastructure. Overlap with .net/java/ruby best practices around automation and continuous integration
  24. 24. #forcewebinar Source Control
  25. 25. #forcewebinar Source Control §  AKA version control system, revision control §  Track changes to SFDC metadata §  SFDC has no native source control integration (org -> source control) §  Most systems allow multiple developers opening the same file (merge later vs file locks) §  2 main flavors –  Centralized (client/server): Subversion, perforce –  Distributed (peer-to-peer): Git, Mecurial
  26. 26. #forcewebinar Demo 2: Connect a subversion repository
  27. 27. #forcewebinar Continuous Integration
  28. 28. #forcewebinar Continuous Integration § Continuous Integration (CI) is a technique used to quickly identify the many issues that arise when integrating code. Code repositories and build servers are core components.
  29. 29. #forcewebinar Jenkins § Open Source continuous integration tool § Easy installation using java .war file § Pre-built connectors to source control systems § Test framework support (UI tests, Coding Standards etc) § 300+ plugins! Incluing Jenkins2Chatter!
  30. 30. #forcewebinar Demo 3: Continuous Integration Demo
  31. 31. #forcewebinar Build Pipelines
  32. 32. #forcewebinar Build Pipelines §  An automated implementation of your system’s build, deploy, test, release process
  33. 33. #forcewebinar Build Pipeline Production Instance Full (E- Releases) QA legend TrainingDev QA Fix Innovation Rollup Major Release Path Integrate changes Emergency Releases Pulls Sprint 1 Sprint 1 Sprint 2 Fix 1Fix 1 Fix 1 Sprint 1Sprint 2 Sprint 3 Innovation Innovation Sprint 2 Sprint3 + Innovation Sprint 4 live full copy Developer PRO, test data Developer PRO, training data developer
  34. 34. #forcewebinar Demo 4: Deployment between environments
  35. 35. #forcewebinar New Features
  36. 36. #forcewebinar Faster Deploys to Production (Pilot) Only Run Specified Tests Must Cover Code Changes 75% Coverage Per Class Migration Tool
  37. 37. #forcewebinar Smart User Matching on Deploy AFTER = = BEFORE != !=
  38. 38. #forcewebinar Tooling API §  The Tooling API is designed for developing user interface tools to interact with the development artifacts in orgs. §  It can be accessed via SOAP and ReST §  Developer Console is largely built on the tooling API
  39. 39. #forcewebinar Summary §  The API and its characteristics §  The tools to access it Crawl Walk Run Fly! ANT Source Control Continuous Integration Continuous Delivery
  40. 40. #forcewebinar Resources §  Metadata API Developer's Guide § § Migration Tool Guide § §  Jenkins §
  41. 41. #forcewebinar Q&A Raj Chowhan Sr. Technical Solution Architect @rajanchowhan Srinivasan Thirumalai Technical Solution Architect @srinithirumalai