Start a new topic

Addressees and salutations

My import files always have a mix of single individuals and couples. What setting do you recommend for addressees and salutations, where IOM will recognize when to include a spouse? Right now, I set addressee and salutation to reflect only the head of household, and then I go into individual's records to include any spouses. As you can imagine, this can be cumbersome...

Thanks in advance,

Joanne


  <!--[if gte mso 9]> Normal 0 false false false EN-US X-NONE X-NONE <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:8.0pt; mso-para-margin-left:0in; line-height:107%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri",sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style>

Unfortunatley I couldn't upload a file for this... but here you go!

   '=======================================
    'GetTitle - Get the correct title
    '=======================================
    Public Shared Sub GetTitle(ByRef sPTitle As String, sPGender As String, sPLName As String, sSTitle As String, sSGender As String, sSLName As String)
 
        ' If title blank
        If sPTitle = "" Then
            ' If Male then Mr. and done
            If sPGender = "Male" Then
                sPTitle = "Mr."
            End If
            ' If Female
            If sPGender = "Female" Then
                ' Check spouse
                If UCase(sPLName) = UCase(sSLName) Then
                    ' If there is a spouse & last names match then Mrs. else Ms.
                    sPTitle = "Mrs."
                Else
                    sPTitle = "Ms."
                End If
            End If
        End If
    End Sub
 
    '=======================================
    'SetAddrSal - Set the correct addressee and salutation
    '=======================================
    Public Shared Sub SetAddrSal(oRec As CRecord)
        If oRec.Fields(ERECORDSFields.RECORDS_fld_KEY_INDICATOR) = 2 Then
 
            Dim sPTitle As String = ""
            Dim sPFirst As String = ""
            Dim sPLast As String = ""
            Dim sPSuffix As String = ""
            Dim sPGender As String = ""
            Dim sSTitle As String = ""
            Dim sSFirst As String = ""
            Dim sSLast As String = ""
            Dim sSSuffix As String = ""
            Dim sSGender As String = ""
            Dim oSpouse As CIndividual
            Dim iAddr As Integer = 0
            Dim iSal As Integer = 0
 
            oSpouse = oRec.Relations.Individuals.Spouse
            sPTitle = oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1)
            sPFirst = oRec.Fields(ERECORDSFields.RECORDS_fld_FIRST_NAME)
            sPLast = oRec.Fields(ERECORDSFields.RECORDS_fld_LAST_NAME)
            sPSuffix = oRec.Fields(ERECORDSFields.RECORDS_fld_SUFFIX_1)
            sPGender = oRec.Fields(ERECORDSFields.RECORDS_fld_GENDER)
 
            If Not oSpouse Is Nothing Then
                If oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_DECEASED) <> -1 Then
                    sSTitle = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_TITLE1)
                    sSFirst = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_FIRST_NAME)
                    sSLast = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_LAST_NAME)
                    sSSuffix = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_SUFFIX1)
                    sSGender = oSpouse.Fields(EINDIVIDUALFields.INDIVIDUAL_fld_GENDER)
                End If
                oSpouse = Nothing
            End If
            GetTitle(sPTitle, sPGender, sPLast, sSTitle, sSGender, sSLast)
            GetAddrSal(sPTitle, sPLast, sSTitle, sSLast, iAddr, iSal)
            oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1) = sPTitle
            oRec.Fields(ERECORDSFields.RECORDS_fld_PRIMARY_ADDRESSEE_ID) = iAddr
            oRec.Fields(ERECORDSFields.RECORDS_fld_PRIMARY_SALUTATION_ID) = iSal
 
        End If
    End Sub
 
    '=======================================
    'SetAddrSalRel - Set the correct addressee and salutation
    '=======================================
    Public Shared Sub SetAddrSalRel(oInd As CIndividual2, Optional oImport As ImportOM.API.iImportSession = Nothing)
 
        If oImport Is Nothing Then
            oImport = Profile.Import
        End If
 
        Dim sPTitle As String = ""
        Dim sPFirst As String = ""
        Dim sPLast As String = ""
        Dim sPSuffix As String = ""
        Dim sPGender As String = ""
        Dim sSTitle As String = ""
        Dim sSFirst As String = ""
        Dim sSLast As String = ""
        Dim sSSuffix As String = ""
        Dim sSGender As String = ""
        Dim oRec As CRecord
        Dim iAddr As Integer = 0
        Dim iSal As Integer = 0
 
        sPTitle = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_TITLE1)
        sPFirst = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_FIRST_NAME)
        sPLast = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_LAST_NAME)
        sPSuffix = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_SUFFIX1)
        sPGender = oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_GENDER)
 
        If oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_IS_SPOUSE) = -1 Then
            oRec = New CRecord
            oRec.Init(oImport.SessionContext)
            oRec.Load(oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_CONSTIT_ID))
            If oRec.Fields(ERECORDSFields.RECORDS_fld_DECEASED) <> -1 Then
                sSTitle = oRec.Fields(ERECORDSFields.RECORDS_fld_TITLE_1)
                sSFirst = oRec.Fields(ERECORDSFields.RECORDS_fld_FIRST_NAME)
                sSLast = oRec.Fields(ERECORDSFields.RECORDS_fld_LAST_NAME)
                sSSuffix = oRec.Fields(ERECORDSFields.RECORDS_fld_SUFFIX_1)
                sSGender = oRec.Fields(ERECORDSFields.RECORDS_fld_GENDER)
            End If
            oRec.CloseDown()
            oRec = Nothing
        End If
        GetTitle(sPTitle, sPGender, sPLast, sSTitle, sSGender, sSLast)
        GetAddrSal(sPTitle, sPLast, sSTitle, sSLast, iAddr, iSal)
        oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_TITLE1) = sPTitle
        oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_PRIMARY_ADDRESSEE_ID) = iAddr
        oInd.Fields(EINDIVIDUAL2Fields.INDIVIDUAL2_fld_PRIMARY_SALUTATION_ID) = iSal
 
    End Sub
 
    '=======================================
    'GetAddrSal - Get the correct addressee and saluation (used by SetAddrSal)
    '=======================================
    Public Shared Sub GetAddrSal(sPTitle As String, sPLName As String, sSTitle As String, sSLName As String, ByRef sAddr As Integer, ByRef sSal As Integer)
        Dim sPF As Integer = 34
        Dim sPF_SF As Integer = 28
        Dim sPT_PL As Integer = 21
        Dim sPT_PL_ST_SL As Integer = 17
        Dim sPT_ST_PL As Integer = 16
        Dim sST_PT_SL As Integer = 19
        Dim sPF_PL_PS As Integer = 1
        Dim sPF_SF_PL As Integer = 5
        Dim sPF_PL_PS_SF_SL_SS As Integer = 50
 
        sPLName = UCase(sPLName)
        sSLName = UCase(sSLName)
 
        'Select correct addressee
        If sSLName = "" Then
            'If the Spouse does not exist
            sAddr = sPF_PL_PS
        Else 'Spouse exists
            If sSLName = sPLName Then
                'Same last name
                sAddr = sPF_SF_PL
            Else ' Diff last name
                sAddr = sPF_PL_PS_SF_SL_SS
            End If
        End If
 
        ' Select correct salutation
        ' If Primary Title does not exist
        If sPTitle = "" Then
            ' If Spouse does not exist
            If sSLName = "" Then
                sSal = sPF
            Else ' Spouse Exists
                sSal = sPF_SF
            End If
        Else ' Primary Title exists
            ' If Spouse does not exist
            If sSLName = "" Then
                sSal = sPT_PL
            Else ' Spouse Exists
                ' If Spouse does not have title
                If sSTitle = "" Then
                    sSal = sPF_SF
                Else ' Spouse has title
                    ' If Last names do not match
                    If sPLName <> sSLName Then
                        sSal = sPT_PL_ST_SL
                    Else ' Last Names match
                        ' If Titles Match
                        If sPTitle = sSTitle Then
                            Select Case sPTitle
                                Case "Mr.", "Ms.", "Mrs."
                                    sSal = sPF_SF
                                Case "Dr."
                                    sSal = sPT_PL_ST_SL
                                    ' TODO: SHOULD BE Drs. Editable!
                                Case Else
                                    sSal = sPT_PL_ST_SL
                            End Select
                        Else ' Titles do not match
                            If sSTitle = "Ms." Or sSTitle = "Mrs." Then
                                ' Spouse title is female
                                sSal = sPT_ST_PL
                            ElseIf sPTitle = "Ms." Or sPTitle = "Mrs." Then
                                ' Primary title is female
                                sSal = sST_PT_SL
                            Else 'Neither title is female and they don't match (Dr. & Mr., Rev. & Dr, etc.)
                                sSal = sPT_PL_ST_SL
                            End If
                        End If
                    End If
                End If
            End If
        End If
    End Sub

  ps

