{
  "slug": "combine-salesforce-with-plaid-accounts",
  "title": "Combine salesforce with plaid financial data",
  "metaDescription": "Combine salesforce with plaid financial data. Merge Salesforce and Plaid in one Mobile App (iOS & Android) call with parallel Worker steps.",
  "headline": "Wealth app CRM plus linked accounts",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 9,
  "clientPlatform": "Mobile App (iOS & Android)",
  "upstreamServices": [
    "Salesforce",
    "Plaid"
  ],
  "searchIntentQuery": "combine salesforce with plaid financial data",
  "directAnswerSummary": "Salesforce household and Plaid balances in one regulated edge response. For \"combine salesforce with plaid financial data\", store SALESFORCE_ACCESS_TOKEN, PLAID_SECRET in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let Mobile App (iOS & Android) hit only https://realcomposer.com/v1/workspace/combine-salesforce-with-plaid-accounts with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.",
  "problem": {
    "title": "Waterfall latency from multiple Salesforce and Plaid requests",
    "explanation": "Mobile App (iOS & Android) widgets often await Salesforce and Plaid sequentially, multiplying TLS handshakes on cellular networks and amplifying failure rates.",
    "risks": [
      "Race conditions between parallel manual fetches",
      "Higher mobile data usage from redundant JSON",
      "Timeouts when any upstream exceeds cellular RTT"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Bind vault keys to the Worker",
      "description": "Add SALESFORCE_ACCESS_TOKEN, PLAID_SECRET to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Point step salesforce at https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} with POST. Add output mapping fields that mirror the JSON contract your screen already expects. POST pipelines set cache TTL to 0 because RealComposer only stores GET responses at the edge."
    },
    {
      "stepNumber": 3,
      "title": "Call from Mobile App (iOS & Android)",
      "description": "Call https://realcomposer.com/v1/workspace/combine-salesforce-with-plaid-accounts with a restricted rc_live_ client token. Mobile App (iOS & Android) never sends upstream secrets.",
      "codeSnippet": "let url = URL(string: \"https://realcomposer.com/v1/workspace/combine-salesforce-with-plaid-accounts\")!\nvar request = URLRequest(url: url)\nrequest.addValue(\"Bearer rc_live_token\", forHTTPHeaderField: \"Authorization\")"
    }
  ],
  "pipelineConfig": {
    "name": "Combine salesforce with plaid financial data",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "salesforce",
        "upstreamUrlTemplate": "https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.SALESFORCE_ACCESS_TOKEN}}"
        },
        "timeoutMs": 3000
      },
      {
        "stepKey": "plaid",
        "upstreamUrlTemplate": "https://production.plaid.com/accounts/get",
        "httpMethod": "POST",
        "headersTemplate": {
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "salesforce.contactId",
          "sourcePath": "Id",
          "type": "string",
          "sourceStep": "salesforce"
        },
        {
          "targetPath": "salesforce.email",
          "sourcePath": "Email",
          "type": "string",
          "sourceStep": "salesforce"
        },
        {
          "targetPath": "plaid.accountId",
          "sourcePath": "accounts.0.account_id",
          "type": "string",
          "sourceStep": "plaid"
        },
        {
          "targetPath": "plaid.name",
          "sourcePath": "accounts.0.name",
          "type": "string",
          "sourceStep": "plaid"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_combine-",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "combine-salesforce-with-plaid-accounts"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "salesforce_contactId": "sample",
    "salesforce_email": "sample",
    "plaid_accountId": "sample",
    "plaid_name": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/combine-salesforce-with-plaid-accounts\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Is it safe to log Salesforce responses in Mobile App (iOS & Android)?",
      "answer": "Point Mobile App (iOS & Android) at /recipes/combine-salesforce-with-plaid-accounts edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins."
    },
    {
      "question": "Will Anthropic or Linear prompt bodies be rewritten?",
      "answer": "combine-salesforce-with-plaid-accounts keeps cache TTL at 0 because it uses POST upstream calls or per-user responses. Add ids to query strings before enabling GET cache."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Rotate vault secrets for combine-salesforce-with-plaid-accounts anytime; clients keep the same rc_live_ token."
    }
  ],
  "relatedRecipeSlugs": [
    "merge-plaid-accounts-and-transactions",
    "call-salesforce-api-from-react-securely"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/combine-salesforce-with-plaid-accounts",
    "markdown": "https://realcomposer.com/recipes/combine-salesforce-with-plaid-accounts.md",
    "json": "https://realcomposer.com/recipes/combine-salesforce-with-plaid-accounts.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=combine-salesforce-with-plaid-accounts&via=agent"
  }
}