> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce Webhook Setup Guide

> Configure Salesforce to deliver events to StackOne.

## Prerequisites

Before continuing, you should have already completed the following for this connector:

<Steps>
  <Step title="Configure the Connector">
    Enable the connector and set up its connector profile in your project. See <a href="/guides/explore-connectors">Managing Connectors</a>.

    <Columns cols={2}>
      <Card title="Connector Profile" href="/connectors/salesforce/guides/connector-profile/oauth-2-0" icon="https://stackone-logos.com/api/salesforce/filled/png" horizontal>
        Salesforce - OAuth 2.0
      </Card>
    </Columns>
  </Step>

  <Step title="Link an Account">
    Connect an account using <a href="/guides/embedding-stackone-hub">StackOne Hub</a> or <a href="/guides/auth-link">Auth Link</a>.

    <Columns cols={2}>
      <Card title="Link Account" href="/connectors/salesforce/guides/link-account/oauth-2-0" icon="https://stackone-logos.com/api/salesforce/filled/png" horizontal>
        Salesforce - OAuth 2.0
      </Card>
    </Columns>
  </Step>
</Steps>

<section data-guide-section data-guide-scopes="">
  <h2>Configure Outbound Messages</h2>

  <p>Salesforce delivers event notifications via Outbound Messages — SOAP/XML payloads sent to an HTTP endpoint whenever a record is created or updated. Each sObject and trigger type requires its own Outbound Message pointing at the StackOne Native Webhook URL with an event identifier appended as a query parameter.</p>

  <Steps>
    <Step title="Retrieve StackOne Native Webhook URL">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>The <strong>Native Webhook URL</strong> is generated once a connector profile has been set up. This will be needed in Salesforce Setup later.</p>

        <ul>
          <li>Open the connector profile.</li>
          <li>Copy the value from <strong>Native Webhook URL</strong>.</li>
        </ul>
      </div>
    </Step>

    <Step title="Sign in to Salesforce Setup">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Sign in to your <a href="https://login.salesforce.com" target="_blank" rel="noopener noreferrer">Salesforce account</a> and click the <strong>Setup</strong> ⚙️ icon in the top-right menu.</p>

        <ul>
          <li>Navigate to <strong>Platform Tools</strong> > <strong>Process Automation</strong> > <strong>Workflow Actions</strong> > <strong>Outbound Messages</strong>.</li>
        </ul>
      </div>
    </Step>

    <Step title="Create an Outbound Message">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Click <strong>New Outbound Message</strong> and select the sObject you want to track (e.g., Account, Contact, Lead, Opportunity, Case, Task, or User).</p>

        <ul>
          <li><strong>Name</strong>: A descriptive name (e.g., `StackOne Account Created`).</li>
          <li><strong>Endpoint URL</strong>: Paste the Native Webhook URL and append `?event=<sobject>.<operation>&record_id={!<SObject>.Id}` — for example, `?event=account.created&record_id={!Account.Id}`.</li>
          <li><strong>Fields to Send</strong>: Select all fields you want included in the notification payload.</li>
          <li>Optionally check <strong>Send Session ID</strong> if downstream processing needs to call back into Salesforce.</li>
          <li>Click <strong>Save</strong>.</li>
        </ul>
      </div>
    </Step>

    <Step title="Create a Workflow Rule to trigger the Outbound Message">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Navigate to <strong>Platform Tools</strong> > <strong>Process Automation</strong> > <strong>Workflow Rules</strong> and click <strong>New Rule</strong>.</p>

        <ul>
          <li>Select the same sObject as the Outbound Message.</li>
          <li><strong>Rule Name</strong>: A descriptive name (e.g., `StackOne Account Created Trigger`).</li>
          <li><strong>Evaluation Criteria</strong>: Select <strong>created</strong> for insert-only events, or <strong>created, and every time it's edited</strong> for update events.</li>
          <li><strong>Rule Criteria</strong>: Set to <strong>criteria are met</strong> and configure any filters, or leave as `true` to fire on every record.</li>
          <li>Click <strong>Save & Next</strong>.</li>
        </ul>
      </div>
    </Step>

    <Step title="Add the Outbound Message as a Workflow Action">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>On the Workflow Rule detail page, under <strong>Immediate Workflow Actions</strong>, click <strong>Add Workflow Action</strong> > <strong>Select Existing Action</strong>.</p>

        <ul>
          <li>Choose <strong>Outbound Message</strong> and select the message you created.</li>
          <li>Click <strong>Save</strong>.</li>
          <li>Click <strong>Activate</strong> to enable the rule.</li>
        </ul>
      </div>
    </Step>

    <Step title="Repeat for each event type">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Create a separate Outbound Message and Workflow Rule for each sObject and operation you want to track.</p>

        <ul>
          <li>For <strong>created</strong> events: use <strong>created</strong> evaluation criteria and append `?event=<sobject>.created&record_id={!<SObject>.Id}` to the endpoint URL.</li>
          <li>For <strong>updated</strong> events: use <strong>created, and every time it's edited</strong> evaluation criteria and append `?event=<sobject>.updated&record_id={!<SObject>.Id}` to the endpoint URL.</li>
          <li>Supported events: `account.created`, `account.updated`, `contact.created`, `contact.updated`, `lead.created`, `lead.updated`, `opportunity.created`, `opportunity.updated`, `case.created`, `case.updated`, `task.created`, `task.updated`, `user.created`, `user.updated`.</li>
        </ul>
      </div>
    </Step>

    <Step title="Test the Outbound Message">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Navigate back to <strong>Outbound Messages</strong>, open the message you created, and click <strong>Send Test</strong>.</p>

        <ul>
          <li>A successful test confirms the endpoint is reachable and returns a SOAP ACK response.</li>
          <li>If the test fails, verify the endpoint URL is correct and the connector profile is active.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

## Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.
