Adding additional salutations

Our development department would like to have additional salutations automatically added when a new account is created.  They've been manually changing the default salutation type to preferred and then adding an informal salutation.  I know that this is something I could do with a stored procedure, but being that we are pretty new to Tessitura I have never written a stored procedure.  Could I modify the stored procedure that creates the default salutation?  Can someone point me in the right direction? Or if you're feeling generous perhaps share a stored procedure you've created to do this?  

Thanks!

Parents
  • Hello,

    I don't know of any hooks that you can use to do this.  But what you could do is have a sql job that runs every so often to check for new customer records, then have it add the salutation to any that it finds that are new and missing it.

    Jon

  • Sorry forgot to add the sql code should not be to bad for this, it could be something like the following:

    Insert into tx_cust_sal select 1,customer_no,lname,null,fname,'N','N','jballing',getdate() from t_customer where not exists (select customer_no from tx_cust_sal where tx_cust_sal.customer_no=t_customer.customer_no and signor=1) and create_dt> convert(Datetime,Convert(varchar,Getdate(),101))

    I did not test this out but it gives you an idea.  Basically it is checks for the day it is run if there have been any new customer records createt that do not have an salutation created of a certain type.  In this case "1" , then it selects the information needed and inserts the record.

    Let me know if you need any help with it.

    Jon



    [edited by: Jon Ballinger at 9:37 PM (GMT -6) on 27 Aug 2010]
  • You *could* take Jon's solution and with a little tweaking put it into LP_CUSTOMER_RANK which triggers every time a change is made to the customer. Now I said this with several large caveats - (so no one from Tessitura looks at me sternly ;) ). One, test, test, test. Since this triggers with every change/addition to the customer record (key customer tables) if you screw it up, your Tessi will grind to a halt. And two, be careful what you add to LP_CUSTOMER_RANK because it is called a LOT and if you put too much in it or something that is resource heavy you are going to slow Tessi down.

    Good luck!

Reply
  • You *could* take Jon's solution and with a little tweaking put it into LP_CUSTOMER_RANK which triggers every time a change is made to the customer. Now I said this with several large caveats - (so no one from Tessitura looks at me sternly ;) ). One, test, test, test. Since this triggers with every change/addition to the customer record (key customer tables) if you screw it up, your Tessi will grind to a halt. And two, be careful what you add to LP_CUSTOMER_RANK because it is called a LOT and if you put too much in it or something that is resource heavy you are going to slow Tessi down.

    Good luck!

Children