You can't add links at runtime (at least not easily), and it's probably better in the long run to make the links visible to the designer at edit time instead of having to remember that a link might change at runtime.
You can set up cross-conversation links that check the conversation (NPC), like in this example:
If you don't know the NPCs ahead of time, you could write some code to start a new conversation based on the NPC's name or some other identifying information. Or you could create a new database at runtime that links to the NPC's conversation. (See How To: Create Dialogue Database At Runtime.)