Configure self-registration for external users

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 2 minutes to read
  • Configure self-registration for external users.

    Before you begin

    Note:
    You need to do this task after installing the Supplier Collaboration Portal.

    Role required: admin

    About this task

    Ensure that you have activated the com.snc.external_user_self_registration plugin. For more information, see Activate External User Self-Registration.

    Procedure

    1. Navigate to External User Self-Registration > User Registration Configurations and select New.
    2. On the User Registration Configuration form, fill in the fields.
      For more information about the form fields and descriptions, see Create a user registration configuration for external users.
    3. From the form context menu, select Save.
    4. Select the Registration tab, and do the following:
      1. In the Mandatory column for the First name and Last name fields, double-click and select true to make these fields required.
      2. Select the green check mark icon (Green check mark icon.) to save your changes.
    5. Configure the Verification tab to verify the identity of the registered users.
      When the user verification flow triggers, an activation link is sent to the user's registered email address.
    6. Select the Transformation tab, select and open the u_reg_xmap_[number] transformation map that maps the registered users from the User Acti Req [number] source table to the User [sys_user] target table.
    7. In the Target table field, search and select Vendor Contact [vm_vdr_contact].
    8. From the form header, right-click the header bar and select Save.
    9. Scroll down and select the Field Maps tab, and then select New.
    10. Select the Use source script check box.
      The Source script box is displayed.
    11. In the return string, enter supplier_registration in lowercase letters exactly as shown below.
      answer = (function transformEntry(source) {
      
      	// Add your code here
      	return "supplier_registration"; // return the value to be put into the target field
      
      })(source);
    12. From the Target field choice list, select Source.
    13. Select Submit.
    14. Select the Onboarding tab and in the User onboarding flow field, search for and select Supplier Contact Onboarding.
    15. Select the Advanced tab.
    16. In the Registration form field configuration field, leave the Account signup option selected as-is, and then select the preview this record icon to open the record.
    17. In the Variables related list, select and open the First name, Last name, and Email records individually.
    18. In the First name variable record, select the Mandatory check box and select Save.
      Repeat this step for both the Last name and Email variable records.
    19. Select Save.
    20. For sending personalised emails to contacts who want to self-register, select the Catalog Client Scripts tab.
    21. Select New.
    22. In the Name field, enter a name.
    23. From the Type choice list, select onLoad.
    24. In the Script box, copy and paste the following code.
      function onLoad() {
          function getParameterValue(name) {
              var url = top.location.href;
              var value = new URLSearchParams(url).get(name);
              if (value) {
                  return value;
              }
              return false;
          }
      
          if (this && this.location && this.location.pathname) {
              if (getParameterValue("email")) {
                  g_form.setValue("email", getParameterValue("email"));
                  g_form.setReadOnly("email",true);
              }
          }
      }
    25. Select Save.

    What to do next

    Do the following: