Prerequisites
You should have received from allGood:- The package files
allgood_sfdc_package__v<version>.zip— use this for a first-time install.allgood_sfdc_package__v<version>__upgrade.zip— use this if your org has had a previous version of allGood webhooks; it also removes obsolete components from the old version.
- One or more Webhook URLs
They look likehttps://webhook.allgoodhq.app/abc123. - Optionally, an API key for each webhook
__upgrade file. Otherwise use the plain file.- A Salesforce login with the System Administrator profile
- Permission to deploy metadata and edit Custom Metadata
Install the package
You can install with Workbench (no extra software) or the Salesforce CLI. Workbench is the simplest for most admins.Log in to Workbench
Open the Deploy page
Choose the package file
__upgrade if a previous version was installed.Set the deployment options
- Rollback On Error — so a failure leaves your org untouched.
-
Test Level:
RunSpecifiedTests— Salesforce requires tests to run when deploying to Production. -
Run Tests — paste the package’s three test classes:
-
Ignore Warnings — only when deploying the
__upgradefile. Leave it unchecked for the plain first-time-install file.
Why RunSpecifiedTests and not RunLocalTests?
Why RunSpecifiedTests and not RunLocalTests?
RunLocalTests runs every test in your org — yours, allGood’s, and every other vendor’s. Any failing test anywhere blocks the install, even when it has nothing to do with allGood. In an established org there is usually at least one, so this is the most common reason an otherwise-fine install fails.RunSpecifiedTests runs only the three allGood test classes. Salesforce still enforces coverage: every class and trigger in the package must be at least 75% covered by the tests you name. The allGood package ships at 100% coverage, so it passes comfortably.This does not weaken your org. It skips running unrelated tests during this one deployment; it does not change, disable, or delete anything of yours.Why does the upgrade file need "Ignore Warnings"?
Why does the upgrade file need "Ignore Warnings"?
__upgrade file removes obsolete components left by older versions, and that cleanup list intentionally names components that may not be present in your org. Salesforce treats a “not found” deletion as a warning; without Ignore Warnings, that warning fails the whole deploy. Enabling it lets those skips pass while still deleting whatever obsolete components are present.Real problems still fail the deploy, and Rollback On Error keeps it all-or-nothing. The plain first-time-install file performs no deletions, so it does not need this option.Deploy and wait for success
Using the Salesforce CLI instead
Using the Salesforce CLI instead
--ignore-warnings only for the __upgrade package:--tests flag. Add --dry-run to validate without committing.Configure your webhooks
Each webhook is one configuration record. Create one per object you want to send (Lead, Contact, or both); you can also create several for the same object if allGood gave you more than one URL.Open Custom Metadata Types
Manage the configuration records
Create a configuration record
Save and repeat
About “Update Trigger Fields”
This controls which edits send a webhook. Only changes to the fields you list here trigger an update event — this avoids sending a webhook on every unrelated edit.- Recommended for Lead:
Status, Email, Phone, Company - Recommended for Contact:
Email, Phone, LastName, Status
Verify it works
Check the configuration is active
Create a test record
Edit a trigger field
Confirm the events arrived
- Setup → Apex Jobs — you should see a recently completed
WebhookServicefuture job. - Setup → Debug Logs — enable logging for your user, repeat the test, and look for the outbound request and its HTTP response status.
Reference
- What is sent
The record’s standard fields (plus any Include Fields you list) as a JSON POST, with aMetadatasection describing the event (object, insert vs. update, and the previous values on an update). The API key, if set, is sent as a bearer token. - Reliability
Each event is delivered asynchronously and retried up to 3 times. - Security
All traffic is HTTPS to allGood-owned domains, which are pre-approved by the package (Remote Site Settings). The API key is sent in the standardAuthorizationheader.
Turning it off
- Pause one webhook: uncheck Is Active on its configuration record.
- Pause everything: uncheck Is Active on all configuration records.
- Full uninstall: remove the Apex triggers (
LeadTrigger,ContactTrigger), then the Apex classes and the configuration type, via Setup or a destructive deployment.
Troubleshooting
No webhook sent at all
No webhook sent at all
Nothing happens on edits
Nothing happens on edits
Insert works, update doesn't
Insert works, update doesn't
allGood reports 401 / 403
allGood reports 401 / 403
Error mentioning an unsupported URL or callout not allowed
Error mentioning an unsupported URL or callout not allowed
https://webhook.allgoodhq.app). Re-paste the URL allGood gave you.Deploy failed with "No ApexClass named ... found" (or similar "not found")
Deploy failed with "No ApexClass named ... found" (or similar "not found")
__upgrade file without Ignore Warnings — re-deploy
with it checked.Deploy failed on tests that aren't allGood's
Deploy failed on tests that aren't allGood's
WebhookTriggerHandlerTests, WebhookServiceTests, or WebhookConfigProviderTests, it is a pre-existing failure in your org and unrelated to this package.Set Test Level to RunSpecifiedTests and list only the three allGood classes, as described in “Set the deployment options” above. That is the recommended setting for every install. Those other failures are still worth fixing, but they should not hold up this deployment.Deploy failed with "FIELD_CUSTOM_VALIDATION_EXCEPTION" inside an allGood test
Deploy failed with "FIELD_CUSTOM_VALIDATION_EXCEPTION" inside an allGood test
Deployment failed for another reason
Deployment failed for another reason