{
  "slug": "merge-salesforce-opportunities-stripe-mrr",
  "title": "Merge salesforce opportunities with stripe mrr data",
  "metaTitle": "Merge salesforce opportunities with - RealComposer",
  "metaDescription": "Merge salesforce opportunities with stripe mrr data. Merge Salesforce and Stripe in one Frontend / Web call with parallel Worker steps.",
  "headline": "RevOps live MRR plus pipeline stage",
  "category": "aggregation",
  "categoryLabel": "Multi-API Aggregation",
  "urgency": 9,
  "clientPlatform": "Frontend / Web",
  "upstreamServices": [
    "Salesforce",
    "Stripe"
  ],
  "searchIntentQuery": "merge salesforce opportunities with stripe mrr data",
  "directAnswerSummary": "Salesforce Opportunity and Stripe subscription MRR merged for dashboards. For \"merge salesforce opportunities with stripe mrr data\", store SALESFORCE_ACCESS_TOKEN, STRIPE_SECRET_KEY in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Opportunity/{{query.opportunityId}} from a Worker, and let Frontend / Web hit only https://realcomposer.com/v1/workspace/merge-salesforce-opportunities-stripe-mrr with an rc_live_ client token.",
  "problem": {
    "title": "Waterfall latency from multiple Salesforce and Stripe requests",
    "explanation": "Frontend / Web widgets often await Salesforce and Stripe 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": "Create SALESFORCE_ACCESS_TOKEN, STRIPE_SECRET_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "stepNumber": 2,
      "title": "Set headers, mapping, and cache TTL",
      "description": "Point step salesforce at https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Opportunity/{{query.opportunityId}} with GET. Add output mapping fields that mirror the JSON contract your screen already expects. Leave cache TTL at 0 when each response is user-specific (include userId or record id in query params before enabling cache)."
    },
    {
      "stepNumber": 3,
      "title": "Call from Frontend / Web",
      "description": "Authorize with Bearer rc_live_ and fetch the mapped JSON contract your UI already expects.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/merge-salesforce-opportunities-stripe-mrr', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Merge salesforce opportunities with stripe mrr data",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "salesforce",
        "upstreamUrlTemplate": "https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Opportunity/{{query.opportunityId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.SALESFORCE_ACCESS_TOKEN}}"
        },
        "timeoutMs": 3000
      },
      {
        "stepKey": "stripe",
        "upstreamUrlTemplate": "https://api.stripe.com/v1/customers/{{query.customerId}}",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.STRIPE_SECRET_KEY}}"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "salesforce.contactId",
          "sourcePath": "Id",
          "type": "string",
          "sourceStep": "salesforce"
        },
        {
          "targetPath": "salesforce.email",
          "sourcePath": "Email",
          "type": "string",
          "sourceStep": "salesforce"
        },
        {
          "targetPath": "stripe.customerId",
          "sourcePath": "id",
          "type": "string",
          "sourceStep": "stripe"
        },
        {
          "targetPath": "stripe.email",
          "sourcePath": "email",
          "type": "string",
          "sourceStep": "stripe"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_merge-sa",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "merge-salesforce-opportunities-stripe-mrr"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "salesforce_contactId": "sample",
    "salesforce_email": "sample",
    "stripe_customerId": "sample",
    "stripe_email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/merge-salesforce-opportunities-stripe-mrr\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Which Salesforce credential belongs in the vault for this pipeline?",
      "answer": "Store SALESFORCE_ACCESS_TOKEN, STRIPE_SECRET_KEY for merge-salesforce-opportunities-stripe-mrr. Frontend / Web never sees decrypted values."
    },
    {
      "question": "Does POST traffic get cached?",
      "answer": "merge-salesforce-opportunities-stripe-mrr vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Rotate vault secrets for merge-salesforce-opportunities-stripe-mrr anytime; clients keep the same rc_live_ token."
    }
  ],
  "relatedRecipeSlugs": [
    "stitch-hubspot-contact-with-stripe-history",
    "combine-stripe-customer-and-invoices"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/merge-salesforce-opportunities-stripe-mrr",
    "markdown": "https://realcomposer.com/recipes/merge-salesforce-opportunities-stripe-mrr.md",
    "json": "https://realcomposer.com/recipes/merge-salesforce-opportunities-stripe-mrr.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=merge-salesforce-opportunities-stripe-mrr&via=agent"
  }
}