{"site":{"name":"Koji","description":"AI-native customer research platform that helps teams conduct, analyze, and synthesize customer interviews at scale.","url":"https://www.koji.so","contentTypes":["blog","documentation"],"lastUpdated":"2026-10-06T19:04:03.112Z"},"content":[{"type":"documentation","id":"9ffa24da-5db9-43a0-9b31-bf0a37164926","slug":"salesforce-research-integration","title":"Sync Koji AI Interviews to Salesforce: Customer Insights on Every Account, Contact, and Opportunity","url":"https://www.koji.so/docs/salesforce-research-integration","summary":"Pipe Koji AI-moderated interview output into Salesforce in three steps: (1) create custom Contact fields (Latest_Customer_Quote__c, Interview_Themes__c, Interview_Sentiment__c, Interview_Quality_Score__c, Transcript_URL__c), (2) deploy a sync worker that PATCHes those fields via the Salesforce REST API using a Connected App with the OAuth 2.0 Client Credentials Flow, (3) have that worker poll GET /api/v1/interviews/{id} on a schedule, because Koji has no outbound webhooks and no events to subscribe to, and write when status is completed and analysis is present. A per-minute poll lands the record in Salesforce within about a minute of the interview finishing. The integration unlocks Salesforce-native workflows: churn risk flows triggered on negative sentiment, discovery-completeness gates on Opportunities, theme-based VOC reports, and pre-renewal CSM briefs — patterns that traditional survey + CRM integrations cannot deliver because they lack AI moderation, theme extraction, and quality scoring. A no-code Zapier path is also covered. Anonymous-mode interviews are handled correctly (no email present, no write). The headless API and the MCP connector are available on every plan, including a free account; outbound webhooks are not available yet.","content":"# Sync Koji AI Interviews to Salesforce\n\n**Answer first:** Koji has no outbound webhooks yet, so this is a scheduled pull rather than a push, and it still takes three steps: (1) create three or four custom fields on the Contact and Account objects (Latest_Customer_Quote__c, Interview_Themes__c, Interview_Quality_Score__c, Transcript_URL__c), (2) deploy a small sync worker that PATCHes those fields via the Salesforce REST API, and (3) have that worker poll Koji's read endpoint and act when an interview comes back `completed` with its `analysis` present. A per-minute poll puts the record in Salesforce within about a minute of the interview finishing. With tools like Koji, your reps no longer need to dig through transcripts — the customer's own words live on the account record.\n\nIf you're tired of customer voice being trapped in survey dashboards, this is the integration that closes the loop between your AI-native research stack and the system of record your revenue team already runs on.\n\n## Why connect Koji to Salesforce\n\nSalesforce is the system of record for B2B revenue. But Salesforce alone can only tell you *what* a customer did (deals, support tickets, product usage events) — it cannot tell you *why* they did it. Traditional CX programs try to fill that gap with NPS surveys piped into custom fields, but a numeric score with one open-text field is a very thin signal compared with a 12-minute conversational interview moderated by an AI that knows when to probe.\n\nKoji is purpose-built to generate that deeper signal at scale. The AI interviewer asks the questions you scope, follows up automatically when answers are vague, scores each conversation for quality (only 3+ conversations count toward usage), extracts themes and sentiment, and writes back a clean structured artifact. Pipe that into Salesforce and three things change:\n\n- **Account executives** open an opportunity and immediately see the prospect's own words about their current pain, who else is in the buying committee, and what alternatives they're evaluating — no waiting for a researcher to summarize.\n- **Customer success managers** get an automatic alert in the account feed when a renewal-cycle interview comes back with negative sentiment or a churn-risk theme, weeks before the renewal date.\n- **Revenue operations** can build reports and dashboards that segment customers by themes extracted from interviews (e.g., \"all accounts where 'integration friction' surfaced in the last 90 days\") — something no survey tool can do because surveys do not extract themes natively.\n\n## What the integration writes back\n\nWhen a polled interview comes back completed with its analysis attached, the worker writes the following onto the matching Salesforce Contact (and rolls up to the parent Account):\n\n- **Latest customer quote** — The single most representative pull-quote, picked by the AI consultant.\n- **Interview themes** — Comma-separated list of top themes extracted from the conversation.\n- **Sentiment** — `positive`, `neutral`, or `negative`, with optional sub-scores per theme.\n- **Quality score** — 1–5, the same score Koji uses for credit gating. Below 3 = filtered.\n- **Transcript URL** — A signed link to the full transcript inside Koji, for reps who want context.\n- **Completion timestamp** — Used to power \"last spoken to\" filters in pipeline reports.\n\nOptionally you can map structured-question answers to dedicated fields. Koji supports six structured question types — `open_ended`, `scale`, `single_choice`, `multiple_choice`, `ranking`, and `yes_no` (see the [structured questions guide](/docs/structured-questions-guide)) — and each carries a stable question ID, so a single integration build will continue to work as you tweak interview wording.\n\n## Step 1 — Create the Salesforce custom fields\n\nIn Salesforce Setup, navigate to **Object Manager → Contact → Fields & Relationships** and create the following:\n\n| API Name | Type | Length | Notes |\n|---|---|---|---|\n| `Latest_Customer_Quote__c` | Long Text Area | 4000 | Visible on layouts |\n| `Interview_Themes__c` | Text | 255 | Comma-separated themes |\n| `Interview_Sentiment__c` | Picklist | — | positive / neutral / negative |\n| `Interview_Quality_Score__c` | Number | 1, 0 | 1–5 scale |\n| `Transcript_URL__c` | URL | 255 | Signed Koji link |\n| `Last_Koji_Interview_At__c` | Date/Time | — | Sort & filter |\n\nRepeat on the **Account** object if you want roll-up visibility, or create a Salesforce flow that propagates the Contact-level fields to the parent Account whenever the Contact is updated.\n\nAdd the new fields to your default Contact and Account page layouts so reps can see them without expanding \"Show more.\"\n\n## Step 2: Deploy the sync worker\n\nThe simplest production-grade pattern is a scheduled serverless function (Vercel Function, AWS Lambda, Cloudflare Worker) that:\n\n1. **Fetches each pending interview** with `GET /api/v1/interviews/{id}` and a server-side key holding the `interview:read` permission, and skips anything that is not yet `completed` with `analysis` present.\n2. **Looks up the Salesforce Contact** by email (from the interview's respondent email) using a SOQL query: `SELECT Id FROM Contact WHERE Email = :email LIMIT 1`.\n3. **PATCHes the Contact** via `/services/data/vXX.0/sobjects/Contact/{id}` with the fields above.\n4. **Handles anonymous interviews** — if `respondent_email` is null (interview was run in anonymous mode), do not write back. Optionally log the event to a dead-letter queue for manual review.\n\nFor authentication to Salesforce, the recommended path is a **Connected App with the OAuth 2.0 Client Credentials Flow** (server-to-server). Avoid the username/password flow — it's deprecated and triggers security alerts in modern orgs.\n\nA single worker typically runs at <100ms p95 for the Salesforce write, well within Salesforce's API limits as long as you don't fire thousands of interviews concurrently. Mind the Koji side too: each API key allows 60 requests per minute by default, so spread large batches across cycles. For high-volume programs, queue the writes and send them in micro-batches.\n\n## Step 3: Track pending interviews and poll them\n\nThere is no webhook settings page to point at your endpoint, so the worker keeps its own list:\n\n- When you create an interview or send its link, store the `interview_id` and your own `external_id` in a pending table.\n- On each scheduled run, call `GET /api/v1/interviews/{id}` for every pending id with an `Authorization: Bearer` header.\n- Write to Salesforce when `status` is `completed` and `analysis` is present, so themes, sentiment and the quality score arrive together with the transcript. If you want a faster, \"transcript only\" write, act on `completed` alone and update the record again once the analysis lands.\n- Remove the id from the pending table once written, and expire stale ids so the poller does not grow unbounded.\n\nIf the interview runs in the embed widget, the respondent's browser also fires `koji:interview_completed`, which you can forward to the worker as a fast path. Treat it as a hint, not the source of truth: it only fires while the tab is open. The [webhook setup](/docs/webhook-setup) doc covers both patterns, and the [research automation](/docs/research-automation-webhooks) page covers idempotency, retries, and replay.\n\n## No-code path — Zapier or Make\n\nIf you cannot run a serverless function, the same integration is buildable in Zapier or Make in under 30 minutes:\n\n1. Trigger: a **schedule** every few minutes, then an HTTP step calling `GET https://www.koji.so/api/v1/interviews/{id}` for each pending id and a filter that passes only interviews where `status` is `completed` and `analysis` is present. There is no Koji trigger app to subscribe to.\n2. Action: **Salesforce → Find Contact** by Email.\n3. Action: **Salesforce → Update Contact** with the mapped fields.\n4. Optional action: **Slack** post to a `#customer-voice` channel with the quote.\n\nThis path is what most early-stage teams pick when they don't yet have an engineering team to own the forwarder. See the [Zapier research automation](/docs/zapier-research-automation) doc for the full step-by-step.\n\n## Workflows that become possible\n\nOnce interview data flows into Salesforce, the Salesforce platform itself unlocks a set of automations that would be impossible with surveys:\n\n- **Churn risk flow** — When `Interview_Sentiment__c = 'negative'` AND the parent Account's ARR is above a threshold, create a high-priority Case routed to the CSM and post to a Slack channel.\n- **Discovery completeness scoring** — In Sales Cloud, populate a custom Opportunity field that says \"discovery interview complete\" only when an Account has at least N interviews with quality score ≥4 in the last 60 days. This becomes a forecast-stage gate.\n- **Voice-of-customer reports** — Build a Salesforce report that groups Accounts by themes pulled from interviews (`CONTAINS(Interview_Themes__c, 'onboarding')`) and intersects with deal stage. You now have a quantitative view of qualitative signal.\n- **Renewal pre-work** — Trigger an interview link 60 days before each renewal, write the result back, and brief the CSM with a pre-renewal call summary generated from the transcript.\n\n## Comparison: Koji + Salesforce vs survey-tool + Salesforce\n\nMost teams already have a Qualtrics, SurveyMonkey, or Typeform integration with Salesforce. Why replace it with Koji? Three concrete differences:\n\n- **Open-text quality**. Surveys collect a sentence. Koji's AI moderator probes — it sees a thin answer and asks the follow-up the human researcher would have asked. The \"Latest Customer Quote\" field ends up populated with substance, not \"it's fine.\"\n- **Built-in theme extraction**. With surveys, theming requires a separate tagging pass (or a manual researcher). Koji writes the themes directly. Salesforce filtering on themes becomes a native CRM operation, not a separate analytics workflow.\n- **Quality gating**. Surveys cannot tell whether the respondent took the survey seriously. Koji scores each interview 1–5 and only writes back the ones that pass the bar — keeping your CRM clean.\n\nIf you're still on a traditional survey + CRM pattern, the [convert survey to AI interview](/docs/convert-survey-to-ai-interview) guide walks through the migration without breaking your existing flows.\n\n## Plan requirements\n\nThe headless API and the MCP connector are available on every plan, including a free account. Outbound webhooks are not available yet, so the sync runs as a scheduled pull. Interviews start as low as €1 per qualified interview, and €3 per qualified voice interview. The no-code Zapier path above is the lightest way to build the same sync without running your own forwarder. See the [plan comparison guide](/docs/plan-comparison-guide) for the full feature matrix and the [API authentication](/docs/api-authentication) doc to set up your first key.\n\n## Anonymous mode and compliance\n\nKoji supports a fully anonymous mode in which no respondent email is collected. For those interviews, the read endpoint returns `respondent_email = null` and your worker should skip the Salesforce write rather than try to match. For compliance-heavy industries, see the [GDPR-compliant AI user research](/docs/gdpr-compliant-ai-user-research) doc and the [anonymizing customer interview data](/docs/anonymizing-customer-interview-data) walkthrough.\n\n## Related Resources\n\n- [Structured Questions Guide](/docs/structured-questions-guide) — the six question types Koji supports and how each renders in reports.\n- [HubSpot Research Integration](/docs/hubspot-research-integration) — the same pattern, mapped to HubSpot CRM.\n- [Webhook Setup](/docs/webhook-setup): why there are no outbound webhooks yet, and the three patterns that replace them.\n- [Research Automation](/docs/research-automation-webhooks): idempotency, replay, and dead-letter patterns for the polling loop.\n- [Zapier Research Automation](/docs/zapier-research-automation) — no-code automations across your stack.\n- [CRM Research Integration Guide](/docs/crm-research-integration-guide) — broader patterns for any CRM.\n- [User Research API Guide](/docs/user-research-api-guide) — programmatic access to studies, interviews, and reports.","category":"API Reference","lastModified":"2026-09-20T18:39:48.247991+00:00","metaTitle":"Salesforce + Koji: Sync AI Customer Interview Insights to Every Account","metaDescription":"Connect Koji AI interviews to Salesforce with a scheduled worker on the Koji read API and the Salesforce REST API. Push transcripts, themes, sentiment, and quality scores onto Contact and Account records.","keywords":["salesforce integration","salesforce research integration","salesforce customer interview","salesforce voice of customer","crm research integration","salesforce webhook","salesforce ai research","customer insights salesforce"],"aiSummary":"Pipe Koji AI-moderated interview output into Salesforce in three steps: (1) create custom Contact fields (Latest_Customer_Quote__c, Interview_Themes__c, Interview_Sentiment__c, Interview_Quality_Score__c, Transcript_URL__c), (2) deploy a sync worker that PATCHes those fields via the Salesforce REST API using a Connected App with the OAuth 2.0 Client Credentials Flow, (3) have that worker poll GET /api/v1/interviews/{id} on a schedule, because Koji has no outbound webhooks and no events to subscribe to, and write when status is completed and analysis is present. A per-minute poll lands the record in Salesforce within about a minute of the interview finishing. The integration unlocks Salesforce-native workflows: churn risk flows triggered on negative sentiment, discovery-completeness gates on Opportunities, theme-based VOC reports, and pre-renewal CSM briefs — patterns that traditional survey + CRM integrations cannot deliver because they lack AI moderation, theme extraction, and quality scoring. A no-code Zapier path is also covered. Anonymous-mode interviews are handled correctly (no email present, no write). The headless API and the MCP connector are available on every plan, including a free account; outbound webhooks are not available yet.","aiPrerequisites":["Koji account (webhooks and the headless API are included on every plan)","Salesforce org with Setup access to create custom fields and a Connected App","Ability to run a small webhook forwarder (Vercel/Lambda/Cloudflare) or a Zapier seat","Familiarity with HMAC signature verification (or the Zapier route)"],"aiLearningOutcomes":["Map Koji interview fields onto Salesforce Contact and Account objects","Poll the Koji read endpoint for finished interviews before writing to Salesforce","Detect an analysis-ready interview by polling for status completed with analysis present","Build churn-risk, discovery-completeness, and renewal-pre-brief workflows on top of the synced data","Handle anonymous-mode interviews safely"],"aiDifficulty":"intermediate","aiEstimatedTime":"18 minutes"}],"pagination":{"total":1,"returned":1,"offset":0}}