Unify and manage your data

Non-Java LCAs in Cloud Functions

Learn about how to implement Life Cycle Actions (LCAs) in non-Java run-times, including request handling, response formats, token usage, and security requirements.

Reltio supports Life Cycle Actions (LCAs) in additional run-times beyond Java. This support enables you to implement LCAs in languages such as Python and Node.js while preserving the same request and response model used for Lambda-based LCA execution.

In Java-based implementations, the Reltio SDK manages payload parsing, token handling, and communication with the Reltio platform. In non-Java run-times, your implementation is responsible for decoding the incoming payload, extracting the required request values, executing the custom logic, and formatting the response in the expected structure.

How non-Java LCAs work

A non-Java LCA receives the same event data that is used by Java-based LCAs. The function must parse the incoming request, read the hook and object data, use the provided internal token when it needs to call the Reltio platform, and return a correctly formatted response for the active hook.

The implementation model differs from Java because there is no non-Java Reltio SDK described in the source material. As a result, the handler must explicitly handle request parsing, BinaryJSON processing, token safety, and response construction.

Request payload structure

The function receives an HTTP request payload that includes the LCA action request, tenant context, environment URL, hook name, and an internal token.

FieldDescription
requestsArray of LCA requests. Each request contains the action name and the business object data.
requests[].actionsArray that identifies the LCA action to invoke.
requests[].data.objectBusiness object data that the LCA reads, validates, or modifies.
environmentBase Reltio environment URL for the tenant.
tenantTenant identifier for the request context.
tokenTemporary internal token used to make authorized calls back to the Reltio platform.
hookLifecycle hook associated with the invocation, such as beforeSave, afterSave, or validate.

Payload encoding requirements

For non-Java Lambda LCAs, the payload must be handled in BinaryJSON format by using Smile encoding. The implementation must decode the inbound payload before processing the request data and must encode the outbound response before returning it to the Reltio platform.

This behavior is handled by the Java SDK in Java-based LCAs. In non-Java run-times, the implementation is responsible for both decoding and encoding.

Using the internal token and environment values

If the implementation must call the Reltio platform during execution, it must use the environment value as the base URL and the token value as the bearer token for authorization. These values must be extracted from the incoming request payload.

ComponentSourceUsage
Reltio platform URLenvironmentBase URL for calls back to the Reltio platform.
Authorization tokentokenUsed in the Authorization: Bearer <token> header.

The internal token is sensitive. Do not log it, persist it, or expose it in downstream systems.

Response formats by hook type

The function must return a response that matches the active lifecycle hook. Response content differs depending on whether the LCA modifies the object, validates the object, or reports an error.
Success responses
Success responses indicate that the LCA completed processing for the active hook. The exact response structure depends on the hook type and on whether the LCA modifies the business object.
Hook scenarioExpected response behavior
before* hook with object changesReturn successful=true and include the updated object in the response.
before* hook with no object changesReturn successful=true.
after* hookReturn successful=true.
validate hookReturn the object and any validation errors in the expected validation response structure.
Validation error responses

For validation outcomes, the response can include a validationErrors array. Each validation error can describe severity, error type, affected object type, affected object URI, and the validation message.

FieldDescription
severityValidation severity, such as ERROR or WARNING.
errorTypeValidation classification, such as MISSED or INCORRECT.
objectParentUriParent configuration URI for the affected object.
objectTypeUriType URI for the affected attribute or object.
objectUriURI of the affected business object or attribute.
messageUser-readable description of the validation issue.
Failure responses

Failure responses must return successful=false and include an error object that identifies the error severity, code, message, and detailed message.

FieldDescription
severityError severity.
errorCodeImplementation-defined error code.
errorMessageHigh-level error message.
errorDetailMessageDetailed diagnostic message for the failure.

Security and logging requirements

Non-Java LCAs must validate the incoming payload structure and treat the tenant, environment, and internal token as security-sensitive values. The implementation must not cache tenant, environment, or token values globally across invocations.

Structured logs should include only operational values such as timestamp, correlation ID, tenant, environment, hook name, and outcome. Do not include the internal token, shared secrets, or unnecessary personally identifiable information in logs.

