Remove Customers that are no more active

Moderator: crythias

Locked
creator
Znuny newbie
Posts: 5
Joined: 15 Sep 2011, 11:22
Znuny Version: 3.0.8
Real Name: Stefano Coletta
Company: Unidata

Remove Customers that are no more active

Post by creator »

Hello,
we currently use OTRS with LDAP authentication for Agents and Customers, Agents associate each ticket with a Customer. Customers are imported from our ERP daily through a proprietary script.

We would like to remove or disable "expired" customers that have no more active contracts with us, ie. we would like to prevent Agents who receive phone calls to associate a new ticket with an "expired" customer (this happens for example when customers have similar names or short names, etc.).

Any suggestions to accomplish that from OTRS?

If not, how could I disable them from OTRS DB without deleting them?

Actually we use a view on our DB to populate the LDAP Customers list, so removing a user from LDAP (ie. from our view of course will not disable the corresponding OTRS customer...)

Thank you in advance.

Stefano
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Remove Customers that are no more active

Post by crythias »

usually you may mark one invalid.
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
creator
Znuny newbie
Posts: 5
Joined: 15 Sep 2011, 11:22
Znuny Version: 3.0.8
Real Name: Stefano Coletta
Company: Unidata

Re: Remove Customers that are no more active

Post by creator »

So I think I may create a new view from ERP with all inactive customers and with a custom cron script flag them on OTRS as invalid.
Old tickets will be affected? I mean the customer will be displayed and searchable, right?

I would like to know if there is something "already made" inside OTRS to solve this problem: I think it is really a common one!

Greetings,
Stefano
Rooobaaat
Znuny wizard
Posts: 432
Joined: 11 Sep 2014, 16:28
Znuny Version: OTRS 5.0.x

Re: Remove Customers that are no more active

Post by Rooobaaat »

Yes! Invalid customers and their tickets are still searchable.

There is no other opportunity to prevent them from login to the customer interface and opening new tickets. Also an agent can't create a new ticket for invalid customers.
My english is better than your german :P

"Produktiv": OTRS: 5.0.x, OTRS::ITSM 5.0.x
"Testing": OTRS 6 git
OS: Debian 8.0 (Jessie)
Apache2.4.10/MySQL 5.5.41
avillagomez
Znuny newbie
Posts: 9
Joined: 24 Jul 2013, 01:49
Znuny Version: 3.1.6
Real Name: Alejandro Villagomez
Company: Outhelping

Re: Remove Customers that are no more active

Post by avillagomez »

Well... i use these ones, but always search for more dependencies on tables...

*For Tickets
delete from ticket_history
delete from article_flag
delete from article
delete from article_attachment
delete from article_plain
delete from time_accounting
delete from ticket_flag
delete from ticket

*For Customers
delete customer_user
delete customer_preferences
delete customer_company (not very recommended)

And, keep on mind that the ID from some tables is "auto", so, if u want really a DB from zero, u must have to erase the DB and then create it again.

That works for me!
Locked