Skip to main content
Level 2
September 15, 2026
Question

OneTrust Pending Interact Calls

  • September 15, 2026
  • 2 replies
  • 43 views

Hello Guys,

 

We have oneTrust implemented with one of our client and By default we have “Pending” as Default Consent in WebSDK Extension within Launch.

 

Now, Within one of the Rule, we check whether C0002 is added to OneTrustActiveGroups object and then accordingly we either opt-in or OptOut. 

 

Below is the custom code written for the same:

(function () {
  if (typeof window.alloy !== "function") {
    console.warn("Adobe Web SDK (alloy) not available");
    return;
  }

  var groups = String(window.OnetrustActiveGroups)
    .split(",")
    .map(function (s) { return s.trim(); })
    .filter(Boolean);

  var allowed = groups.includes("C0002");

  window.alloy("setConsent", {
    consent: [{
      standard: "Adobe",
      version: "2.0",
      value: {
        collect: { val: allowed ? "y" : "n" }
      }
    }]
  }).then(function () {
    console.log("Adobe consent set to:", allowed ? "IN" : "OUT");
  });
})();

 

Now how do we handle pending interact calls with this scenario since when user is accepting the cookies, we are not seeing those pending interact calls.

 

 

    2 replies

    bjoern-koth
    Adobe Employee
    Adobe Employee
    September 23, 2026

    Hi ​@Nitin3432434 

    you won’t see pending interact calls. They are kept in an internal queue and are released as soon as the setConsent alloy call is made with “collect”: “y”.

    From experience, I would refrain from using the window.OnetrustActiveGroups object since it is quite unreliable. Chances are that it is not update in time when your rule runs. I would always recommend reading out the OptanonConsent cookie and parse it for “C0002:1”.

    _satellite.cookie.get("OptanonConsent").includes("C0002:1")

    Is your rule firing already? If not, make sure to subscribe to register “OnConsentChanged” callback functions that trigger your rules to release the consent.

    Hope that helps.

    Cheers from Switzerland!
    AmitVishwakarma
    Community Advisor
    Community Advisor
    September 28, 2026

    Hi ​@Nitin3432434 
    This is expected when the Web SDK extension's default consent is set to Pending. Consent-dependent commands, such as event calls, are queued in the SDK; they do not appear as Edge interact requests in the browser's Network tab while consent is unresolved. When consent is granted with collect.val: "y", the queued events can be sent. If consent is denied with collect.val: "n", the queued events are discarded.
    https://experienceleague.adobe.com/en/docs/experience-platform/tags/extensions/client/web-sdk/configure/consent

    In the code shown, if window.OnetrustActiveGroups is not yet available when the rule runs, String(undefined) becomes "undefined", allowed becomes false, and the code sends an explicit opt-out ("n"). That would discard the pending queue. Make sure the rule runs only after OneTrust has initialized or updated its active groups and the visitor's choice is known. If the consent state is still unresolved, do not call setConsent yet—leave the Web SDK in Pending.

    Also verify that C0002 is the correct OneTrust category for the consent you intend to map to Adobe data collection, and that the group list contains C0002 at the moment the rule runs.

    Pending events are held in memory, so they do not survive a page navigation or reload. If the visitor's choice is already stored, read the current OneTrust preference and synchronize it with setConsent on the new page load as well https://experienceleague.adobe.com/en/docs/experience-platform/collection/identity/consent
    If setConsent is successfully called with "y" and the queued events still do not appear on the same page, check the browser console for the value of OnetrustActiveGroups when the rule fires, confirm the consent command succeeds, and verify the rule is using the correct Web SDK instance.
     

    Amit Vishwakarma - Adobe Commerce Champion 2025 | 17x Adobe certified | 6x Adobe SME