Trigger: Salesforce Webhook

NOTE: The Salesforce section of this documentation is under construction. The articles in this section may be incomplete.

This trigger fires when a notification from an approved Salesforce organization comes in on a predefined GoFormz URL. It leverages Salesforce Workflow Rules, making it flexible enough to be activated by a wide range of Salesforce events, including field updates from any Salesforce record.

Parameters

Parameter

Value

Webhook URL

The URL where GoFormz should listen for a notification to kick off the workflow. As soon as GoFormz receives a message from your Salesforce organization on this URL, the workflow will start.

Outputs

Output

Value

where_value

The ID of the Salesforce object that triggered the Webhook. It is called “where_value” because it is typically used in the “where” key of a Lookup action.

Setup

Some setup is required for the Salesforce Webhook to function properly: you have to get your Salesforce organization approved with GoFormz, and create a Salesforce Workflow Rule that messages the appropriate GoFormz URL. Below are the steps for doing this.

  1. Whitelist your Salesforce organization with GoFormz. Find your Salesforce organization ID and send it to your GoFormz representative. One way to do this is by navigating to Setup → Company Profile → Company Information in your Salesforce account, and looking at the Salesforce.com Organization ID field. Your GoFormz rep will then add your Salesforce organization to our whitelist, and send you a code.
  2. Create Salesforce Workflow Rule. Create a Workflow Rule in Salesforce, indicating the conditions that should trigger the webhook. For instance, you may want to trigger it when the “Create Inspection Form” checkbox is checked in a newly created Work Order record. Configure the Workflow rule to send an Outbound Message.
  3. Add Webhook URL to Outbound Message. Cut-and-paste the Webhook URL from this trigger to the “Endpoint URL” field in your Salesforce Outbound Message. It will look something like https://hub.goformz.com/api/webhooks/incoming/sfsoap/{code}?planId=12345678-90ab-cdef-1234-567890abcdef. Note that the planId is not assigned until a workflow is saved — so before performing this step, make sure that your workflow has been saved at least once.
  4. Add code to Endpoint URL. Replace the “{code}” text in the Endpoint URL with the code that you got from your GoFormz rep in step 1. So your final Endpoint URL will look something like this: https://hub.goformz.com/api/webhooks/incoming/sfsoap/your_goformz_code?planId=12345678-90ab-cdef-1234-567890abcdef
  5. Save and activate the Workflow Rule. Don’t forget to save and activate your new Salesforce Workflow Rule, so that it goes into effect.

Usage

This is the trigger to use whenever you want to kick off a GoFormz workflow based on something that's done in your Salesforce organization. For example, let's take Salesforce Work Orders as an example. You may want to:

  • Create and partially pre-populate a new work order form in GoFormz whenever a new Work Order record with certain characteristics is created in Salesforce (e.g. all work orders, or only ones with a high enough priority, or only ones for particular accounts, or only ones with a high enough estimate, etc.)
  • Create/pre-populate different GoFormz forms depending on the characteristics of your new Salesforce Work Order record.
  • Update a GoFormz form whenever a corresponding Salesforce Work Order record is updated.
  • Complete a GoFormz form and store the completed PDF to Box whenever a corresponding Salesforce Work Order is marked complete.

These workflows and much more can all be kicked off using the Salesforce Webhook trigger. And the same can be done for any Salesforce record type, not just Work Orders.

Updated 2 years ago

Trigger: Salesforce Webhook


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.