Creating user through REST doesn't trigger welcome email

Creating user through REST doesn't trigger welcome email

This question has suggested answer(s)

I'm using REST to create new users to our community, but the welcome email does not get generated when I do so through REST, only when we add users directly through the Membership administration.  The only difference between the two is that when I do so through REST, I'm also populating various profile fields.  Otherwise, the user gets created just fine either way, it's just that the welcome email does not get generated.  Any ideas what would short-circuit that when created via REST?

All Replies
  • Hi Dan,

    Creating a user via REST API and it not generating a welcome email is expected behavior.

    REST API for user creation is primarily used for integration with other systems, where the expectation is that the other system should handle the email notification. If you're using the REST API to integrate with your main website, you don't want your users to get two separate welcome emails - one from your main site, and one from the community.

    Please let me know if you have anymore questions.

    Regards,

    Zac Elsik

  • Hi Zac,

    Thanks for the answer, that does explain the behavior I'm seeing through our testing.  However, I do have some concerns that I wish you would pass along to whomever @ Telligent for consideration, both specifically with this issue and more generally with what I see as the "big picture" with how I think this came to be:

    1. I've often run across technical issues such as this which indicate to me that Telligent was not designed with closed communities in mind.  Another recent example was a bug that we saw in the pre-7.0 version which prevented the change password page from working (it keeps redirecting the process to the login page, preventing the password from being changed).  

    2. I do not see anywhere in your documentation for this endpoint (telligent.com/.../21799.create-a-user-6-1.aspx) that the welcome emails do not get generated.  I've verified that CSModules DO get fired, which isn't consistent with the behavior you described above.  

    We're researching on our end now, but I'm almost certain that at some point, these welcome emails were being generated regardless of the method used to create the user.  Our users are almost exclusively created through REST, and always have been, since we have thousands of users.  I know this isn't a concern necessarily if you're an open community where users create their own accounts, but when you have a closed, customer-facing site such as ours, that's just not possible.

  • To add to this..

     

    In Regards to #1:  Correct, the intention for Telligent Community is for public communities. There has been discussion around this topic but at the moment the primary experience is public.

     

    In terms of CSModules, welcome emails or emails based on changing of status are not handled in CSModules.  They are part of the internal code that happen during user creation. 

     

    Also please verify your version, I believe in a recent hotfix this behavior has been changed so REST users will get welcome emails

     

     


    From: Dan August [bounce-daugust@communities.telligent.com]
    Sent: Monday, December 31, 2012 2:47 PM
    To: discussion_evolution@communities.telligent.com
    Subject: RE: [Telligent Evolution Platform Discussion] Creating user through REST doesn't trigger welcome email

    Hi Zac,

    Thanks for the answer, that does explain the behavior I'm seeing through our testing.  However, I do have some concerns that I wish you would pass along to whomever @ Telligent for consideration, both specifically with this issue and more generally with what I see as the "big picture" with how I think this came to be:

    1. I've often run across technical issues such as this which indicate to me that Telligent was not designed with closed communities in mind.  Another recent example was a bug that we saw in the pre-7.0 version which prevented the change password page from working (it keeps redirecting the process to the login page, preventing the password from being changed).  

    2. I do not see anywhere in your documentation for this endpoint (telligent.com/.../21799.create-a-user-6-1.aspx) that the welcome emails do not get generated.  I've verified that CSModules DO get fired, which isn't consistent with the behavior you described above.  

    We're researching on our end now, but I'm almost certain that at some point, these welcome emails were being generated regardless of the method used to create the user.  Our users are almost exclusively created through REST, and always have been, since we have thousands of users.  I know this isn't a concern necessarily if you're an open community where users create their own accounts, but when you have a closed, customer-facing site such as ours, that's just not possible.

  • Hi Patrick,

    Our production site is running version 6.1.1.24376.  We had so much pain with the 7.0 upgrade on our test box that we haven't yet been brave enough to flip the switch on that.  Do you know if this was something possibly fixed as a hotfix inclusion with 7.1 or something separate?  I'll browse your site to see if I can find any reference to this issue.  Thanks.

  • Hi Dan, you might be interested in the 6.1 hotfix list. This includes notes for the October 2012 build 6.1.6.29113, which notes that "when Account Activation is set to email (Control Panel Dashboard > System Administration > Membership Administration > Configuration > Account Settings > Registration Settings), users created through REST will receive welcome emails (unless SendEmail=false is set)." Hope this is of help.

    Regards,

    Jenny

  • Thanks, Jenny.  I'll look into the hotfix.  Could you clarify something for me, then?  I'm a bit confused because Zac indicated that this behavior is by design (users created through REST do NOT generate the "welcome" emails) but the 6.1 hotfix list includes a fix for this, implying it was a bug. I ask only because if a hotfix was created to fix it, that might indicate that this previously was not the default behavior. As I mentioned in one of my earlier posts in this thread, I'm almost positive that the "welcome" emails were generated when users were created via REST.

  • Hi Dan,
     
    Zac and Patrick are the experts in matters of expected behavior. Just wanted to furnish a link to information about the hotfix Patrick mentioned.
     
    Regards,
    Jenny
     
    Click to show quoted text
  • Hi Dan,

    From what I understand, the reason it didn't send a welcome email before is that we thought this would be used to migrate information mostly so a user shouldn't be sent an email. Many of our customers weren't using it that way and wanted the REST API call to send emails. So we changed it to send emails by default but also provided a way to go back to the old behavior (setting SendEmail=false).

    Regards,

    Zac Elsik

  • I'm still confused on the timing, then.  When you say that you changed it to send emails by default, does that mean before that change, those emails would never have been sent if the user was created via REST?  Or were they originally sent, then changed to not send, then changed back?  The reason I'm asking is that when we originally used REST to create our user accounts, I am fairly certain that emails were generated.  That was when we were back on version 5.5 or 5.6.  I'm trying to figure out how long we've been adding users to our system via REST where the emails have NOT been sent.

    As a side note, just for my two cents, I do understand the logic you're trying to lay out here.  To that end, what would be nice is if the REST endpoint for adding a new user included a parameter of some sort you could pass that would indicate whether or not to generate a welcome email to that user, which would alleviate the problem of having to predict what the developer had in mind when he/she wrote the code that uses the REST api to create the user.  That would give us the most flexibility.

  • Do you have an example of the API call you were making?   In 5.5 or 5.6 it is very possible you were using v1 of REST which could have potentially behaved differently.  We have since removed that version from the product(in 7) so I can't say for sure but its a possibility.

    As for the logic, REST previously was a medium mostly used to move data between a community and 3rd party systems, users being a big part of this.    With people using REST for tighter integration aside from migrations, it became apparent an option to send emails when users are created was a needed option.  As for an option to send or not send, that is what is being explained. A request parameter for SendEmail has been added to supress or not supress emails when users are created.

  • Patrick, can you send me a link where that SendEmail request parameter is documented?  I don't see that in the v2 REST documentation.  Thanks.

  • Doesn’t look like its been documented yet.  Its just another request parameter.  Just add SendEmail = true/false  to the post body
     
    Patrick Mason
    Development Lead- Extensibility
    o: 214.420.1329
    telligent.com
     
    From: Dan August [mailto:bounce-daugust@communities.telligent.com]
    Sent: Monday, January 07, 2013 10:53 AM
    To: discussion_evolution@communities.telligent.com
    Subject: RE: [Telligent Evolution Platform Discussion] Creating user through REST doesn't trigger welcome email
     

    Patrick, can you send me a link where that SendEmail request parameter is documented?  I don't see that in the v2 REST documentation.  Thanks.

  • I've tried this afternoon to get the SendEmail=true to work, but that doesn't seem to force the welcome email to be sent.  I'm passing it as one of the values in my post data string, but it doesn't seem to work.

  • Hi Dan,

    The SendEmail option should be true by default; so no need to pass it as a parameter unless you want the welcome email disabled by setting SendEmail=false.

    Are you testing on a version of 6.1.6.29113 or greater? The SendEmail functionality was added in 6.1.6.

  • We're currently on 6.1.1.24376. We've currently got an open case regarding a bug with the 7.1 upgrade, so we can't upgrade until that is resolved.  Is there an interim hotfix I can get which will bring us up to the 6.1.6 level so we can force the welcome emails to be generated when a user is created through REST?