Friday, September 5, 2008

The woes of registering users with a text file

Had another one of those moments today that I wished Notes could do something the way I want it to be done, rather then the way it does it. Here's the scenario.

Recently, our company has entered into an agreement to purchase another company. If you know where I work and you follow the business news, you know what I'm talking about. As part of our normal migration of users from a new company, we set up the users in Domino as if they were already on our mail system, but, we add in their current companies internet email address in the "Forwarding address" field in the Person Document so that any mail that is addressed to them at our domain get sent to there's. Not a big deal. It's nice to have that in place so that when I migrate them from Exchange to Domino, the mail file and everything else is in place and all we need to do is remove the forward and migrate their stuff. But, it became a big deal when I was told the amount of users that are involved in this migration. Well over 1000. So I started looking into using the "Import text file" option available in the user registration screen. Really nice feature if you have uber amounts of people to add into Domino and you get a text file export from HR of usernames. But, it's not so nice if you have to do what I was describing above. There is a limitation to what the import can do. As I had found out through searching the web and talking with support, even though you enter in a forwarding address in the text document, when you register them in Domino it will not populate that field in their Person Document. The only way that field will get populated is if you select "Other Internet" or "Other" for Mail system. Only then will you see on the address tab the users other internet email address, but then you do not have any Lotus Notes information for the user available. So, this means that I will have to do one of two things.
1. Register everyone normally, then go in and cut and paste in the other internet email address to the Forwarding address field.
2. Register the user twice. Once with the Mail system set to Lotus Notes, and then a second time with Other Internet selected. Then when I register them for a second time, tell the registration process to update the person record for each user. Once that's done, go into each person document and switch the mail system back to Lotus Notes so that it shows all of the information.
Sounds like a lot of work, doesn't it? I'm sure that there is some code that could be written to help with this process, but then that involves adding more people to the mix and making the process harder than I think it should be. It would be nice if that in the Domino Admistrator when you import that text file, it will register the user as a Lotus Notes user with the Forwarding address information added.

I've placed this issue up on IdeaJam as well in hopes to get as much feedback as possible

If anyone has some suggestions, please share them!

7 comments:

Jeff Byrd said...

Create an agent that reads the text file and uses LotusScript to create the new users. I wrote something similar here. Using ODBC, I have to query our HR system every night for new employees and use the information from HR to create their Notes Accounts. We are creating many accounts everynight, and whe the person starts work, their account is waiting for them.

-- Jeff

Lissette said...

Continue with the import as you described, then create a formula agent to set the forwarding address on all the documents after the persons are registered.

Run the agent on a local replica of the directory and only replicate it back to the server when you validate the data.

Here's a quick sample formula you can put in a 'on selected docs' agent. It will set the forwarding address to the internet address (domain a) to a different domain (domain b).


temp:=@LowerCase(@Left(internetaddress;"@")) + "@domainb.com";
FIELD mailaddress:=temp;
SELECT @All

You can create another agent to clear the field as well.

FIELD mailaddress:="";
SELECT @All


Tip: Set the option for the mail files to be created in the background.

Good luck!

Eric M said...

I ran into this while setting up a new environment and was similarly annoyed.

If you have a consistent naming convention, you could write a one line agent to build the forwarding address. In our case, the short name was imported (the client wanted to keep their eight character UNIX name). We selected the users and ran the following agent:

FIELD MailAddress:=ShortName+"@old_domain.com"

Again, assuming a standard naming convention, you could build the field in numerous other ways:

FIELD MailAddress:=FirstName+"_"+LastName"+"@old_domain.com"

Of course, if you're importing into an existing address book the new users would be intermixed with the existing users. However, if the existing users have a "Company" name, you could sort that column and have the new users grouped together.

If your existing users _don't_ have a company name you could use a similar agent to temporarily set one before you do the import. I believe the field is "CompanyName."

After applying your MailAddress agent, you could run your updated CompanyName agent to all records in the NAB and set everyone back to a Null value.

In the end, it seems like a bad design. The Forwarding field is exposed for a Notes user, so the import process should respect it, regardless of the "mail system type."

Chris Whisonant said...

It's a lot easier than that guys... :) I cross-posted this to the IJ page too:

Andy, when you import the users you can enter the value you want for the forwarding address in the "comments" column of the csv (or scsv). Then just use an agent after you've registered the accounts and take the contents of the comments field and move them to the forwarding address field. :)

Really, we're talking one line of code in a formula agent here - two if you want to clear the comments field!

Andy Donaldson said...

@all - Thank you all for your ideas and input!!

@Chris - Did you ever know that your my hero? ;-)

Ray Bilyk said...

Starting puns... NOW!
I was wondering if this would 'keep you up at night'...
I thought that maybe you would have to use 'java' code on this...
I bet that Mrs. Olson is happy you got it working...
Puns engine shutdown... complete!

Irv Schor said...

I've run into the same challenge, and found that the agent is an easy way to go in populating the field. I go further and create a view in the Domino Directory to tag users being migrated. The comments section I use includes their preferred language - one of the biggest issues with the import text method is that it only uses one mail template, so if you migrate 400 people, and 40 are to use Italian, and 30 to use German, etc. you DO NOT want to register them all at once. Instead I break up the import files into 1 per language - I used comments field for the language ID to help me separate them. Then its a matter of setting up the New User profile with the desired language template, then register via that specific import file.