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.
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.
Comment