Select @@identity in Merge Replication
@@identity is not a good solution and will return incorrect results since .  SCOPE_IDENTITY() is session based and will return the last inserted record for the session.  There isn't a way to correct this without a code change.