Import data/emails

Hi all,

I’d like to find a way to import all of our past emails into RT. Right now we
are using Exchange and staff are making folders for every “ticket”. They are
quite meticulous about this. Getting the emails out per folder is not what I’m
concerned about. I’d like to ask about the importing part.

How can I bulk import emails?

I’d like to put all emails that are in an Outlook folder with a ticket in RT
and mark that ticket as closed. I need these emails and customer data for
searches/reference. I don’t want my users to have to have Outlook open just to
look up past customer data.

I guess that brings me to my next question. Is there a way to import email
address / names to customers?

BTW, I am prepared to do a fair amount of scripting and hacking to get this
done. I’m not expecting anything out of the box.

Thanks,

Simon

my $user = RT::User->new( RT->SystemUser );
my ($status, $msg) = $user->Create( Name => $email, EmailAddress => $email );
RT->Logger->error(“Couldn’t create user: $msg”) unless $status;On Wed, Oct 19, 2011 at 11:10 AM, Simon Walter simon@gikaku.com wrote:

Hi all,

I’d like to find a way to import all of our past emails into RT. Right now we
are using Exchange and staff are making folders for every “ticket”. They are
quite meticulous about this. Getting the emails out per folder is not what I’m
concerned about. I’d like to ask about the importing part.

How can I bulk import emails?

I’d like to put all emails that are in an Outlook folder with a ticket in RT
and mark that ticket as closed. I need these emails and customer data for
searches/reference. I don’t want my users to have to have Outlook open just to
look up past customer data.

I guess that brings me to my next question. Is there a way to import email
address / names to customers?

BTW, I am prepared to do a fair amount of scripting and hacking to get this
done. I’m not expecting anything out of the box.

Thanks,

Simon

RT Training Sessions (http://bestpractical.com/services/training.html)

  • Washington DC, USA October 31 & November 1, 2011
  • Barcelona, Spain November 28 & 29, 2011

Best regards, Ruslan.

Hi,

Always Cc rt-users@ lists.

my $user = RT::User->new( RT->SystemUser );
my ($status, $msg) = $user->Create( Name => $email, EmailAddress => $email
); RT->Logger->error(“Couldn’t create user: $msg”) unless $status;

Nice. I just want to confirm this will create a user with no permissions. Is
that correct?

Privileged and Disabled arguments control that. By default user is not
disabled, but is not privileged as well.

Would this make a user the same as one that get created when an email is
received?

Pretty much. $AutoCreate option controls defaults for email submissions.

my $user = RT::User->new(RT->Nobody);

Using RT->Nobody is not correct.

It would be useful to also put that user in a certain group.

Does this make sense?

my $group = RT::Group->new();
$group->LoadUserDefinedGroup(“Customers”);
$group->AddMember($user->id);

Good, except constructor’s argument.

I don’t see any info on what to pass to the RT::Group constructor other than:
RT::Group->new($CurrentUser);

But is that meant to load the current user’s group? What about:
RT::Group->new(RT->Nobody);
Or
RT::Group->new(RT->SystemUser);

RT->SystemUser is ok. Nobody and SystemUser are special RT users.
Nobody has no rights except OwnTicket so he can be owner of any
ticket. SystemUser on the other hand has SuperUser right and can do
anything. So my $group = RT::Group->new( RT->SystemUser ); is one way
to go.

However, when you already have objects around then it’s better to get
current users off them:

RT::Group->new( $other_object->CurrentUser )

Best regards, Ruslan.

However, when you already have objects around then it’s better to get
current users off them:

RT::Group->new( $other_object->CurrentUser )

Understood. Thank you!