This repository contains example code samples for developers building their first applications with the Pitcher API.
These examples demonstrate common usage patterns for the Pitcher API, from basic "Hello World" applications to more complex entity interactions and Salesforce integrations.
Full API documentation is available at: Pitcher API Documentation
Basic examples showing how to initialize a Pitcher app in different contexts:
- Standalone: Simple independent application
- Admin: Example for admin panel integration
- Canvas: Embedded within Canvas UI
- Canvas with Shortcuts: Pitchdeck app with shortcuts support
- Embed with Shortcuts: iFrame App with Dynamic Parameter passing with shortcuts support
- Popup: Popup-based application
Examples demonstrating how to work with Pitcher entities:
- Standalone: Working with entities in standalone mode
Examples showing how to integrate with Salesforce:
- Standalone: Salesforce integration in standalone mode
Examples for multimedia and content selection:
- Content Selector: Content selection interface
Examples for web file applications:
- SFDC Querying in Web File: Salesforce data querying within web files
- Simple SFDC and Call Data in Web File: Combining Salesforce and call data
Each example includes:
app.json: Configuration file for the applicationindex.html: Main entry point for the applicationthumbnail.webp: Preview imageREADME.md: Example-specific documentation
Important: Developers should change the app identifier (name) field in the app.json file before publishing their applications.
You can easily publish your Pitcher apps using the @pitcher/cli-scripts package. This tool simplifies the process of building, validating, and publishing your applications.
-
Install the CLI tool:
npm install -g @pitcher/cli-scripts
This installs the
pcommand line tool. -
Navigate to your app directory (containing app.json)
-
Publish your app:
p publish-app --api-key [YOURAPIKEY] --increment-version --org [YOURORG]
Where
YOURORGis your organization's specific subdomain. E.g. YOURORG.my.pitcher.com andYOURAPIKEYis your generated API key from YOURORG.my.pitcher.com/admin
For detailed information about all available commands and options, visit: Pitcher CLI Documentation