Skip to content
Documentation

Enrich Unomi profiles with custom data not originating from the capture script

Warning

This is only meant to enrich your Unomi profile data when you are unable to do so through the capture script API.
If you are able to enrich the data using the capture script API, use that method instead.
For example: an integration with Google Analytics where Google Analytics gets the dropsolidCapture cookie and depending on that needs to set a custom property in the Unomi profiles.

It is possible to enrich Unomi profiles with extra custom data, by directly sending this data to the Unomi API.
This is possible because of a custom Unomi plugin, which gets executed on a customData event.
This custom plugin is present by default on every Unomi hosted by Dropsolid.

For example: I want to add some custom properties to a user's Unomi profile.

POST https://{unomi_url}/context.json?sessionId={sessionId}

body:
  {
      "source": {
          "itemType": "event",
          "scope": "{cdp_uuid}",
          "itemId": "event"
      },
      "events": [
          {
              "eventType": "customData",
              "scope": "{cdp_uuid}",
              "source": {
                  "itemType": "event",
                  "scope": "{cdp_uuid}",
                  "itemId": "event"
              },
              "properties": {
                  "customDictProperty": {
                      "customStr": "thisIsAString",
                      "customList": ["5", "7", "three"]
                  },
                  "customStrProperty": "test"
              }
          }
      ],
      "requiredProfileProperties": ["*"],
      "requireSegments": true
  }

{sessionId} and {cdp_uuid} can be found in the dropsolidCapture cookie.

{unomi_url} can be found in the Connection tab in Personalisation integration. It is the Host value but you have to add https:// in front of it.

This API call will send a customData event to your Unomi.
This will trigger the plugin which will add the properties of the customData event to the Unomi profile of the sessionId in the query parameter.
In this example the properties are:

{
    "customDictProperty": {
        "customStr": "thisIsAString",
        "customList": ["5", "7", "three"]
    },
    "customStrProperty": "test"
}

These properties will be added under the keycustom_properties.
If the keycustom_propertiesalready exists in the user's Unomi profile, then the new custom properties wil be added to the existing custom properties. The existing custom properties will not be overwritten.

These custom properties can also be used to create a segment:

unomi-custom-properties-segment.png

Update scoring with a custom data event

It is also possible to update scoring in a custom data event.
You can use this if you want to update the scoring of a user at a point in time where no capture events are being triggered for them.

Warning

Currently it is important that you also send the da__created property if you want to update the scoring with a customData event.
Without this, the scoring won't properly update.
This value is used for the da__last_updated value of the scores.

For example, you want to decrease a score of a user:

POST https://{unomi_url}/context.json?sessionId={sessionId}

body:
  {
      "source": {
          "itemType": "event",
          "scope": "{cdp_uuid}",
          "itemId": "event"
      },
      "events": [
          {
            "eventType": "customData",
            "scope": "{cdp_uuid}",
            "source": {
                "itemType": "event",
                "scope": "{cdp_uuid}",
                "itemId": "event"
            },
            "properties": {
                "scoring": {
                    "group_1": {
                        "group_1_value": {
                            "te__operator": "-",
                            "te__value": "1"
                        }
                    }
                },
                "da__created": "2025-11-05T15:41:59.835Z"
            }
          }
      ],
      "requiredProfileProperties": ["*"],
      "requireSegments": true
  }

You could use this to decrease certain scores of inactive users, or users whose score hasn't changed in a while, for example.
This way the user doesn't need to visit the site again for their scoring to be updated.

You will need either a valid sessionId of the user, or their profile id.
If you have their profile id, you can send that as a header: Cookie: context-profile-id={profile_id}, this way the new event will automatically be a part of that profile. You can just create a new sessionId yourself (UUID4) if you have the profile id of the user, for the sessionId query parameter.

{sessionId} and {cdp_uuid} can be found in the dropsolidCapture cookie.

{unomi_url} can be found in the Connection tab in Personalisation integration. It is the Host value but you have to add https:// in front of it.