Notifying the user about the run results using a message box in the REVIT UI

I have created a script to add a few custom parameters to a specific project. The script is working well, but I am trying to create a dialogue box with some conditions like,

  1. if the parameter is added, the user should be able to see a message that the parameter is added,
  2. if the parameter already exists, user should be notified that the parameter already exists, and
  3. if the parameter cannot be added, the message should say that the run was unsuccessful.
    Is there any way to get an output similar to this?
    Any help is appreciated.

You will need to add some conditions to detect which scenario has occured and can then use that to generate the corresponding message in a dialogue box.

Check out the UIMessenger node in Crumple which can generate such a message.