(SOLVED) Customer_ID during registration?

Moderator: crythias

Locked
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

(SOLVED) Customer_ID during registration?

Post by morecw »

Hello everyone,

I would really like to know how other OTRS people out there have choosen to handle their user registration page. The field in question is the Customer_ID. Our goal is that users self register and that will save us a lot of work, however our priority is data integrity.

So ideally we would like to allow the customer to register and input their own ID which would be the same number we use for their orders in references in SugarCRM. But of course we don't want them to input the same customer_ID as someone else who's tickets they are not authorised to read.

I'm trying to picture the current process:

1. Customer registers, gives their name/email address etc then receives their password to login
2. Customer logs in, then creates a ticket
3. We see the ticket come in, but there's no Customer_ID attached.
- at this stage do agents then enquire what the customer's ID is then update their Customer account?
- have any OTRS admins out there ever customised the registration page in order to input more data such as the Customer_ID?

I am consider whether the most secure way to handle all this and keep the work load low, would be either
a) Add a "Company name" field to the registration form and then we the account is created and a ticket is logged then we can at least locate their customer number and insert it as the Customer_ID in their OTRS user account when they create a ticket.
b) Add the "Customer_ID" field to the registration form and hope that users insert a valid customer ID. Also disable the "Company tickets" tab to ensure they can not view other peoples tickets.
Last edited by morecw on 10 Sep 2012, 16:33, edited 1 time in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

morecw wrote:their orders in references in SugarCRM
That sounds like a good customer source. Why not link to it?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

crythias wrote:
morecw wrote:their orders in references in SugarCRM
That sounds like a good customer source. Why not link to it?
Yes that is the goal but we need the Customer ID to exist first at both ends
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

morecw wrote: the same number we use for their orders
You can't use that?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

Although, I'd use a field associated with the customer, not an ordernumber ... what if they ordered multiple times?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
diginin
Znuny expert
Posts: 213
Joined: 11 Feb 2008, 12:04
Znuny Version: CVS

Re: Customer_ID during registration?

Post by diginin »

Typically, the customer ID will be something that will identify them with their Business Unit, or Organisation. This also provisions for the company ticket feature. So it is better in the long run when you do it this way, and do not let customers assign thier own ID.
Shawn Beasley
Contact me per XING
Contact me per LinkedIN

OTRS CVS on Ubuntu Stable.

Image
signature by diginin74, on Flickr

Computers are like air conditioners, when you open windows they are useless.



P.S. (für Leser meiner Deutschtexte) Rechtschreibfehler bitte mit s/.*/$KORREKTUR/ ersetzen.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

Code: Select all

    $Self->{'Customer::AuthModule1'}                       = 'Kernel::System::CustomerAuth::DB';
    $Self->{'Customer::AuthModule::DB::Table1'}            = 'customer_user';
    $Self->{'Customer::AuthModule::DB::CustomerKey1'}      = 'login';
    $Self->{'Customer::AuthModule::DB::CustomerPassword1'} = 'pw';

    $Self->{'Customer::AuthModule::DB::DSN1'} = "DBI:mysql:database=customerdb;host=customerdbhost";
    $Self->{'Customer::AuthModule::DB::User1'} = "some_user";
    $Self->{'Customer::AuthModule::DB::Password1'} = "some_password";

    # if you use odbc or you want to define a database type (without autodetection)
