Contact Addressee/Salutation Fields

Options

I have been able to successfully pull into my letter the contact name on org relationships. But I can't find how to reference their first name, or use the primary addressee/salutation fields. Does anyone know how to call those fields or if they even exist?

Comments

  • Amanda -

    If I'm thinking about this correctly, the Org Contacts are referenced through the relationship to the Org, right? Do you get the system record ID of the contact in the return from that call? If so, you can use that to look up the Addressee/Salutations from a Get Name Formats action.

    Let me know if I'm answering your question.

  • I was able to get this to work, but with some work-arounds.

    I had to use a conditional statement to call the contact ID. Because not every record has a contact, it would return “null” if I only included the contact id. This resulted in an error that prevented the flow from running.

    So I used a conditional statement to use the contact ID if available, and if not, to just use the constituent ID. Not ideal, as I then had to use some conditions further down the flow to address this. But it seemed to work.

    If there is a better work-around for the “null” issue, let me know.

  • Amanda Holt:

    I was able to get this to work, but with some work-arounds.

    I had to use a conditional statement to call the contact ID. Because not every record has a contact, it would return “null” if I only included the contact id. This resulted in an error that prevented the flow from running.

    So I used a conditional statement to use the contact ID if available, and if not, to just use the constituent ID. Not ideal, as I then had to use some conditions further down the flow to address this. But it seemed to work.

    If there is a better work-around for the “null” issue, let me know

    I would suggest using expressions over conditionals. Conditionals should be used more for error handling, whereas an expression using the if function will check a condition and return a value if true and a different value is false. Either way is fine, but using conditionals you might find yourself having to add a lot of duplicate steps.

    d268d7e77933377674fff99c2047e45a-huge-im

  • Thanks, Matt! The terminology you used is probably more accurate for what I did, since I did use an expression:

    if(empty(body('Filter_array_-_Contact_Name')?[0]?['relation_id']),outputs('Get_the_Donor''s_information')?['body/id'],body('Filter_array_-_Contact_Name')?[0]?['relation_id'])

    Because this expression is in a “get constituent name format summary”, it would not accept a blank or null response (which is what I wanted).

  • @Heather McLean
    Hi Heather,

    When I try to add get a name formats and add the constituent id, it automatically add “Apply to Each” to my flow. Is there any way to have it not show up?

  • Hi @Miriam Cai, if it's applying an Apply to Each when you insert the constituent ID, that means the source you're pulling into Get a Name Format action has the constituent IDs in an array (a list, essentially). Can you elaborate a bit on where the data for your flow is originating (NXT List, Constituent record button, etc.) and what you're trying to do?

Categories