Requirement areaGuidance
Schema validationValidate required request fields before processing the request.
Tenant and environment bindingAllow only expected tenant and environment values.
Token handlingNever log, store, or expose the internal token.
LoggingUse structured logs and exclude secrets and unnecessary PII.
Dependency and code scanningPin dependencies and run security and code-quality scanning in CI.
TestingCover valid requests, malformed requests, invalid tenant or environment values, and token redaction behavior.

Relationship to Java-based LCAs

Java-based LCAs continue to use the existing Java framework and SDK-based model. Non-Java runtime support extends the same AWS Lambda LCA pattern to additional run-times, but it requires explicit implementation of parsing, payload conversion, token handling, and response generation that the Java SDK abstracts.

For Java-specific implementation guidance, deployment steps, tenant configuration, and IAM setup, see topic LCA Implementation Using AWS Lambda.

Sample payloads and responses

This section provides sample request and response payloads for common non-Java LCA scenarios.

Sample request payload

{
  "requests": [
    {
      "actions": [
        "{{NameOfTheLCA}}"
      ],
      "data": {
        "object": {
          "uri": "entities/0GWIAL1",
          "type": "configuration/entityTypes/Individual",
          "createdBy": "thirupathi.reddy@reltio.com",
          "createdTime": 1745230309368,
          "updatedBy": "thirupathi.reddy@reltio.com",
          "updatedTime": 1745235169341,
          "attributes": {
            "FirstName": [
              {
                "type": "configuration/entityTypes/Individual/attributes/FirstName",
                "ov": true,
                "value": "Vish #u",
                "uri": "entities/0GWIAL1/attributes/FirstName/21vtR6zP"
              }
            ]
          },
          "isFavorite": false,
          "crosswalks": [
            {},
            {}
          ],
          "label": "",
          "secondaryLabel": ""
        }
      }
    }
  ],
  "environment": "https://tst-01.reltio.com/reltio",
  "tenant": "{{tenantId}}",
  "token": "{{internalToken}}",
  "hook": "beforeSave"
}

Sample success response for before* hooks with object changes

[
  {
    "successful": true,
    "object": {
      "uri": "entities/0GWIAL1",
      "type": "configuration/entityTypes/Individual",
      "createdBy": "thirupathi.reddy@reltio.com",
      "createdTime": 1745230309368,
      "updatedBy": "thirupathi.reddy@reltio.com",
      "updatedTime": 1745235169341,
      "attributes": {
        "FirstName": [
          {
            "type": "configuration/entityTypes/Individual/attributes/FirstName",
            "ov": true,
            "value": "Vishwak",
            "uri": "entities/0GWIAL1/attributes/FirstName/21vtR6zP"
          }
        ]
      },
      "isFavorite": false,
      "crosswalks": [
        {},
        {}
      ],
      "label": "",
      "secondaryLabel": ""
    }
  }
]

Sample success response for before* hooks without object changes

[
  {
    "successful": true
  }
]

Sample success response for after* hooks

[
  {
    "successful": true
  }
]

Sample success response for validate hooks

[
  {
    "successful": false,
    "validationErrors": [
      {
        "severity": "ERROR",
        "objectParentUri": "configuration/entityTypes/Individual",
        "errorType": "INCORRECT",
        "objectTypeUri": "configuration/entityTypes/Individual/attributes/FirstName",
        "objectUri": "entities/0GWIAL1/attributes/FirstName/21vtR6zP",
        "message": "FirstName should not have spacial chars."
      }
    ],
    "object": {
      "uri": "entities/0GWIAL1",
      "type": "configuration/entityTypes/Individual",
      "createdBy": "thirupathi.reddy@reltio.com",
      "createdTime": 1745230309368,
      "updatedBy": "thirupathi.reddy@reltio.com",
      "updatedTime": 1745235169341,
      "attributes": {
        "FirstName": [
          {
            "type": "configuration/entityTypes/Individual/attributes/FirstName",
            "ov": true,
            "value": "Vishwak",
            "uri": "entities/0GWIAL1/attributes/FirstName/21vtR6zP"
          }
        ]
      },
      "isFavorite": false,
      "crosswalks": [
        {},
        {}
      ],
      "label": "",
      "secondaryLabel": ""
    }
  }
]

Sample failure response

[
  {
    "successful": false,
    "error": {
      "severity": "Error",
      "errorCode": "{error code}",
      "errorMessage": "{error message}",
      "errorDetailMessage": "{detailed error message}"
    }
  }
]