#    $Self->{'Customer::AuthModule::DB::Type1'} = 'mysql';

    # CustomerUser
    # (customer user database backend and settings)
    $Self->{CustomerUser1} = {
        Name   => 'Database Backend',
        Module => 'Kernel::System::CustomerUser::DB',
        Params => {
            # if you want to use an external database, add the
            # required settings
#            DSN => 'DBI:odbc:yourdsn',
            DSN => 'DBI:mysql:database=customerdb;host=customerdbhost',
#            User => '',
#            Password => '',
            Table => 'customer_user',
            # if your frontend is unicode and the charset of your
            # customer database server is iso-8859-1, use these options.
#           SourceCharset => 'iso-8859-1',
#           DestCharset => 'utf-8',

            # CaseSensitive will control if the SQL statements need LOWER()
            #   function calls to work case insensitively. Setting this to
            #   1 will improve performance dramatically on large databases.
            CaseSensitive => 0,
        },

        # customer unique id
        CustomerKey => 'login',

        # customer #
        CustomerID             => 'customer_id',
        CustomerValid          => 'valid_id',
        CustomerUserListFields => [ 'first_name', 'last_name', 'email' ],

#        CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
        CustomerUserSearchFields           => [ 'login', 'first_name', 'last_name', 'customer_id' ],
        CustomerUserSearchPrefix           => '*',
        CustomerUserSearchSuffix           => '*',
        CustomerUserSearchListLimit        => 250,
        CustomerUserPostMasterSearchFields => ['email'],
        CustomerUserNameFields     => [ 'title', 'first_name', 'last_name' ],
        CustomerUserEmailUniqCheck => 1,

#        # show now own tickets in customer panel, CompanyTickets
#        CustomerUserExcludePrimaryCustomerID => 0,
#        # generate auto logins
#        AutoLoginCreation => 0,
#        # generate auto login prefix
#        AutoLoginCreationPrefix => 'auto',
#        # admin can change customer preferences
#        AdminSetPreferences => 1,
#        # use customer company support (reference to company, See CustomerCompany settings)
#        CustomerCompanySupport => 1,
        # cache time to live in sec. - cache any database queries
        CacheTTL => 60 * 60 * 24,
#        # just a read only source
        ReadOnly => 1,
        Map => [

            # note: Login, Email and CustomerID needed!
            # var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
            [ 'UserTitle',      'Title',      'title',      1, 0, 'var', '', 0 ],
            [ 'UserFirstname',  'Firstname',  'first_name', 1, 1, 'var', '', 0 ],
            [ 'UserLastname',   'Lastname',   'last_name',  1, 1, 'var', '', 0 ],
            [ 'UserLogin',      'Username',   'login',      1, 1, 'var', '', 0 ],
            [ 'UserPassword',   'Password',   'pw',         0, 0, 'var', '', 0 ],
            [ 'UserEmail',      'Email',      'email',      1, 1, 'var', '', 0 ],

#            [ 'UserEmail',      'Email', 'email',           1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
            [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', '', 0 ],

#            [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
            [ 'UserPhone',        'Phone',       'phone',        1, 0, 'var', '', 0 ],
            [ 'UserFax',          'Fax',         'fax',          1, 0, 'var', '', 0 ],
            [ 'UserMobile',       'Mobile',      'mobile',       1, 0, 'var', '', 0 ],
            [ 'UserStreet',       'Street',      'street',       1, 0, 'var', '', 0 ],
            [ 'UserZip',          'Zip',         'zip',          1, 0, 'var', '', 0 ],
            [ 'UserCity',         'City',        'city',         1, 0, 'var', '', 0 ],
            [ 'UserCountry',      'Country',     'country',      1, 0, 'var', '', 0 ],
            [ 'UserComment',      'Comment',     'comments',     1, 0, 'var', '', 0 ],
            [ 'ValidID',          'Valid',       'valid_id',     0, 1, 'int', '', 0 ],
        ],

        # default selections
        Selections => {

#            UserTitle => {
#                'Mr.' => 'Mr.',
#                'Mrs.' => 'Mrs.',
#            },
        },
    };

Set the auth part to your otrs db

connect CustomerUser to your SugarCRM db, change customer_id as a field name to the field that represents what you want in the SugarCRM db. Match other fields as appropriate.
You *MUST* link Login, Email and CustomerID to fields. All others are optional to add or remove. If you like a field to show, add it in the map.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

crythias wrote:Although, I'd use a field associated with the customer, not an ordernumber ... what if they ordered multiple times?
I just mean it's a customer number we use for making their orders. So yes excuse me I mean Customer ID
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

Could we please put SugarCRM sycronisation aside for the moment. I actually didn't want to focus too much on that. Thank you for your advice on syncing the databases and I hope to come to that soon.

I need your advice please on users' registration in OTRS. Can someone please explain what is best practise when we consider that somehow the Customer_ID needs to be input into the Customer account after it has been created.

So far my manager and I have come to the conclusion and I would really appreciate your opinion: a user will self register, this account then waits while an agent validates the details that the customer has provided e.g name/address/company, plus what they believe to be their Customer ID - although this will be destined for the comment field. When the details are right hen the agent will then add the customer number to the Customer_ID and give access to the appropriate queues.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

morecw wrote: a user will self register, this account then waits while an agent validates the details that the customer has provided e.g name/address/company
This can't be done in out of the box OTRS. If you want a delayed registration, send them to a different form.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

crythias wrote:
morecw wrote: a user will self register, this account then waits while an agent validates the details that the customer has provided e.g name/address/company
This can't be done in out of the box OTRS. If you want a delayed registration, send them to a different form.
No I don't mean the account is waiting and at the same time disabled. Simply that the account is created via the form but does not gain any access to queues until the agent has looked at the request.

A use case would be:

1. User fills in the registration form providing name/address/company name/customer_ID - "company name" can populate the comment field
2. He then receives an email stating "Thank you for registering with us, we will email you again when the account has been activated". A copy of this email gets sent to us
3. Agent checks the details, and validates if the customer has specified a correct Customer_ID. Then gives access to queues (each queue has its own group)
4. Agent emails account to customer.

I believe most of this works already out-the-box. I would just need make the following changes if someone could please advise me how?

1. Add the Comment and Customer_ID field to the registration form (something in Customerlogin.dtl?)
2. I see I can edit what customer's notification in: Sysconfig, Framework -> Frontend::Customer - CustomerPanelBodyNewAccount
BUT: How do I get a copy of this message to CC another address? (this part is now already taken care of, see reply from Crythias)

Any comment on the overall idea?
Last edited by morecw on 29 Aug 2012, 22:07, edited 1 time in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

morecw wrote:How do I get a copy of this message to CC another address?
You'll have to modify Kernel/System/Web/InterfaceCustomer.pm

Code: Select all

        # send account info
        my $Sent = $EmailObject->Send(
            To       => $GetParams{UserEmail},
            Subject  => $Subject,
            Charset  => $LayoutObject->{UserCharset},
            MimeType => 'text/plain',
            Body     => $Body
        );
best bet: duplicate this and

Code: Select all

        # send account info
        my $Sent = $EmailObject->Send(
            To       => 'theotheremailaddress@domain.com',
            Subject  => $Subject,
            Charset  => $LayoutObject->{UserCharset},
            MimeType => 'text/plain',
            Body     => $Body
        );
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

hey Crythias! What a great start! Thanks a lot that works great.

Any suggestions for 1.? Or just comments overall?
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

morecw wrote:1. Add the Comment and Customer_ID field to the registration form (something in Customerlogin.dtl?)
The relevant code to parse this is in the same InterfaceCustomer.pm, which will fill the fields in the Customer map with blank if not passed through the form.

Code: Select all

        # get params
        my %GetParams;
        for my $Entry ( @{ $Self->{ConfigObject}->Get('CustomerUser')->{Map} } ) {
            $GetParams{ $Entry->[0] } = $Self->{ParamObject}->GetParam( Param => $Entry->[1] )
                || '';
        }
        $GetParams{ValidID} = 1;

        # check needed params
        if ( !$GetParams{UserCustomerID} ) {
            $GetParams{UserCustomerID} = $GetParams{UserEmail};
        }
        if ( !$GetParams{UserLogin} ) {
            $GetParams{UserLogin} = $GetParams{UserEmail};
        }
"What form?"
The form in Kernel/Output/HTML/Standard/CustomerLogin.dtl (look for the dtl:block:CreateAccount)
Add appropriate

Code: Select all

<div class="NewLine">
<label class="Mandatory" for="CustomerID"><span class="Marker">*</span> CustomerID</span><input type="text" id="CustomerID" name="CustomerID" maxlength="100" class="W50pc Validate_required" />
<div id="CustomerIDError" class="TooltipErrorMessage"><p>Need something in this field</p></div>
</div>
Anything you want customer to fill out that's in the "Map" (Comment? Phone? Fax? Mobile? Street? Zip? City?) can be requested. If it's not mandatory, don't make them fill in junk. If I made a syntax error above, look at what I hand copied from and make appropriate adjustments from existing code.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

From your example I've successfully added Street/Zip/City/Comment/CustomerID to CustomerLogin.dtl. and this data is being added to the new customer accounts :D

I haven't changed anything in InterfaceCustomer.pm as I didn't understand what I'm required to do. However it seems that I don't need to do anything as it works now anyway.

Here are my changes to Customerlogin.dtl (from line 92)

Code: Select all

#############################
### input street of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="Street"><span class="Marker">*</span> $Text{"Street"}</label>
                        <input title="$Text{"Street"}" name="Street" type="text" id="street" maxlength="100" value="$QData{"Street"}" class="W50pc Validate_Required"/>
                        <div id="StreetError" class="TooltipErrorMessage"><p>$Text{"Please provide your street address"}</p></div>
                    </div>                   
############################   

#############################
### input city of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="City"><span class="Marker">*</span> $Text{"City"}</label>
                        <input title="$Text{"City"}" name="City" type="text" id="city" maxlength="100" value="$QData{"City"}" class="W50pc Validate_Required"/>
                        <div id="CityError" class="TooltipErrorMessage"><p>$Text{"Please provide your city"}</p></div>
                    </div>                   
############################       
                            
#############################
### input Zip code of School or Business                   
                     <div class="NewLine">
                        <label class="Mandatory" for="Zip"><span class="Marker">*</span> $Text{"Zip"}</label>
                        <input title="$Text{"Zip"}" name="Zip" type="text" id="Zip" maxlength="100" value="$QData{"Zip"}" class="W50pc Validate_Required"/>
                        <div id="ZipError" class="TooltipErrorMessage"><p>$Text{"Please provide your zip code"}</p></div>
                    </div>                   
############################                                         
                  
#############################
### input Name of School or Business into the Comments field               
                     <div class="NewLine">
                        <label class="Mandatory" for="Comment"><span class="Marker">*</span> $Text{"Name of School or Business"}</label>
                        <input title="$Text{"Name of School or Business"}" name="Comment" type="text" id="Comment" maxlength="100" value="$QData{"Comment"}" class="W50pc Validate_Required"/>
                        <div id="SchulenameCodeError" class="TooltipErrorMessage"><p>$Text{"Please provide the name of your School or Business"}</p></div>
                    </div>                   
############################

#############################
### input Customer ID  (not mandatory)
                    <div>
                        <label for="Title">$Text{"Customer ID if known"}</label>
                        <input title="$Text{"Customer ID if known"}" type="text" name="CustomerID"  id="CustomerID" maxlength="50" value="$QData{"CustomerID"}"/>
                        <div id="CustomerIDError" class="TooltipErrorMessage"><p>$Text{"Customer ID if known"}</p></div>
                    </div>                                                               
############################  
Last edited by morecw on 30 Aug 2012, 02:15, edited 4 times in total.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

How can I fix this? Same result in Firefox 14 + IE9
You do not have the required permissions to view the files attached to this post.
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

It's a CSS box for the div. A real pain, but you can inspect element to attempt to get the size adjusted.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

crythias wrote:It's a CSS box for the div. A real pain, but you can inspect element to attempt to get the size adjusted.
Have increased Slider and Login heights from 260 to 360. Looks fine now

OTRS\var\httpd\htdocs\skins\Customer\default\css-cache"
#Slider{margin-bottom:34px;width:642px;height:360px;overflow:hidden;}#Login,#Reset,#Signup{width:500px;height:360px;
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer_ID during registration?

Post by crythias »

not the cache. edit the css file and delete the cache.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
morecw
Znuny expert
Posts: 215
Joined: 18 Jun 2012, 09:24
Znuny Version: 3.1.6
Real Name: Craig Wellman
Company: STÜBER SYSTEMS

Re: Customer_ID during registration?

Post by morecw »

crythias wrote:not the cache. edit the css file and delete the cache.
ok good point! I'm no web developer as you've probably guessed :)

