diff --git a/src/v0/destinations/redis/transform.js b/src/v0/destinations/redis/transform.js index 4c441e737c..231057ce4d 100644 --- a/src/v0/destinations/redis/transform.js +++ b/src/v0/destinations/redis/transform.js @@ -69,10 +69,13 @@ const process = (event) => { } // JSON.SET . return { - key: `${workspaceId}:${destinationId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`, - value: { - [message.context.sources.profiles_model]: message.traits, + message: { + key: `${workspaceId}:${destinationId}:${message.context.sources.profiles_entity}:${message.context.sources.profiles_id_type}:${message.userId}`, + value: { + [message.context.sources.profiles_model]: message.traits, + }, }, + userId: message.userId, }; } @@ -81,8 +84,11 @@ const process = (event) => { // If redis should store information as JSON type // JSON.SET . return { - key: `${keyPrefix}user:${lodash.toString(message.userId)}`, - value: message.traits || message.context.traits, + message: { + key: `${keyPrefix}user:${lodash.toString(message.userId)}`, + value: message.traits || message.context.traits, + }, + userId: message.userId, }; }