RealComposer
React NativeSalesforceEdge Caching & Rate Limits

Salesforce composite api cache mobile dashboard

Sales rep mobile home with fewer API calls

Direct Answer & Architecture Summary

Composite read responses cached per user id at edge. For "salesforce composite api cache mobile dashboard", store SALESFORCE_ACCESS_TOKEN in Secret Vault, call https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}} from a Worker, and let React Native hit only https://realcomposer.com/v1/workspace/cache-salesforce-composite-mobile-dashboard with an rc_live_ client token. Enable 120s GET cache only when query params identify the resource.

Security LevelAES-256-GCM Vault
Edge LatencySub-10ms Response
InfrastructureZero Server Maintenance
The Problem Solved

Uncached Salesforce spikes cost and latency

Every React Native visitor can trigger a fresh Salesforce call. Bursts exhaust per-minute quotas even when data changes slowly.

Critical Security & Operational Risks:
  • Thundering herds after cache expiry on the origin
  • Analytics skewed by client-side retry storms
  • Support tickets blaming "API downtime" during spikes
Architecture & Step-by-Step Implementation

How RealComposer Solves This at the Edge

1

Store upstream credentials in Secret Vault

Add SALESFORCE_ACCESS_TOKEN to RealComposer Secret Vault. Values decrypt only inside the Cloudflare Worker that calls the upstream.

2

Configure upstream steps and output mapping

Configure headersTemplate to inject vault secrets, target https://{{secrets.SALESFORCE_INSTANCE}}.my.salesforce.com/services/data/v68.0/sobjects/Contact/{{query.contactId}}, and Add output mapping fields that mirror the JSON contract your screen already expects.

3

Call from React Native

Allowed origins on the token should list every React Native host that calls this URL.

                    const res = await fetch('https://realcomposer.com/v1/workspace/cache-salesforce-composite-mobile-dashboard', {
  headers: { Authorization: 'Bearer rc_live_your_token' }
});
                  
Payload Slimming Comparison
79% Bandwidth Reduction
Raw Upstream Response262 B
              {
  "requestId": "req_cache-sa",
  "upstreamLatencyMs": 142,
  "audit": {
    "region": "edge",
    "trace": "cache-salesforce-composite-mobile-dashboard"
  },
  "payload": {
    "id": "sample_id",
    "status": "active",
    "nested": {
      "tags": [
        "demo"
      ],
      "internal": true
    },
    "unused_blob": {
      "foo": "bar",
      "bar": "baz"
    }
  }
}
            
RealComposer Slimmed Edge Payload55 B
              {
  "contactId": "sample",
  "email": "sample",
  "name": "sample"
}
            

Recipe Specs

HTTP method
GET
Upstream calls
1
Edge cache TTL
120s
Client auth
Restricted client token
Mapped output fields
3
Payload
262 B to 55 B (-79%)
Call from Terminal or Client
curl -X GET "https://realcomposer.com/v1/workspace/cache-salesforce-composite-mobile-dashboard" \
  -H "Authorization: Bearer rc_live_client_token"
Frequently Asked Questions

Developer Questions & Troubleshooting

Is it safe to log Salesforce responses in React Native?

Use scoped tokens where the vendor allows them on cache-salesforce-composite-mobile-dashboard. Admin keys stay {{secrets.*}} references only.

When does edge caching apply to this recipe?

cache-salesforce-composite-mobile-dashboard: only GET requests cache (120s on caches.default). Key is workspace slug plus sorted query params, not Authorization.

What happens if an upstream step times out?

Allowed origins on the cache-salesforce-composite-mobile-dashboard client token restrict which domains may call the edge URL.

Sources & Definitions Used in This Answer

Instant Deployment

Deploy this React Native + Salesforce Recipe

Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.

CLONE THIS RECIPE
Related Architecture Recipes