I've now changed 260 over to 360 in Core.Login.CSS

Code: Select all

#Slider {
    margin-bottom: 34px;
    width: 642px;
    height: 360px;
    overflow: hidden;
}

#Login,
#Reset,
#Signup {
    width: 500px;
    height: 360px;
    padding-left: 142px;
    position: relative;
OTRS 3.1.6, Windows 2008 with MySQL database
Firefox 14, Chrome 22
cbruigom
Znuny newbie
Posts: 36
Joined: 17 Apr 2014, 23:38
Znuny Version: 3.3.5
Real Name: Clinton

Re: (SOLVED) Customer_ID during registration?

Post by cbruigom »

Hi all,

I recently followed this post for a similar requirement around mapping just the domain part of the email address into the CustomerID field. i thought i would share that, I am currently using OTRS 4, so .dtl files dont apply anymore there are .tt files

To add the CustomerID field to the #Signup form I updated "/opt/otrs/Kernel/Output/HTML/Standard/CustomerLogin.tt"

Code: Select all

<div class="NewLine">
                        <label class="Mandatory" for="CustomerID"><span class="Marker">*</span> [% Translate("CustomerID") | html %]</label>
                        <input title="[% Translate("This will become your customer ID)") | html %]" name="CustomerID" id="CustomerID" maxlength="150" value="[% Data.UserCustomerID | html %]" class="W100pc Validate_Required Validate_CustomerID"/>
                        <div id="CustomerIDError" class="TooltipErrorMessage"><p>[% Translate("This field is required.") | html %]</p></div>
                    </div>

This would allow for the user to enter their own CustomerID, which would work as a last resort but we wanted it automated based on part of their email address. From their I updated "/opt/otrs/Kernel/System/Web/InterfaceCustomer.pm"

commented out:

Code: Select all

if ( !$GetParams{UserCustomerID} ) {

            $GetParams{UserCustomerID} = $GetParams{UserEmail};
Added:

Code: Select all

my $str = $GetParams{UserEmail};

        if ( !$GetParams{UserCustomerID} ) {

             $str =~ /@(.*)/;

             $GetParams{UserCustomerID} = $1;

        }
This allowed for just the domain name to be parsed as the CustomerID. I dont by any far stretch of the imagination understand regex so anyone one with a more optimal way of adding this code either from a perl or regex perspective please feel free to share.
Locked