Add a New User to an Existing Organization

The code snippet given below allows registering a user to an existing orginization without creating a new organization.

  • FirstName, EmailId and OrgIDare mandatory attributes.

  • When inviting a new user, you can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.

Ensure the following packages are imported:

Package Imports
import com.zc.component.users.PlatformType; import com.zc.component.users.ZCSignUpData; import com.zc.component.users.ZCUser; import com.zc.component.ZCMailTemplateDetails;
//Get an instance of ZCSignUpData ZCSignUpData signUpdetails = ZCSignUpData.getInstance(); //Pass the necessary data for the sign-up using the instance ZCMailTemplateDetails mailData= signUpdetails.mailTemplateInstance(); mailData.setSendersMail(""); mailData.setSubject("Welcome to %APP_NAME%"); mailData.setMessage("

Hello ,

Follow this link to join in %APP_NAME% .


If you didn’t ask to join the application, you can ignore this email.


Your %APP_NAME% team

"); signUpdetails.setTemplateDetails(mailData); signUpdetails.setPlatformType(PlatformType.WEB); signUpdetails.userDetail.setEmailId(""); signUpdetails.userDetail.setLastName("Amelia"); signUpdetails.userDetail.setOrgId("35712181"); //Pass user's OrgID here //Register the user using signUpdetails signUpdetails = ZCUser.getInstance().addUser(signUpdetails);

Last Updated 2023-10-16 12:55:33 +0530 +0530