wiki/knowledge/salesforce/papertube-salesforce-api-integration.md Layer 2 article 719 words Updated: 2026-04-05
↓ MD ↓ PDF
salesforce account-engagement pardot api oauth papertube abm automation

PaperTube Salesforce API Integration

Overview

To support programmatic creation of ABM campaigns for PaperTube's ~256 target accounts, a Salesforce Connected App was configured to allow API access to Account Engagement (Pardot). The goal is to automate campaign creation via the Salesforce API rather than manually building hundreds of campaigns in the UI.

The integration was partially completed during a working session between Mark and Karly. The remaining blocker is SSO enablement for Mark's user account in Account Engagement.


Background: Why API-Based Campaign Creation

PaperTube's ABM playbook requires a unique campaign per target company — each with personalized email sequences generated from AI-produced account research reports. Manually creating 256+ campaigns in Account Engagement is not feasible. The Salesforce API allows programmatic campaign creation that can be driven by the research output.

Key architectural note: When Connected Campaigns is enabled (the Salesforce-recommended configuration), campaigns must be created via the Salesforce API (not the Account Engagement API directly). They then sync automatically into Account Engagement.

See also: [1] | [2]


Connected App Setup

A Connected App named "Asymmetric API Integration" was created in PaperTube's Salesforce org.

Steps Completed

  1. Enable Connected App creation
    - Salesforce Setup → search "External Client Apps" → Settings → enable "Allow Creation of Connected Apps"

  2. Create the Connected App
    - Setup → App Manager → New Connected App
    - Name: Asymmetric API Integration
    - Contact Email: Mark's email (mark.hope@asymmetric.pro)
    - Enable OAuth Flows: ✅
    - Callback URL: https://auto.asymmetric.pro

  3. OAuth Scopes configured
    - managed_pardot_services — required for Account Engagement access
    - refresh_token (offline_access) — allows persistent API sessions without re-authentication

  4. Credentials retrieved (via App Manager → View → Manage Consumer Details)
    - Consumer Key
    - Consumer Secret
    - Staged Consumer Key / Staged Consumer Secret (generated and promoted via Apply)

  5. Business Unit ID retrieved
    - Marketing Setup → Pardot Account Setup → copy Business Unit ID

Credentials Storage

All credentials (Consumer Key, Consumer Secret, Business Unit ID) were recorded during the session. Per best practice: always write API credentials to a secure file immediately — Consumer Secret is only shown once and cannot be retrieved later.


Authentication Flow

The integration uses OAuth 2.0 Username-Password flow (or JWT Bearer for server-to-server). The security token for Mark's Salesforce user was generated during the session to support authentication.

Required credentials for API calls:
| Field | Source |
|---|---|
| Consumer Key | Connected App → Manage Consumer Details |
| Consumer Secret | Connected App → Manage Consumer Details |
| Business Unit ID | Marketing Setup → Pardot Account Setup |
| Username | Mark's Salesforce login |
| Password + Security Token | Mark's user settings |


Current Blocker: SSO Enablement

Mark's Salesforce user account requires SSO to be enabled for Account Engagement before the OAuth connection can be completed. Without this, the API authentication flow fails at the Account Engagement authorization step.

Resolution required:
- Karly to request the Salesforce admin (or Jess, Salesforce support contact) enable SSO for Mark's user account in Account Engagement.


Next Steps



Reference: API Behavior with Connected Campaigns

When Connected Campaigns is enabled (default recommended): create campaigns via the Salesforce API → they sync to Account Engagement automatically. Account Engagement API only supports read and query on campaigns in this mode.

When Connected Campaigns is disabled: campaigns can be created directly via the Account Engagement API.

For PaperTube's org, the Salesforce API path is the correct approach.