Veezla Docs
Search…
⌃K

Webhooks

Webhooks are push notifications, or callbacks, which allow users to stay up-to-date on the status of their objects without needing to poll for updates.Webhooks automatically send specified data to a destination (endpoint) from database events.
Our PM app utilizes webhooks for many of our features, such as updating tracking information for Print & Mail records and creating new Print & Mail records.
Anytime an event occurs like Letters, Checks, or Postcards are created or updated in Lob, a Webhook Event record gets created in Salesforce. Each Webhook Event record contains the full JSON payload of what occurred, which is processed automatically in Salesforce. The Webhook Event details are used to insert or update the related Print & Mail record in Salesforce.
We suggest using Webhook Events for troubleshooting and/or tracking what records are created or have been updated in Salesforce.

Configuration

Step 1. Create a Force.com Domain

  • Within Setup In the Quick Find, type in and click "Sites."
  • If a Force.com domain has not been setup continue with the instructions, otherwise navigate to the next step (Site Configuration).
  • Enter a value for your Force.com domain and click check availability
  • Accept Site terms of use and click "Register My Force.com Domain."

Step 2. Site Configuration

  • Click New next to Sites.
  • Set a Site Label, Site Name, and Default Web Address (We suggest using webhook).
  • Check the Active checkbox.
  • On the active Site home page field click the Lookupicon and select InMaintenance (the page is not visible, it's just a placeholder because a value is required).
  • Check Require Secure Connections (HTTPS).
  • Click Save.

Step 3. Enable Apex Class Access

  • Click on Public Access Settingsbutton
  • Navigate to Enabled Apex Class Access part and click Edit
  • From the Available Apex Classes add cp_address.REST_Webhook to the enabled column and save it

Step 4. Enable Read and Create access for Webhook Events

  • Within the same Public Access Settings page click Edit
  • Navigate to the Custom Object Permissions Part and select the Read and Create checkboxes next to Webhook Events and save it

Step 5. Configure Webhook in Lob

  • Navigate to your connected Lob account dashboard
  • Select the Webhooks tab on the left hand side
  • Click on the Create button at the top
  • In the URL field set the url to the Salesforce webhook Site you just created
  • Select the Event Types according to your business requirements