Skip Navigation
Click here for an update from Oracle on PHP remediation

Search

Thread Translation Fails When OCI Compartment ID Is Missing from the Request Payload
Answer ID 13183   |   Last Review Date 10/15/2026

How can Thread Translation be configured to include the required OCI compartment ID when the External Object and integration connection tests are successful, but language detection and translation fail when used within an actual thread?

Environment:

Oracle B2C Service External Objects and Integrations

Thread Translation

Issue:

External Objects and integration connections have been configured for Thread Translation, and the Thread Translation feature has been enabled and configured in AI Studio.

Testing the External Objects and integration connections using the Test Connection option returns the expected responses. Language detection and translation also work correctly when tested through the External Object test page because the required OCI compartment ID can be included in the test payload.

However, language detection or translation does not work as expected when invoked from an actual thread.

The request payload generated by the delivered Thread Translation functionality does not include the required OCI compartment ID.

Resolution:

Use a console extension to intercept the Thread Translation request and add the required OCI compartment ID to the request payload.

In the Customizations tab, configure the action name for the ConvertRequest Extensibility Action. The same action name must then be registered by the console extension.

For example, if the action name is ociRequest, the extension can transform both translation and language-detection requests as follows:

ORACLE_SERVICE_CLOUD.extension_loader
    .load("Global Extension", "1")
    .then(function(extensionProvider) {
        extensionProvider.getGlobalContext().then(function(globalContext) {

            globalContext.registerAction("ociRequest", function(param) {
                var transformedRequest;

                if (param.translationType === "TRANSLATION") {
                    transformedRequest = {
                        payload: {
                            documents: [
                                {
                                    key: "1",
                                    text: param.text,
                                    languageCode: "auto"
                                }
                            ],
                            targetLanguageCode: param.targetLanguageCode,
                            compartmentId: "<compartment id>"
                        }
                    };
                } else if (param.translationType === "DETECT_LANGUAGE") {
                    transformedRequest = {
                        payload: {
                            documents: [
                                {
                                    key: "1",
                                    text: param.text
                                }
                            ],
                            compartmentId: "<compartment id>"
                        }
                    };
                }

                return transformedRequest;
            });
        });
    });

Replace <compartment id> with the OCI compartment ID required by the language service configuration.

The extension adds the compartment ID to the generated payload for both:

  • TRANSLATION
  • DETECT_LANGUAGE

Also ensure that the appropriate profile has access to the console extension. Without profile access, the extension will not be executed for the affected users.

Notify Me
The page will refresh upon submission. Any pending input will be lost.