WordFly LP update preferences - anyone customized that successfully yet?

Shortest possible version of my problem: with control-grouped email addresses (which we need), the WordFly procedure *as delivered* does not actually look for an eaddress_no that belongs to the appropriate group - or even the ACTUAL eaddress_no from the Eaddress table - it just selects the first row with the same email string (address) that the message was sent to...which means that currently, I have purposes that belong to one organization being written to another organization's email types.  PLEASE HELP. WILL SEND COOKIES. 

Parents
  • Are you specifically talking about LP_UPDATE_EMAIL_PROMOTION? Our SQL guru, Barbara Sikkink, has modified our code to adapt it for the multiple organizations we work with. I'm just not sure whether or not it does anything different regarding the Eaddress table lookup you're mentioning here.

    I'll attach our code here just in case it helps.

    USE [impresario]
    GO
    /****** Object:  StoredProcedure [dbo].[LP_UPDATE_EMAIL_PROMOTION]    Script Date: 8/6/2020 2:29:21 PM ******/
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    
    
    
    
    ALTER   Procedure [dbo].[LP_UPDATE_EMAIL_PROMOTION](
    	@source_no int =  null,
    	@customer_no int = null,
    	@response_code int = null,
    	@response_dt datetime  = null,
    	@eaddress varchar(80) = null,
    	@url varchar(1024) = null
    )
    
    AS
    
    SET NOCOUNT ON
    
    /*************************************************************************************************
    New Localized Procedure CWR 10/31/2003 which is called from WP_UPDATE_EMAIL_PROMOTION to optionally
    take additional actions upon receiving email response notifications
    
    Updated 4/10/17 - CMP, Removed error causing comments, commented out CSI creations
    
    Sample code is provided below to illustrate some possible actions, especially dealing with Unsubscribe
    events (response_code 5)
    
    Updated 10/2/18 - BLS, updated to add unsubscribe for ahha Tulsa & generic 
    
    Updated 7/24/19 - BLS, updated to add Gilcrease
    *************************************************************************************************/
    
    
    /* start WordFly sample code  ========================================================================*/
    
    
    -- here is code that will set an attribute (hard coded values)
    
    
    
    If @response_code = 5 -- Philbrook Unsubscribe
    	Begin
    
    	If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 215)
    		Update	tx_cust_keyword
    		Set	key_value = 'Unsubscribe'
    		Where	customer_no = @customer_no 
    			and keyword_no = 215
    	Else
    		Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    		Select	@customer_no, 215, 'Unsubscribe'
    	End
    
    
      If @response_code = 2 -- Philbrook Hardbounce
    	  Begin
    		If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 215)
    			Update	tx_cust_keyword
    			Set	key_value = 'Hard Bounce'
    			Where	customer_no = @customer_no 
    				and keyword_no = 215
    		Else
    			Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    			Select	@customer_no, 215, 'Hard Bounce'
    	  End
    
    
    If @response_code = 10 -- ahha Tulsa Unsubscribe
    	Begin
    		If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 533)
    			Update	tx_cust_keyword
    			Set	key_value = 'Unsubscribe'
    			Where	customer_no = @customer_no 
    			and keyword_no = 533
    		Else
    			Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    			Select	@customer_no, 533, 'Unsubscribe'
    			End
    
    
      If @response_code = 7 -- ahha Tulsa Hardbounce
    	  Begin
    		If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 533)
    			Update	tx_cust_keyword
    			Set	key_value = 'Hard Bounce'
    			Where	customer_no = @customer_no 
    				and keyword_no = 533
    		Else
    			Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    			Select	@customer_no, 533, 'Hard Bounce'
    	  End
    
    
    
      If @response_code = 15 -- Gilcrease Unsubscribe
    	Begin
    		If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 590)
    			Update	tx_cust_keyword
    			Set	key_value = 'Unsubscribe'
    			Where	customer_no = @customer_no 
    			and keyword_no = 590
    		Else
    			Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    			Select	@customer_no, 590, 'Unsubscribe'
    			End
    
    
      If @response_code = 12 -- Gilcrease Hardbounce
    	  Begin
    		If Exists (Select * from tx_cust_keyword where customer_no = @customer_no and keyword_no = 590)
    			Update	tx_cust_keyword
    			Set	key_value = 'Hard Bounce'
    			Where	customer_no = @customer_no 
    				and keyword_no = 590
    		Else
    			Insert	tx_cust_keyword(customer_no, keyword_no, key_value)
    			Select	@customer_no, 590, 'Hard Bounce'
    	  End
     
    
    
      
      
    
    	
    /* == end WordFly sample code  ========================================================================*/
    
    
    
    
    /*== start Tessitura sample code =======================================================================*/
    
    
    --Declare	@errmsg varchar(255), @rowcount int
    
    ------ here is code that will set the t_customer emarket_ind to a value dependant on response codes
    --If @response_code = 5 --  UNSUBSCRIBE: set the marketing indicator on the eaddress record for the customer
    --	Begin
    --		Update	t_customer
    --		Set	emarket_ind = 5	-- no emarketing to philbrook
    --		Where	customer_no = @customer_no
    --	End
    
    --If @response_code = 2  --  HARDBOUNCE:  set the marketing indicator on the eaddress record for the customer
    --	Begin
    --		Update	t_customer
    --		Set	emarket_ind = 4	-- no emarketing to all organizations
    --		Where	customer_no = @customer_no	
    --	End
    
    /* -- E-Marketing Codes
    1 - n/a does not exist
    2 - "No Emarketing (depriciated)
    3 - (none) i.e. No preference
    4 - "Do Not Email"
    5 - "P Do Not Email" 
    */
    
    /*  -- Commented out by Barbara S --
    -- here is code that will write a customer service issue (hard coded values)
    Declare @activity_no int
    
    --Philbrook Unsub
    If @response_code = 5
      Begin
    
    	-- get an issue number
    	EXEC @activity_no = AP_GET_NEXTID_Function 'AC'
    	
    	-- Put in the Customer Service Issue
    	Insert into t_cust_activity(
    		activity_no,
    		category,
    		activity_type,
    		customer_no,
    		contact_type,
    		inout_ind,
    		notes,
    		issue_dt,
    		origin)
    	Select 	@activity_no,
    		null,
    		97,
    		@customer_no,
    		22,
    		'I',
    		'WordFly Unsubscribe',
    		getdate(),
    		null
    
      End
    
      -- Philbrook Hardbounce
      If @response_code = 2
      Begin
    
    	-- get an issue number
    	EXEC @activity_no = AP_GET_NEXTID_Function 'AC'
    	
    	-- Put in the Customer Service Issue
    	Insert into t_cust_activity(
    		activity_no,
    		category,
    		activity_type,
    		customer_no,
    		contact_type,
    		inout_ind,
    		notes,
    		issue_dt,
    		origin)
    	Select 	@activity_no,
    		null,
    		98,
    		@customer_no,
    		22,
    		'I',
    		'WordFly Hard Bounce',
    		getdate(),
    		null
    
      End
    */
    --RETURN
    
    /*== end Tessitura sample code =======================================================================*/
    

  • Sorry - was off for a long weekend to handle some "Parent of 2020 Senior" graduation stuff (note: remote graduation in high school parking lot? not as bad as it sounds) but I'm back now.  I'm actually struggling with *this* procedure: LP_WF_PREFERENCE_UPDATE_CUSTOMER  and I *think* it's because of this section of the code:

    -- STEP 2: FIND EADDRESS RECORD TO MODIFY
    declare @eaddress_no int

    select @eaddress_no = eaddress_no from dbo.[t_eaddress]
    where [customer_no] = @customer_no and [address] = @messaging_address and [inactive] = 'N'
    order by create_dt desc, last_update_dt desc

    if ISNULL(@eaddress_no,0) = 0
    begin
    raiserror('Invalid email address for this customer.', 11, 2) with seterror
    return -101
    end

    I most definitely cannot have it just looking for the first email address value that it finds that matches the address it was sent to. I need it to match on the *actual* eaddress_no from the T_EADDRESS table, so that if separate orgs have different email types/IDs for the same email address, it attaches the purposes to the correct org.  The WordFly code, as delivered, seems to assume that an email address will only exist on a customer record as one email type?  ALL help appreciated, and I'm open to "you're doing it wrong" if there's a better way to do this.

  • Well dang; I just searched our SSMS and I'm seeing six LP's with "WF" in the titles, but none of them are LP_WF_PREFERENCE_UPDATE_CUSTOMER.

    For reference, we only have:

    • LP_WF_EXPORT_CREATE
    • LP_WF_EXPORT_GET
    • LP_WF_EXPORT_UPDATE
    • LP_WF_PAGE_RESPONSE_CREATE
    • LP_WF_PAGE_RESPONSE_CUSTOM
    • LP_WF_PAGEFIELD_RESPONSE_CREATE
  • Are any of you using WordFly Preferences (which write back to Tessitura as either Interests, Attributes, Contact Point Purposes, or Contact Permissions?  That's what this small procedure handles.  FTR it works fine for Interests, Attributes, and Permissions, because those are all attached to the customer number, which isn't an issue. But for Purposes, which I would expect to attach to the eaddress_no that was *used* not the VALUE that was used, it's a disaster. Five years in and I've been nagging the orgs for months to start using a combo of purposes and permissions so we can better take advantage of marketing segments and now that two of them have started, I'm finding this mess. I firmly believe I am not able to see a better solution because I'm staring at it like there's only one way to fix it.  Hence the crowdsourcing :)

  • Hi Mindee! Have you talked with WordFly directly about this issue with the email address updates? The consulting team may be able to help with a custom procedure to help update the data the way you need it, but I'm also wondering if this is something larger that WordFly may want to consider in their integration.

  • Thanks for the suggestion, Colleen.  I haven't checked back with WordFly about this yet. Back in January/February when the Arts Council was starting to decide how to configure things, the WordFly support team indicated that changes to that procedure would be our responsibility but I didn't realize at the time (since no one yet had branched out to Preferences/Purposes/Permissions) that the procedure as written would be so unsuitable.  I'll reach out and see if they can help.

Reply
  • Thanks for the suggestion, Colleen.  I haven't checked back with WordFly about this yet. Back in January/February when the Arts Council was starting to decide how to configure things, the WordFly support team indicated that changes to that procedure would be our responsibility but I didn't realize at the time (since no one yet had branched out to Preferences/Purposes/Permissions) that the procedure as written would be so unsuitable.  I'll reach out and see if they can help.

Children
No Data