{
  "slug": "slim-intercom-contact-json-sidebar",
  "title": "Intercom contact json slim for crm sidebar",
  "metaDescription": "Intercom contact json slim for crm sidebar. Contact id email and company for quick context.. Map only UI fields from Intercom before React parses JSON.",
  "headline": "Sidebar cards without full custom attributes",
  "category": "slimmer",
  "categoryLabel": "Payload Slimmer",
  "urgency": 7,
  "clientPlatform": "React",
  "upstreamServices": [
    "Intercom"
  ],
  "searchIntentQuery": "intercom contact json slim for crm sidebar",
  "directAnswerSummary": "Contact id email and company for quick context. For \"intercom contact json slim for crm sidebar\", store INTERCOM_ACCESS_TOKEN in Secret Vault, call https://api.intercom.io/contacts from a Worker, and let React hit only https://realcomposer.com/v1/workspace/slim-intercom-contact-json-sidebar with an rc_live_ client token.",
  "problem": {
    "title": "Unmapped Intercom fields waste bandwidth",
    "explanation": "Intercom returns nested CRM, audit, and configuration objects. React parses them on the main thread even when the UI binds three fields.",
    "risks": [
      "Large arrays kept in memory after navigation",
      "Analytics showing poor LCP on API-heavy screens",
      "Developers shipping defensive null checks for unused paths"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add vault secrets for this pipeline",
      "description": "Add INTERCOM_ACCESS_TOKEN to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Configure headersTemplate to inject vault secrets, target https://api.intercom.io/contacts, and Map only the UI fields in output mapping so clients never download audit or nested blobs."
    },
    {
      "stepNumber": 3,
      "title": "Call from React",
      "description": "Call https://realcomposer.com/v1/workspace/slim-intercom-contact-json-sidebar with a restricted rc_live_ client token. React never sends upstream secrets.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/slim-intercom-contact-json-sidebar', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});\nconst data = await res.json();"
    }
  ],
  "pipelineConfig": {
    "name": "Intercom contact json slim for crm sidebar",
    "method": "GET",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "intercom",
        "upstreamUrlTemplate": "https://api.intercom.io/contacts",
        "httpMethod": "GET",
        "headersTemplate": {
          "Authorization": "Bearer {{secrets.INTERCOM_ACCESS_TOKEN}}",
          "Accept": "application/json"
        },
        "timeoutMs": 3000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "contactId",
          "sourcePath": "data.0.id",
          "type": "string",
          "sourceStep": "intercom"
        },
        {
          "targetPath": "email",
          "sourcePath": "data.0.email",
          "type": "string",
          "sourceStep": "intercom"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_slim-int",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "slim-intercom-contact-json-sidebar"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "contactId": "sample",
    "email": "sample"
  },
  "curlSnippet": "curl -X GET \"https://realcomposer.com/v1/workspace/slim-intercom-contact-json-sidebar\" \\\n  -H \"Authorization: Bearer rc_live_client_token\"",
  "faqs": [
    {
      "question": "Does React need CORS changes after adding RealComposer?",
      "answer": "Yes for slim-intercom-contact-json-sidebar. Ship only an rc_live_ client token in React; RealComposer injects INTERCOM_ACCESS_TOKEN on https://api.intercom.io/contacts."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "slim-intercom-contact-json-sidebar forwards client JSON to POST upstreams unchanged; secrets interpolate only in URLs and header templates."
    },
    {
      "question": "What happens if an upstream step times out?",
      "answer": "Upstream steps in slim-intercom-contact-json-sidebar honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "filter-empty-hubspot-properties",
    "reduce-json-payload-size-frontend"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/slim-intercom-contact-json-sidebar",
    "markdown": "https://realcomposer.com/recipes/slim-intercom-contact-json-sidebar.md",
    "json": "https://realcomposer.com/recipes/slim-intercom-contact-json-sidebar.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=slim-intercom-contact-json-sidebar&via=agent"
  }
}