Friday, May 22, 2026

Clear cache and reactivate Omniscript on the browser

 

When updating an Integration Procedure or OmniScript (layout or values), make sure to clear cache and reactivate before testing. Otherwise, changes may not reflect correctly. Cache issues can cause outdated values to appear on the test screens.


When working with Integration Procedures (IP) and OmniScripts, it’s common to make updates to layouts, data mappings, or values and expect immediate results during testing. However, one often overlooked factor can lead to confusion—caching.

๐Ÿšจ The Issue

After making changes, you may still see old values or layouts during testing. This can make it seem like your updates didn’t apply, even though everything is configured correctly.

✅ The Fix

Always follow these steps after making updates:

  1. Clear cache
  2. Reactivate the Integration Procedure or OmniScript

๐Ÿ’ก Why This Happens

OmniStudio components leverage caching for performance optimization. If not cleared, cached data can continue to serve outdated responses, especially in multi-step flows where previous screens rely on stored values.

๐Ÿงช Real-World Insight

I encountered this while testing updates—everything looked correct in configuration, but the UI still showed old data. Clearing the cache and reactivating immediately resolved the issue.

Thursday, May 14, 2026

Ignore Cache; When to use it in OmniStudio; Different cache options & their locations

 



Development / Testing

  • ✅ Enable Ignore Cache
  • ✅ Disable Card Cache for your user/profile. Where to check Disable Card Cache- 


Production
  • ❌ Leave Ignore Cache off
  • ✅ Cache only non‑sensitive, stable data
  • ✅ Use Session Cache for user‑specific data





API End Points to Get & POST; HTTP Integration

 POST : 

https://gorest.co.in/rest-console

External sites need to be added below - 



https://api.chucknorris.io/


GET:



Use Expression For Value; SetError Action Omniscript

 


OmniStudio – JSON Response Path for Data Mapper

 




Wednesday, May 13, 2026

Check What Input Is Sent to a Data Mapper from an OmniScript

While testing an OmniScript, I ran into a situation where I needed to confirm what input data was actually being sent to a Data Mapper. The UI shows the mapping, but that doesn’t always guarantee the exact value being passed at runtime.

Here’s a simple and reliable way to verify it using Action Debugger.


Scenario

  • An OmniScript calls a Data Mapper (Extract Action)
  • An input parameter (for example, Agent_Email) is passed from the OmniScript JSON
  • That parameter is then used in an Extract Object filter (for example, filtering Contacts by Email)

I wanted to make sure:

  • The parameter exists
  • The value is populated correctly
  • The Data Mapper receives the expected value

Step 1: Configure the Data Mapper Input

In the Data Mapper Extract Action inside the OmniScript:

  • Set the Data Mapper Name
  • Under Input Parameters, map the input like this:
Contact Information:Agent_Email 


This means:

  • Agent_Email is expected to come from the OmniScript JSON
  • The Data Mapper will receive it under DRParams

Step 2: Verify the OmniScript Input JSON

Open Manage Input/Output TypeEdit Input JSON.

Make sure the value is present:

{
  "Agent_Email": "user@example.com"
}

✅ This is important
If the value is missing or null here, the Data Mapper will not receive it—even if the mapping looks correct.







Step 3: Use Action Debugger (Most Important Step)

Now run the OmniScript in Preview mode and open Debug → Action Debugger.

  1. Find the Data Mapper Extract Action
  2. Expand Request Data
  3. Look for the DRParams section


You should see something like:

"DRParams": {
  "Agent_Email": "user@example.com"
}
``

✅ This confirms:

  • The OmniScript passed the value correctly
  • The Data Mapper received the expected input
  • Any issues after this point are inside the Data Mapper logic itself

Step 4: Confirm the Data Mapper Response

In the same Action Debugger entry, check the Response section.

If the input is correct, the response should contain the expected records (for example, matching Contact emails).


Key Takeaways

  • Action Debugger is the source of truth for what is actually sent to a Data Mapper
  • Always check Request Data → DRParams
  • Do not rely only on UI mappings—runtime data can differ
  • If the value is missing in DRParams, first check:
    • OmniScript Input JSON
    • Data Mapper input parameter mapping

Why This Helped Me

This approach saved time by:

  • Quickly isolating whether the issue was in the OmniScript or the Data Mapper
  • Avoiding unnecessary changes to filters and queries
  • Making debugging more predictable and repeatable

Thursday, May 7, 2026

Fix to sfdx after CLI installation;

 D:\Users\vijaysadhu>c:


C:\>sfdx

node:internal/modules/cjs/loader:1386

  throw err;

  ^


Error: Cannot find module 'C:\undefined'

    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)

    at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)

    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)

    at Function._load (node:internal/modules/cjs/loader:1192:37)

    at TracingChannel.traceSync (node:diagnostics_channel:328:14)

    at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)

    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)

    at node:internal/main/run_main_module:36:49 {

  code: 'MODULE_NOT_FOUND',

  requireStack: []

}


Node.js v22.22.2


Fix: Updating sf should make sfdx work. 





Friday, May 1, 2026

Apex Sample Code & Test; Salesforce






Result:





public class SumCalculator implements System.Callable {

    public Object call(String action, Map<String, Object> args) {
        // Extract input & output maps
        Map<String, Object> input  = (Map<String, Object>) args.get('input');
        Map<String, Object> output = (Map<String, Object>) args.get('output');

        try {
            // Read numbers from input JSON
            Decimal a = (Decimal) input.get('a');
            Decimal b = (Decimal) input.get('b');

            // Validate inputs
            if (a == null || b == null) {
                output.put('success', false);
                output.put('message', 'Both a and b are required');
                output.put('sum', null);
                return output;
            }

            // Calculate sum
            Decimal sum = a + b;

            // Return response
            output.put('success', true);
            output.put('sum', sum);
            output.put('message', 'Sum calculated successfully');

        } catch (Exception e) {
            output.put('success', false);
            output.put('message', e.getMessage());
            output.put('sum', null);
        }

        return output;
    }

} 



Debug code:


Map<String, Object> input = new Map<String, Object>{

    'a' => 5,
    'b' => 15
};

Map<String, Object> args = new Map<String, Object>{
    'input' => input,
    'output' => new Map<String, Object>()
};

SumCalculator calc = new SumCalculator();
Map<String, Object> result =
    (Map<String, Object>) calc.call('add', args);

System.debug(result);