Welcome to ConnectHooks
The Salesforce Application that turns external webhook JSON into Salesforce records — automatically, securely, and without custom Apex code.
What Problem It Solves
Every Salesforce org needs data from external systems — lead capture forms, payment gateways, event registrations, survey tools. Traditionally this requires custom Apex REST classes for every integration. ConnectHooks solves this with a zero-code, config-driven webhook platform.
An admin creates a webhook, draws lines between JSON fields and Salesforce fields in a visual UI, and from that point forward every form submission automatically becomes a Salesforce record.
Webhook Endpoint
Secure public URL that accepts HTTP POST JSON from any system.
Dual-Factor Auth
Secure URL Code + API Key header — two independent checks per request.
Visual Mapper
Drag-and-drop UI maps JSON paths to Salesforce fields. No code needed.
Instant Records
Creates SObject records, supports arrays, parent-child hierarchies.
JSONPath Engine
Full RFC 9535 JSONPath built in Apex — no external libraries required.
Custom Handler
Plug in your own Apex via ICHCustomHandler interface.
Working Flow of ConnectHooks
ConnectHooks operates in two distinct phases — a one-time Configuration Time setup by an admin, and the fully automated Runtime that fires every time an external system sends data. Together they form a complete, zero-code webhook integration pipeline inside Salesforce.
ConnectHooks Lifecycle
From installation to live automation — here is the complete lifecycle of a ConnectHooks integration in four sequential phases.
Phases 3 & 4 repeat infinitely — Create multiple webhooks and receive unlimited inbound webhook submissions from external systems, automatically processing each request and creating or updating Salesforce records, without any manual intervention.
Quick Start Guide
Follow these 22 steps to go from zero to a fully live webhook integration — no code, no Apex, fully automated.
Install ConnectHooks from AppExchange
Go to Salesforce AppExchange and install the ConnectHooks application into your
Salesforce org. During installation, the system automatically sets up all required permissions, custom
settings, and assigns the ConnectHooks_Admin permission set to the installing user. Once
installation is complete, you are ready to begin.
ConnectHooks_Admin permission set is auto-assigned — no
manual action needed.Create a Public Salesforce Site
Before using ConnectHooks, you must create a Public Salesforce Site. This is necessary because external systems (like Postman, forms, or any app) need a publicly accessible URL to send data to your Salesforce org.
Follow these steps inside Salesforce:
- Click the ⚙️ Gear icon (Setup) in the top-right corner of Salesforce.
- In the Quick Find box on the left, type
Sitesand select Sites from the results. - Click the New button to create a new site.
- Enter a Site Name — use something memorable (e.g.
ConnectHooksSite). - Check the Active checkbox to make the site live immediately.
- In the Active Site Home Page field, select UnderConstruction.
- Click Save. Your site is now ready — the site URL will be used as the webhook endpoint base.
Open the ConnectHooks App
Open the App Launcher in Salesforce and search for ConnectHooks. Click to open it. This is your main workspace where all configuration, mappings, and webhooks are managed.
Go to the CH Config Tab
Inside the ConnectHooks app, click the CH Config tab. This is the setup wizard that guides you through initial configuration. You'll see a numbered checklist — complete each step in order.
Complete All 6 Configuration Steps
The CH Config wizard walks you through these steps:
Create a Public Site
Manually create a new Salesforce Public Site from Setup. This is the base URL for all your webhooks.
Set the Public Site in the App
Select and link the site you created to ConnectHooks so it knows which URL to use for webhooks.
Assign Permissions to the Site User
Grant the site Guest User the required permissions to receive and process incoming requests.
Create the Files Library
Sets up the ConnectForm Library in Salesforce Files to store raw JSON payloads as attachments.
Enable JSON File Storage
Toggle on to save a copy of every incoming JSON payload into a Form Submission record and the Files library.
Generate the API Key
Generates the JSONPath Generator API Key used internally by ConnectHooks for AI-assisted field mapping.
Click "Create Webhook"
A webhook is an automated messaging system that sends real-time data from one application to another exactly when an event happens. In ConnectHooks, it acts as a "catcher" that instantly receives this outside data and automatically uses your mappings to create or update records in Salesforce.
Inside the ConnectHooks app, click the Create Webhook button. A dialog will appear asking you to provide:
- →Webhook Name — unique, no spaces (e.g.,
LeadCaptureorContactForm) - →Active Status — toggle ON so the webhook starts accepting requests immediately
- →Enable JSON Storage — optionally store a copy of every incoming JSON payload in Salesforce Files
Save and Copy Your Webhook Details
After saving, ConnectHooks automatically generates two security credentials:
- 🔑Secure URL Code — a 48-char token embedded in your endpoint URL
- 🔑API Key — the secret key your external system must send with every request
Your endpoint URL will look like:
Go to the CH Mapping UI Tab
Click on the CH Mapping UI tab inside ConnectHooks. This is where you tell ConnectHooks how to read incoming JSON and where to store each value in Salesforce.
Open Your Webhook
From the list of webhooks, select the webhook you just created. This opens the mapping workspace for that webhook specifically.
Upload or Drag & drop Your JSON Payload
Upload or paste a sample JSON payload that your external system will send. ConnectHooks reads it and displays all available fields on the left panel — your reference map for incoming data.
Apply JSONPath Filters (If Needed)
If your JSON contains arrays, apply JSONPath filters to tell ConnectHooks exactly which part to extract — for example to loop each item in an array and create a separate record for each.
Loop through all items in the orders array — one record created per item.
Only process orders where amount > 1000 — all other rows skipped.
Only process orders where paid is true — unpaid orders are skipped.
Traverse nested arrays — loops every order inside every group.
Only items where status equals “active” are processed.
Orders where quantity ≥ 5 AND paid is true — both must match.
Select Your Target Salesforce Object
On the right side, use the Add Object button to select the Salesforce Object where records should be created — any standard object (Lead, Contact, Account) or any custom object in your org.
Add Object
Click Add Object to pick a Salesforce object. It appears in the right panel and its required fields are auto-populated so you don't have to add them manually.
Add Child Object
Need a related record? Click Add Child Object on any parent object to attach a child object. ConnectHooks automatically links it to the parent's new record ID.
Add Fields
Click Add Fields on any object — parent or child — to include additional Salesforce fields. You can add as many fields as needed for each object independently.
Drag JSON Fields → Drop on Salesforce Fields
Connect your incoming data to Salesforce by simply dragging and dropping:
- 1Drag a JSON element (e.g.,
nameoremail) from the left panel. - 2Drop it directly into the matching Salesforce field box (e.g.,
Account NameorEmail) on the right panel.
After a successful drop: The field section will automatically display the generated JSONPath (like $.data.email) next to the Salesforce field, confirming the link is active.
Save Your Mappings
Once all fields are mapped, click Save. ConnectHooks stores the mappings and evaluates them automatically every time a new request arrives.
CH_Mapping__c records and evaluated at
runtime using the built-in JSONPath engine.Open Postman — Create a New POST Request
Open Postman (or any API tool like Insomnia or curl). Create a new request and set the
method to POST.
Add Your Webhook Endpoint URL
In the URL field, paste the Webhook Endpoint URL you saved in Step 7.
Add the API Key Header
Go to the Headers tab in Postman and add the following:
401 Unauthorized.Add JSON Payload in Body
Go to the Body tab → select raw → set format to JSON. Paste the same JSON payload you uploaded during the mapping step. This is the actual data ConnectHooks will process.
Send the Request
Click Send. A successful response looks like this:
Return to Salesforce
Go back to Salesforce and navigate to the object tab that matches the Salesforce Object you selected in your mappings (e.g., the Leads, Contacts, or custom object tab).
Check Your Created Records
You will see a new record created from your JSON payload — with all the fields correctly filled in based on your mappings. Every field you dragged and dropped will have the exact value from the JSON you sent via Postman.
🎉 Your Webhook is Live!
That's it. From this point on, any external system — a form tool, a mobile app, a CRM, or any REST API — that sends a POST request to your webhook URL with the correct API Key will automatically create Salesforce records without any manual work.
Key Features
Deep-dive into every capability that ConnectHooks ships with out of the box.
Webhook Endpoint
Each webhook gets a unique public HTTPS URL. The URL contains two security tokens embedded directly: the webhook name and a 48-character secure code. Any HTTP client can POST JSON to this URL.
Authentication — Dual-Factor
Every request must pass two independent authentication checks:
| Check | How | Value |
|---|---|---|
| Secure URL Code | Embedded in URL path | 48-char dash-separated random string |
| API Key | x-api-key header OR JSON body field |
48-char alphanumeric token (stored encrypted) |
The API key is stored as an SHA-256 hash in CH_Webhook__c.Enc_Api_Key__c. Validation rehashes
the incoming key and compares. The plain key is never stored.
Field Mapping with JSONPath
Admins use the CH Mapping Ui LWC to visually connect JSON fields to Salesforce fields. Each
mapping line stores a JSONPath expression (e.g. $.orders[*].id) in
CH_Mapping__c.JsonPath_Expression__c.
At runtime, JSONPathEvaluator evaluates these expressions against the incoming JSON and extracts
values. The JSONPath engine supports:
- Root
$.fieldand nested$.parent.childaccess - Array indexing
$.items[0]and wildcard$.items[*] - Filter expressions
$.items[?(@.price > 10)] - Recursive descent
$..fieldName
AI Filter in Mapping
A built-in feature inside the CH Mapping UI that lets you filter specific rows from a JSON array using conditions. Only rows that match the filter will create Salesforce records. You can write the filter manually — or describe it in plain English and let AI generate it for you.
AI-Generated Filters
Type a plain-English condition (e.g. "Get orders where amount > 1000") and click Get JSONPath. The AI converts it into a valid JSONPath filter expression automatically.
Manual Edit Anytime
After the AI generates an expression, you can manually edit it directly in the mapping UI before saving — or click the edit icon after saving to update it at any time.
Precision Record Creation
Only JSON array rows that match the filter condition are processed. Non-matching rows are skipped entirely — no unwanted records are created.
How to Use It — Step by Step
-
Open Webhook → Mapping
Navigate to your webhook in ConnectHooks and open the CH Mapping UI.
-
Select a Salesforce Object
Choose the target object (e.g.
Contact) you want records created in. -
Pick an Array Field from your JSON Schema and click "Apply Filter"
Select a JSON array field as the data source (e.g.
$.orders[*]). -
Describe Your Filter in Plain English
Type a natural-language condition — for example: "Get orders where amount > 1000".
-
Click "Get JSONPath"
The AI generates the matching JSONPath filter expression (e.g.
$.orders[?(@.amount > 1000)]) and drops it directly into your field mapping. -
Review & Edit (Optional)
You can manually adjust the generated expression in the UI before saving if needed.
-
Save
The filter is stored on the mapping. At runtime, only matching rows from the JSON array will trigger record creation.
Mapping Validations
The CH Mapping UI runs several real-time validations to prevent invalid configurations before they reach the runtime engine. These checks fire automatically — no manual action needed.
1. Data Type Compatibility
ConnectHooks checks whether the JSON data type of the source field is compatible with the target Salesforce field type. Incompatible combinations are blocked immediately.
| JSON Type | Cannot Map To These Salesforce Field Types |
|---|---|
| number | Email, Phone, URL, Multipicklist, Checkbox, Date, Time, DateTime |
| boolean | Email, Phone, URL, Multipicklist, Currency, Integer, Double, Date, Time, DateTime |
| string | Checkbox, Geolocation |
| null | Cannot be mapped to any field type |
2. Array Filter Mismatch
All fields mapped to the same Salesforce object must share the same final array-level filter. Mixing different filters on the same object would cause conflicting row selection — ConnectHooks blocks this with an error toast.
$.groups[*].orders[?(@.paid == true)].total → Order.Amount$.groups[*].orders[?(@.paid == false)].ref → Order.Reference“All fields on the same Salesforce object must use the same last array filter.
Dropped last filter:
[?(@.paid == false)] | Existing last filter:
[?(@.paid == true)]Please ensure the last array filter matches for all fields on Order.”
3. Unsaved Changes Warning
If you have added mapping objects, dropped fields, or applied filters but have not yet clicked Save, ConnectHooks shows a warning before you leave. This prevents accidental loss of mapping work.
Webhook Switch
Trying to select a different webhook while edits are pending triggers the warning. Confirm to discard, or go back and save first.
Page Close / Navigate Away
Closing the browser tab or navigating away from the mapping page also triggers the browser’s built-in “Leave site?” prompt to protect unsaved work.
4. Schema Upload Clears All Mappings
Any new schema upload — even if it is the same JSON file — is treated as a full reset of the mapping configuration. This ensures the schema tree and mapped fields always stay in sync.
Left Panel Cleared
The JSON schema tree and all applied filters are completely removed.
Right Panel Cleared
All mapped Salesforce objects and their field-level mappings are deleted.
Record Creation
WebhookRuntimeService reads the CH_Mapping_Object__c tree and creates SObject
records dynamically using Database.insert. It handles:
Single Record
One JSON object → one SObject record with mapped field values.
Array / Multiple Records
A JSON array [{...},{...}] → multiple records in one request.
Parent-Child Hierarchy
Child mapping objects reference the parent's new record ID automatically.
Form Submission Storage (Raw JSON Storage)
Optionally saves a copy of every incoming raw JSON payload into a Salesforce record, giving admins a complete audit trail of all webhook requests — successful or failed.
(Enable_Storage_Of_Form_Submission_JSON__c) toggle. Storage can be enabled or
disabled independently for each integration.Form Submission Record
After records are created, ConnectHooks saves a Form Submission
(Form_Submission__c) record capturing the full details of the request.
File Storage
The raw JSON is also saved as a Content Version (ContentVersion) file
inside a dedicated Salesforce Files library — ConnectForm Library — created automatically
during setup.
Full Auditability
Every request leaves a trace. Use the Form Submission records to diagnose mapping issues, replay failed requests, or review payload history.
What Each Form Submission Record Stores
(Raw_JSON__c)(Webhook__c)(CH_Webhook__c) record that
received this request.(Status__c)(Error_Message__c)Custom Handler API
Developers can bypass the standard mapping engine by implementing the ICHCustomHandler interface
and registering their Apex class name in the Custom_Handler_Class__c field on the corresponding
webhook record. CH_Webhook__c is a Custom Object — each row represents one
webhook integration. The Custom_Handler_Class__c field is a plain text field where you enter the
fully-qualified Apex class name (e.g. MyHandler). When ConnectHooks receives a request for that
webhook, it dynamically instantiates your class and calls execute(jsonPayload) instead of the
built-in field mapping engine.
// Implement this interface in your Apex class
public class MyHandler implements xccch.ICHCustomHandler {
public void execute(String jsonPayload) {
// Parse the payload and do custom logic here
Map<String,Object> data = (Map<String,Object>)
JSON.deserializeUntyped(jsonPayload);
// Create/update records as needed
}
}
Core Data Model
All custom objects, custom settings, and custom metadata used by ConnectHooks.
Custom Objects
CH Webhook (CH_Webhook__c) — Webhook Registry
| Field | Type | Purpose |
|---|---|---|
Webhook Name (Webook_Name__c) |
Text(80) | Unique name. No spaces. Used in the endpoint URL. |
Secure URL Code (Secure_URL_Code__c) |
Text(255) | 48-char dash-separated code embedded in endpoint URL. |
Encrypted API Key (Enc_Api_Key__c) |
Text(255) | SHA-256 hash of the API key. Plain key is never stored. |
Active Status (is_Active__c) |
Checkbox | If false, all requests rejected with 404. |
Request Count (RequestCount__c) |
Number | Rolling request counter for rate limiting. |
Request Count Reset Time (RequestCountResetTime__c) |
DateTime | When the current rate limit window started. |
Custom Handler Class (Custom_Handler_Class__c) |
Text(255) | Apex class name implementing ICHCustomHandler (optional). |
CH Mapping Object (CH_Mapping_Object__c) — Target Object Config
| Field | Type | Purpose |
|---|---|---|
Target Object (Custom_Object__c) |
Text(255) | API name of target Salesforce object (e.g. Lead, Contact__c). |
Webhook (Webhook__c) |
Lookup(CH_Webhook__c) | Parent webhook this mapping belongs to. |
Parent Mapping Object (Parent_Mapping_Object__c) |
Lookup(self) | Points to parent object for hierarchical record creation. |
Parent Lookup Field (Parent_Lookup_Field__c) |
Text(255) | API name of the lookup field that links child to parent. |
CH Mapping (CH_Mapping__c) — Field-Level Mappings
| Field | Type | Purpose |
|---|---|---|
Mapping Object (Mapping_Object__c) |
Lookup(CH_Mapping_Object__c) | Which object config this field mapping belongs to. |
Salesforce Field (Fields__c) |
Text(255) | Salesforce field API name (e.g. LastName, Email). |
JSONPath Expression (JsonPath_Expression__c) |
Text(500) | JSONPath expression to extract value (e.g. $.contact.email). |
Form Submission (Form_Submission__c) — Raw Payload Log
| Field | Type | Purpose |
|---|---|---|
Webhook (Webhook__c) |
Lookup(CH_Webhook__c) | Which webhook received this request. |
Raw JSON (Raw_JSON__c) |
Long Text Area | The complete incoming JSON payload. |
Status (Status__c) |
Text | success / error |
Error Message (Error_Message__c) |
Long Text Area | Error details if processing failed. |
JSON Schema (JSON_Schema__c) — Validation Schema
Stores a JSON schema string linked to a webhook. Used by the runtime to validate required fields in incoming payloads before processing begins.
Custom Settings
ConnectHooks Config Settings (ConnectHooks_Config_Settings__c) — Hierarchy Custom Setting
| Field | Purpose |
|---|---|
Public Site Used (Public_Site_Used__c) |
Name of the selected public Salesforce Site. |
Secure URL Code (Secure_URL_Code__c) |
Site-level secure code (deprecated; per-webhook now). |
Site URL (Site_URL__c) |
Base URL of the public site. |
Create Public Site Step (Step_Create_Public_Site__c) |
Checkbox — Step 1 of wizard done. |
Disable JSON Storage (Disable_Storage_Of_Form_Submission_JSON__c) |
When true, raw JSON is NOT saved (inverted flag). |
JSONPath Generator API Key (JSONPath_Gen_Sys_API_Key__c) |
API key for the external JSONPath Generator service. |
AI Backend Endpoint URL (AI_BackEnd_EndPoint_Url__c) |
Backend URL (default: https://apps.getxccelerance.com/connecthooks). |
API & Security
Security model, permission sets, Apex classes overview, and LWC components.
Security Model
| Gate | Check | Fail Response |
|---|---|---|
| 1 — Secure URL Code | URL path token matches CH Webhook › Secure URL Code
(CH_Webhook__c.Secure_URL_Code__c) |
401 Unauthorized |
| 2 — Webhook Active | CH Webhook › Active Status (is_Active__c) = true |
404 Not Found |
| 3 — API Key | SHA-256(incoming) = CH Webhook › Encrypted API Key (Enc_Api_Key__c) |
401 Unauthorized |
| 4 — Rate Limit | Request count ≤ limit within 24h window | 429 Too Many Requests |
Additionally, the WebhookLimitTrigger enforces the creation limit at the database level — it
cannot be bypassed via any interface, including Data Loader or direct API calls.
Permission Sets
| Permission Set | Who Gets It | Access Granted |
|---|---|---|
| ConnectHooks_Admin | Installing user (auto) + other admins (manual) | Full CRUD on all ConnectHooks objects. Access to all Apex classes and LWC. Required to use Config tab and Mapping UI. |
| ConnectHooks_Public_Site_User_Permissions | Site guest user (Step 3 of wizard) | Read access to CH_Webhook__c, CH_Mapping_Object__c, CH_Mapping__c. Access to ConnectHooksSubmissionWebService. Minimum needed to process webhook requests. |
Troubleshooting & Logs
Common issues and how to diagnose them using ConnectHooks' built-in logging.
Reading Form Submission (Form_Submission__c) Logs
Every webhook request (successful or failed) creates a Form_Submission__c record (if JSON
storage is enabled). Check these fields:
❗ Common Errors & Fixes
| HTTP Status | Error | Fix |
|---|---|---|
| 401 | Invalid Secure URL Code | Copy the full endpoint URL from the webhook card. The secure code segment must match exactly. |
| 401 | Invalid API Key | Send the API key in the x-api-key header. Check for trailing spaces or encoding issues.
|
| 404 | Webhook not found / inactive | Verify the webhook name in the URL. Check is_Active__c = true on CH_Webhook__c. |
| 429 | Rate limit exceeded | Wait for the 24-hour window to reset, or contact admin to raise the limit in
CH_Config_Meta_Store__mdt. |
| 400 | JSON schema validation failed | Check Error_Message__c for the missing required fields. Update the payload or
remove/update the JSON schema. |
| 400 | Field mapping / DML error | Verify JSONPath expressions in CH_Mapping__c.JsonPath_Expression__c match the payload
structure. Check field-level permissions. |
| — | Webhook creation blocked | Free edition limit (2 webhooks) reached. Delete an existing webhook first. |
| — | Site guest user can't process | Run Step 3 of the setup wizard again to re-assign the
ConnectHooks_Public_Site_User_Permissions permission set. |
Debugging JSONPath Expressions
Use the live preview in the CH Mapping Ui LWC — paste a sample JSON payload and click
Test next to any mapping row. The JSONPathAPIController.evaluateJSONPath()
method runs the expression and shows the extracted value.
You can also test manually using the developer console. Example:
// In Salesforce Developer Console (Anonymous Apex)
String json = '{"name":"John","email":"john@example.com"}';
String path = '$.email';
Object result = xccch.JSONPathEvaluator.evaluate(json, path);
System.debug(result); // → john@example.com