Forum Discussion

safikhan's avatar
3 years ago

Whats the exact difference between user_id and target_user_id?

Hi everyone,

There might be a very straight forward answer to this but what is the exact difference between user_id and target_user_id?

I understand the context when the events are message related like user A replying to user B will generate message.publish event where user_id will be A and target_user_id will be B or similarly for kudos.give event.

But I also encountered other events where this definition fails such as badges.award event or solutions.first_solution. where user_id is either null or its of the user the action is taken upon.

e.g. user B accepts user A answer as the solution. This triggers solutions.first_solution The data has both user_id and target_user_id as user A whereas user B triggered this event.

Is there a clear definition for all the action types what each of these columns would represent?

  • Hi SyedSa,

    I am simply trying to understand the logic that is used to propagate these two columns in the Bulk Data API because not all of the action types are following the logic defined in the Bulk data API documentation.

    In terms of metric, lets say I want to investigate a community user journey and determine how quickly does a user earn certain badges. If I run my command based on user_id, I would not be getting badges.award events in my output.

    I hope this clarifies the question for you. 

    • SyedSa's avatar
      SyedSa
      Moderator

      safikhan, I have passed on your query to the support team by creating a ticket. They will look into this and will get back to you.