Summary
AppBridge is the Bullhorn implementation of Post-Robot, a JavaScript library that facilitates secure cross-domain communication between web pages and iFramed content. It allows custom applications and extensions to interact seamlessly with the Bullhorn platform.
How Does AppBridge Work?
AppBridge exposes various functionalities and methods to field and page interactions through the Field Interaction (FI) and Page Interaction (PI) APIs. These methods enable actions like opening Bullhorn windows, refreshing content, and making HTTP requests to Bullhorn’s REST API.
NOTE: AppBridge works with the Bullhorn REST API by “harvesting” the BhRestToken of the logged-in user when that user triggers a Field/Page Interaction or Extension that incorporates AppBridge. For that reason, API calls made via AppBridge have the same permissions and/or limitations as the logged-in user who triggers the custom script or extension that leverages AppBridge.
Key Components
1. Novo Elements
- Description: Novo Elements is a UI component library for building modern, responsive, and accessible web applications. It includes utilities that work with AppBridge to provide extended functionality.
- Usage: Utilized in conjunction with AppBridge to create custom Bullhorn extensions.
- Documentation: More information and code examples can be found on GitHub - Novo Elements.
2. Post-Robot
- Description: Post-Robot is a JavaScript library that handles cross-domain messaging for web applications. It ensures secure communication between different origins using a simple API.
- Usage: Post-Robot is integral to AppBridge’s functionality, enabling seamless interactions with iFramed content.
- Documentation: Detailed documentation and examples can be found on GitHub - Post-Robot.
Connecting and Using AppBridge
1. Registering with AppBridge
- First Step: Any custom application must register with Bullhorn AppBridge to start communication. This ensures the application is recognized by Bullhorn.
- Code Example:
API.appBridge.register();
2. Opening windows
- Open native Bullhorn windows: Clients can open various Bullhorn windows such as candidate records or note add windows.
- Code Example:
API.appBridge.open({ type: 'fast-add', entityType: 'Sendout', data: { associations: { candidates: [{ id: 181, firstName: 'Bullhorn', lastName: 'Candidate' }] }, comments: 'Add text here...', isEdit: false } });
3. List views and criteria search
- Open list views: Clients can open Bullhorn list views filtered by specific criteria.
- Code Example:
API.appBridge.openList({ criteria: JSON.stringify({ desiredSkills: { any: ['CSS', 'JavaScript', 'HTML'] } }), type: 'ClientContact' });
4. Making HTTP requests
- GET, POST, PUT, DELETE: Clients can perform create, read, update, and delete (CRUD) operations within the Bullhorn context using relative URLs.
- GET Example:
API.appBridge.httpGET({ relativeURL: '/entity/ClientContact/1' });
By following these steps, you can effectively connect to and use AppBridge to integrate applications with the Bullhorn platform, leveraging the functionalities provided by Post-Robot and Novo Elements.