I got this working a while ago by doing what you did and then assigning the dialog to the default dialog node in the merchant's sidebar and then calling CharacterSetHasDialog. Who knows which of those steps are even necessary, you might be able to just use the default dialog node and call it a day.

Obviously this isn't how the campaign itself does it, since I don't think any of the merchants in the game have assigned default dialog.