Opportunities in Salesforce often contain valuable product feedback, whether it’s a Closed Lost reason, a sales objection, or a custom field filled out by sales reps.
You can automatically push this feedback into Harvestr to centralize insights from your sales pipeline, analyze product gaps, and inform prioritization.
This guide explains how to do this using:
Example scenario
We’ll use Closed Lost reasons as an example throughout this guide, but the same logic applies to any Opportunity property where sales reps capture product-related insights (e.g. objection fields, feature requests, internal notes).
Option 1: Using Zapier
Prerequisites
Salesforce and Harvestr accounts connected to Zapier. The first time you connect Harvestr, Zapier asks for your Harvestr login token: copy it from the Login token card of Settings > Integrations > Zapier (click Generate login token if there is none yet)
A field in Salesforce (e.g.
Lost Reason) where feedback is collected
Steps
Trigger: Salesforce → Updated Field on Record
App: Salesforce
Event: Updated Field on Record
Object: Opportunity
Filters:
Stage = Closed LostLost Reason(or any feedback field) is not empty
Action: Harvestr → Create Message
App: Harvestr
Event: Create Message
Set up the action with:
Title: type
Lost Opportunity -, then map the Opportunity's Account Name fieldContent: map the Opportunity's Lost Reason field (or your feedback field)
Channel:
SALESFORCERequester Email: map the email of the Opportunity's Contact (the customer who gave the feedback)
Submitter Email: map the email of the Opportunity Owner (the sales rep who reported it)
(Optional) Add labels like
lost-deal,sales-feedback
Test your Zap
Update a test Opportunity in Salesforce
Confirm that the feedback appears in your Harvestr inbox
Option 2: Using Salesforce Flow + Harvestr API
If your team prefers to automate workflows directly within Salesforce without using third-party tools like Zapier, you can send Opportunity feedback to Harvestr using a Record-Triggered Flow and an HTTP callout.
This method gives you full flexibility to customize when and how feedback is pushed, and can be deployed across multiple fields or Opportunity stages.
Prerequisites
Admin access in Salesforce
A Harvestr access token with Create access on Feedback, created in Settings > Integrations > Public API. Editors and Owners can create tokens
An External Credential and a Named Credential in Salesforce to authenticate the callout securely
A custom Flow (created with Flow Builder)
Note on Salesforce Named Credentials
Since Winter ’23, Salesforce splits authenticated callouts into two objects: an External Credential (stores the auth protocol, principal, and headers) and a Named Credential (stores the endpoint URL and references an External Credential). This guide uses that model.
Steps
Step 1: Create a Harvestr access token
Harvestr uses a private-app token passed in a custom header (X-Harvestr-Private-App-Token), not a standard Bearer token.
Go to Settings > Integrations > Public API and click Create token.
In Name, enter something like Salesforce Opportunity feedback.
Under Access, select Create on the Feedback row (required for the
POST /v1/messageendpoint).Click Create token, copy the token from Copy your token now to a password manager, then click Done. You won't see it again.
Harvestr docs: Quickstart and Required scopes
Step 2: Create an External Credential in Salesforce
The External Credential holds the Harvestr API token and injects it as a custom HTTP header on every callout.
Salesforce docs: Create Named Credentials and External Credentials
Go to Setup > Security > Named Credentials and open the External Credentials tab.
Click New. Fill in:
Label: Harvestr
Name:
HarvestrAuthentication Protocol: Custom
Save.
In the Principals section, click New. Fill in:
Parameter Name:
DefaultSequence Number:
1Identity Type: Named Principal
In Authentication Parameters, add:
Name:token
Value: paste your Harvestr access token
Save.
Back on the External Credential page, in the Custom Headers section, click New. Add:
Name:
X-Harvestr-Private-App-TokenValue:
{!$Credential.Harvestr.token}Sequence Number:
1
Save.
In your Salesforce Permission Sets, grant access to this External Credential to the users or integration principal that will run the Flow.
Step 3: Create a Named Credential
The Named Credential holds the Harvestr API base URL and points to the External Credential you just created.
In Setup > Security > Named Credentials, open the Named Credentials tab.
Click New. Fill in:
Label: Harvestr API
Name:
Harvestr_APIURL:
https://rest.harvestr.ioExternal Credential: Harvestr
Generate Authorization Header: unchecked (Harvestr uses a custom header, not
Authorization: Bearer)Allow Formulas in HTTP Body: you can leave it unchecked. This setting only lets Apex code use credential fields in a request body. The Flow sets the body from record fields in Step 6.
Save.
Step 4: Create a Record-Triggered Flow
Build a Flow that fires when an Opportunity is updated (e.g., marked as Closed Lost and a feedback field is filled).
Salesforce docs: Create a Record-Triggered Flow
Go to Setup > Flows.
Click New Flow.
Select Record-Triggered Flow.
Object: Opportunity.
Trigger the Flow When a record is updated.
Entry Conditions (example):
StageName Equals Closed LostLost_Reason__c Is Null = False
Optimize for: Actions and Related Records.
On the Start element, turn on Add Asynchronous Path. This creates a Run Asynchronously path. You add the HTTP callout to this path in Step 6, not to the immediate path.
Why an asynchronous path?
Salesforce blocks callouts to external services while a record is being saved, so a record-triggered flow that calls Harvestr on its immediate path fails. The asynchronous path runs in the background after the Opportunity save is committed, which allows the callout. Asynchronous paths don't support the ISCHANGED operator.
Salesforce docs: Record-Triggered Flow Considerations
Step 5: Capture the customer's identity
The Harvestr POST /v1/message endpoint requires a requester object with a type (USER or COMPANY) and a name. For type USER, you can also provide an email. If the requester doesn't exist in Harvestr yet, they will be created (upserted).
Make sure you have Salesforce fields you can map to those values, such as:
A Contact lookup on the Opportunity, or a formula field that pulls
Contact.NameandContact.EmailOr an Account-level field if you want to attach the feedback to a company instead of a person
Salesforce docs: Create or Edit Custom Fields
Step 6: Add an HTTP Callout to Harvestr
Use the Named Credential to POST the feedback to Harvestr. Add every element in this step to the Run Asynchronously path.
Salesforce docs: Configure an HTTP Callout Action
Create the HTTP Callout action
On the Run Asynchronously path, click +, select Action, then click Create HTTP Callout.
Configure the external service:
Name:
HarvestrNamed Credential: Harvestr_API (Salesforce fills in the URL)
Click Next and configure the action:
Label: Send Feedback to Harvestr
Method:
POSTURL Path:
/v1/message
Provide a sample request body: click New and paste a sample JSON request with example values (see below). Salesforce generates a data structure (an Apex class) from this sample. Click Review, then Done.
Provide a sample response body the same way, for example the response shown in the Harvestr API reference. Click Review, then Done.
Click Save. Flow Builder creates the action and the external service.
Sample request body (example values only, this is the shape Harvestr expects):
{ "title": "Lost Opportunity - Acme Corp", "content": "Missing SSO integration", "channel": "SALESFORCE", "requester": { "type": "USER", "name": "Jane Doe", "email": "[email protected]" }, "submitter": { "name": "John Smith", "email": "[email protected]" }}
Don't type record fields into the sample
The sample request is only used to generate the data structure. The actual values come from the Opportunity, which you set with an Assignment element below.
Set the request body from the Opportunity
In the HTTP Callout action, for body, select New Resource and enter an API name such as
harvestrMessage. The data type and Apex class are set for you, which creates an Apex-defined variable.Before the HTTP Callout action, on the same Run Asynchronously path, add an Assignment element.
In the Assignment, set each field of
harvestrMessagefrom the triggering record (replace with your actual field names), for example:title: a text formula or text template such as
Lost Opportunity - {!$Record.Account.Name}content:
{!$Record.Lost_Reason__c}channel:
SALESFORCErequester: type
USER, name{!$Record.Contact.Name}, email{!$Record.Contact.Email}submitter: name
{!$Record.Owner.Name}, email{!$Record.Owner.Email}
Make sure the HTTP Callout action uses
harvestrMessageas its body input.
What you don't need to configure
Base URL: handled by the Named Credential (https://rest.harvestr.io). You only set the path (/v1/message).
Auth header: injected automatically from the External Credential's Custom Headers. Do not add X-Harvestr-Private-App-Token manually.
Content-Type header: Salesforce sets application/json automatically when you provide a JSON body.
Reference: the full request/response schema for POST /v1/message is documented at developers.harvestr.io/api/create-a-message. Optional fields include labels, integrationId, and integrationUrl.
Step 7: Activate and test the Flow
Salesforce docs: Activate a Flow
Save and activate your Flow.
Update an Opportunity in Salesforce that meets the conditions.
Confirm the feedback appears in your Harvestr inbox. Because the callout runs on the asynchronous path, it can take a short moment.
If the callout fails, check Setup > Flow Interviews for the failed run and inspect the HTTP response body for the error returned by Harvestr.
Tie feedback to revenue
Once your Salesforce Opportunity feedback is flowing into Harvestr, you can unlock even more value by activating our Salesforce customer data sync. It automatically enriches feedback with revenue data like ARR or deal size, so you can prioritize based on business impact.