PF = Primary First Name
SF = Spouse First Name
PT = Primary Title
PL = Primary Last Name
ST = Spouse Title
SL = Spouse Last Name
PS = Primary Suffix
SS = Spouse Suffix

So sPT_PL = Primary Title Primary Last Name

The Number is the ID of the salutation (from the RE salutation report)


1 person likes this
I can not thank you enough Wayne!

1 person likes this
Thank you!! This is a very helpful starting point.
Thanks for the advice, Amanda. However, this doesn't look like something I can do. I have version 1.9.2.138 - does this option apply?
Hi Joanne,

You will go to the Addressee/Salutation area of RE's Config to set up the formulas and select the "Smart" checkbox. Then in IOM you can select the default addressee and salutation you would like to use under Constituents in the left side navigation pane.

Please let me know if you have any other questions.

Thank you,
Amanda
Omatic Support
Amanda,

I'm finally following up after some months to this... I can't seem to find what you're talking about... In the Addressee/Salutation window where I can select the "Smart" checkbox, "Spouse Title" isn't an option to set. I thought it might be different for other versions of RE, but I'm using the most up-to-date one...

Joanne

Hi Joanne,

The Smart column is all the way on the right. When you add "Spouse Title" (for example) you can then check the box for Smart.

image




Amanda
Omatic Support

