Showing posts with label URL Parameters. Show all posts
Showing posts with label URL Parameters. Show all posts

Tuesday, November 24, 2026

**Passing & Using Custom URL Parameters (`c__`) in an OmniScript on Experience Cloud**

When you deploy an OmniScript to a Salesforce Experience Cloud site, you can pass custom values into the OmniScript using URL query parameters prefixed with c__.

https://your-site.my.site.com/s/your-page?c__accountId=001xx000003DGb2AAG&c__source=email

This works for both logged-in users and guest users—just make sure your guest user profile or permission set has the required object, field, and sharing access for any data your OmniScript reads or saves.

1. How c__ Maps to Variables in OmniScript

The c__ prefix is used in the URL query string, while inside the OmniScript you reference the variable name without c__—for example, c__accountId in the URL is referenced as accountId, and c__source is referenced as source. Check your Action Debugger / Data JSON while testing on the page to confirm the exact node name.

2. Using the Value in OmniScript Elements

Once passed in, reference the unprefixed variable name in step fields, formulas, conditional visibility, or messages:

  • Default Value / Text / Formula: Use the variable name without c__ (such as %accountId% or %source%, depending on your element and OmniStudio runtime).
  • Conditional Display: Show or hide a step, block, or element based on the unprefixed variable (for example, displaying a banner when source equals email).

3. Passing Values to Data Mappers & Integration Procedures

Downstream actions can use those same unprefixed variable names right away:

  • Data Mapper Extract / Load: Reference accountId (without c__) to filter a query—such as looking up an Account or Contact—or to populate a field on a record.
  • Integration Procedure: Pass or reference accountId and source without the c__ prefix to prefill data before or during your OmniScript steps.

Quick Checklist Before Going Live

  • URL-encode special values: Encode spaces (%20), &, =, or embedded URLs in query values so URL parsing stays intact.
  • Test as a Guest User: Verify visibility, sharing rules, and Data Mapper or Integration Procedure access in an unauthenticated guest session.
  • Handle missing parameters: Add fallbacks or conditions in case a user opens the Experience Cloud URL without the query parameters.