Announcement

Collapse
No announcement yet.

Create new portal user on contact creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Create new portal user on contact creation

    If I want to create a portal user automatically when a contact is created through the API, do I need the 'Advanced Pack' to create a workflow?

    I have tried to create a formula in the contact entity, but there only seems to be the before save custom script function.

    I did find this post, but cant seem to get it to work...

    Create Portal Users Via Workflow - EspoCRM Open Source Community Forum

    I would assume that on save could work if it:
    1. uses the submitted API data (name, email address etc) to create a portal user
    2. responds with the portal user ID and links it to the contact.

    Something like:

    $password = password\generate();
    $hash = password\hash($password);
    $emailAddress = email Address from contact form

    $userId = record\create('User',
    'userName', $emailAddress, 'password', $hash 'emailAddress', $emailAddress );

    How do I return the created portal information to the contact, and how do I get the email address from the contact form?

    If I need the advanced pack for workflows, so be it.

    thanks in advance.

  • #2
    Hi mkas,

    Really, you don't need a workflow for creating a portal user automatically. There are several ways to do it:

    Comment


    • #3
      Does anyone have ideas how to create portal users without admin rights? I just need to enable my "sales manager" to create a customer's contact with ability to connect to portal.
      yuri might be it will be enabled in upcoming version as one of roles?

      Comment


      • #4
        Originally posted by partomas View Post
        Does anyone have ideas how to create portal users without admin rights? I just need to enable my "sales manager" to create a customer's contact with ability to connect to portal.
        yuri might be it will be enabled in upcoming version as one of roles?
        Hello partomas,

        I think you can use a Workflow for it.

        Comment


        • #5
          Originally posted by lazovic View Post
          I think you can use a Workflow for it.
          Yes, I can but not all CRM users have "Advanced Pack", so the standard functionality of "role" of portal users administrator would be great. For those who want automation "Workflow" could be a solution, but not for everyone who use Espo CRM.

          Comment

          Working...
          X