Skip to content

AnnA Corporate User

Anna Corporate User is a resource that makes possible for you to create corporate users and generate an authentication hash for the specified user

This class will provide you methods to create, update or inactivate a corporate user in AnnA.

Example:

var corporateUserClient = new AnnaCorporateUserClient("YOUR_ANNA_ENVIRONMENT_BASE_URL", new AnnaCorporateUserClientConfig
{
CompanyHash = "YOURCOMPANYHASH",
EncryptionKey = "YOUR_CORPORATEUSER_ENCRYPTION_KEY",
DecryptionKey = "YOUR_CORPORATEUSER_DECRYPTION_KEY",
});

This method generates a hash for AnnA Embedded Chat authentication.

string response = corporateUserClient.GenerateUserHash("YOUR_CORPORATE_USER_ID");

if you want the AnnA Chat to execute a service when it opens, you can provide the start service parameter.

string response = corporateUserClient.GenerateUserHash("YOUR_CORPORATE_USER_ID", "@START_SERVICE");

This method update/insert a corporate user in AnnA and generates a hash for AnnA Embedded Chat authentication.

string response = corporateUserClient.UpsertCorporateUser(new CorporateUser { UserId = "USER_ID", Username = "USERNAME" });

This method inactivates a corporate user in AnnA

string response = corporateUserClient.InactivateUser("USER_ID");