Revisiting my post about addressee and salutation. I'm still having to edit them after importing because IOM isn't picking up the Smart features. Here are three examples of the most common mistakes I see:

Ms. and Mr. Shikha Jain
Mrs. and Mr. Marisa Lemorande
Ms. and Joanne Danganan

Is this problem not fixable without API?
The RE "Smart" functionality isn't really that smart. It will only show/hide particular words (like "and") based on whether another field exists or not. So it will hide "and" if there is no spouse title for example. It will not choose a different salutation based on other criteria, that has to be done with the API or possibly a dictionary if the logic is simple enough. I posted the (surprisingly complicated!) logic that you need to go through to actually pick the "right" salutation for each situation (at least in my system).

The problem is that you can only really assign one add/sal on import and that particular add/sal is limited by what RE can do. For example, you can't say "if the primary is female and the spouse is male then use the spouse title first". You can just have two separate salutations, one with Mr. & Mrs. and one with Mrs. & Mr. and you have to actually pick between the two somehow.
Thanks for the clarification, Wayne! I appreciate it. What a bummer... I don't have anyone on staff who knows how to implement API in RE. Do you have a resource that can help me learn? Your system is similar to what we would use.
Unfortunately there aren't many resources out there to learn this kind of stuff. I have just picked it up over the years through a lot of trial and error. I think that Omatic has some consulting services that would be an option. You would need to ask them though.

I would be happy to provide you with my code but it is very specific to my system and would need a fair amount of work to tailor to your setup.

Sorry I don't have an easy solution :(
I am just about to tackle this project too. When running IOM imports we default to an addressee that uses the same last name for both spouses but it keeps overriding addressees for spouses with different last names. Wayne, would you be willing to share your code so I have a starting point? It would be greatly appreciated!
Hi Joanne,

In RE: Config-->Addressees/Salutations, open the addressee and salutation formulas. Check the "Smart" checkbox next to "Spouse Title". This will prevent the "Mr. and James Smith" from happening.

Please let me know if you have any other questions!

Thank you,
Amanda
Omatic Support
Joanne this is a great question!

I have been struggling with this recently as well. RE isn't very good at automatically choosing the correct salutation. There is some "smart" functionality as Amanda points out but that doesn't really cover cases where people have different last names or non-standard titles etc.

In IOM you can only designate one default addr/sal which we have to set to:
Addr: and
Sal: and
since we won't necessarily have a title for one or both of them.

Once the holiday rush is over I plan to use the API to figure out the right addr/sal to use for each constituent but currently it doesn't seem like IOM has any decision functionality built in.

BTW, if you are interested, here is my decision tree for what addressee and salutation to use.

PT = Primary Title
PF = Primary First Name
PL = Primary Last Name
PS = Primary Suffix
ST = Spouse Title
SF = Spouse First Name
SL = Spouse Last Name
SS = Spouse Suffix

Addressee
• No Spouse
? PF/PL/PS
• Spouse
? Same Last name
- PF & SF PL
? Diff Last name
- PF/PL/PS & SF/SL/SS


Salutation
• Primary Has Title
? No Spouse
- PT/PL
? Spouse
- w/ Title
? Same Last name
• Title = Title
? Title=Mr/Ms/Mrs
- PF & SF
? Title = Dr.
- Editable: Drs.
- (PT/PL & ST/SL)
? Else
- PT/PL & ST/SL
• Title != Title
? STitle = Ms/Mrs
- PT & ST PL
? Ptitle = Ms/Mrs
- ST & PT SL
? Else
- PT/PL & ST/SL
? Diff Last name
• PT/PL & ST/SL
- w/o Title
? PF & SF
• No Primary Title
? No Spouse
- PF
? Spouse
- PF & SF

(I hope that gets formatted correctly!)
Login or Signup to post a comment