How to set up a JSON webhook integration between Salesforce and Franchise Ninja
How to Set Up a JSON Webhook Integration Between Salesforce and Franchise Ninja
Salesforce can accept direct JSON webhooks. A JSON webhook allows external systems to send JSON data to your Salesforce org without requiring OAuth authentication. Below, you will find detailed information on how to set up the JSON webhook.
Salesforce Sites with Apex REST Resources
The most common and effective approach is using Salesforce Sites with Apex REST resources. Here's how it works:
Key Components:
- Force.com Sites Configuration: Creates a public, unauthenticated endpoint accessible from the internet
- Apex REST Resource: Handles the incoming JSON POST requests
- Guest User Profile: Manages permissions for the webhook endpoint
Basic Implementation Structure:
Complete Setup Process
Step 1: Create a Salesforce Site
- Navigate to Setup → Sites
- Create a new site with a unique URL (e.g., your-org.my.salesforce-sites.com/webhooks)
- Configure the site as active
Step 2: Create Your Apex REST Resource
- Build an Apex class with @RestResource annotation
- Use @HttpPost method to handle JSON webhook data
- Include JSON deserialization and processing logic
Step 3: Configure Site Permissions
- Access the site's Public Access Settings
- Enable your Apex class in "Enabled Apex Classes"
- Grant necessary object and field permissions to the Guest User profile
Step 4: Construct Your Webhook URL
The final webhook URL format is:
JSON Processing Capabilities
Salesforce can handle complex JSON structures through:
- Native JSON Deserialization: Using JSON.deserialize() method
- Custom Apex Classes: Create wrapper classes matching your JSON structure
- Dynamic JSON Parsing: For variable or unknown JSON structures
Example JSON Processing:
Security Considerations
While Salesforce can accept direct JSON webhooks, implementing proper security is crucial:
HMAC Signature Verification:

Additional Security Measures:
- IP whitelisting at the org level
- Minimal Guest User permissions (only required object/field access)
- Request logging for monitoring and debugging
- Custom validation logic for payload verification
Alternative Approaches
- Declarative Webhooks: A third-party application that provides a no-code solution for webhook integrations, supporting JSON payloads and offering a user-friendly interface for mapping webhook data to Salesforce objects.
- Outbound Messages: Traditional Salesforce approach that sends XML-formatted data to external systems, though this is primarily for outbound communication rather than receiving JSON webhooks.
Related Articles
How to set up a Zapier integration between Salesforce and Franchise Ninja
How to Set Up a Zapier Integration with Salesforce Overview Integrating Salesforce with Zapier allows you to automate workflows between Salesforce and thousands of other applications—without writing any code. With Zapier, you can create automated ...
How to Configure the Webhook Directly
Integrate our data with any system you like! Webhook Notifications (per user, available to all users) Data Format JSON - (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for ...
How to Create a Webhook to Zapier
How to Create a Webhook to Zapier When setting up your webhook integration, you have the option to route data through Zapier if your system does not support direct webhooks. In the example below, we’ll walk through how to send data to a Google Sheets ...
Hubspot Webhooks
HubSpot's Webhook Capabilities HubSpot supports webhooks in two primary ways: 1. Outbound Webhooks (Sending Data from HubSpot) HubSpot can send webhook requests to external systems through several methods: Webhooks API: Available for all subscription ...
Connectwise Integration
Connectwise Integration Below are the instructions for setting up your Connectwise Integration: 1. Setup a Connectwise Integration User with permission to company, contacts, and activities. (see attached screenshot) 2. Login to Franchise NInja and ...