Post

1 follower Follow
0
Avatar

Multiple reference items where email is the same.

Hi,

We are in the property space and tweaking our letting agency.

There are the following two Apps "Units" and "Viewings" and field names under each app:
APP: "Units"
  > Field "Unit (Landlord Email)": string e.g. landlordemail@email.com

    Example of Unit items:
    Unit1: landlord1@email.com
    Unit2: landlord2@email.com
    Unit3: landlord1@email.com
    Unit4: landlord1@email.com
    Unit5: landlord1@email.com
    Unit6: landlord7@email.com

APP: "Viewings"
  > Field "Unit(s)": multiple references to "Units" app items (a viewing could be going around a block of 1-8 different units/apartments each owned by different landlords). Example, one Viewing item could multiple reference:
    Unit1
    Unit2
    Unit3
    Unit4  
    Unit5
    Unit6
> Field "Actions": Categories "New", "Send Email", "Cancelled"

What I have done in Podio/Globiflow is that in a "Viewings" item, when I click on "Send Email", it will "for to loop" through the units and send an email to the value in "Unit (Landlord Email)" - this is fine and works, but the result will be separate/multiple emails to the same landlord if they own multiple units doing the viewing.

Email to landlord1@email.com: "You have a viewing at Unit 1"
Email to landlord1@email.com: "You have a viewing at Unit 3"
Email to landlord1@email.com: "You have a viewing at Unit 4"
Email to landlord1@email.com: "You have a viewing at Unit 7"

Email to landlord2@email.com: "You have a viewing at Unit 2"
Email to landlord7@email.com: "You have a viewing at Unit 6"


What I am actually trying to achieve is if I can combine all the units for viewing for that particular landlord under 1 email (instead of multiple separate emails to the same landlord for every single unit for the viewing). For example:

Email to landlord1@email.com: "You have a viewing at the following units: Unit 1, Unit 3, Unit 4, Unit 7"
Email to landlord2@email.com: "You have a viewing at Unit 2"
Email to landlord7@email.com: "You have a viewing at Unit 6"

 

Do you have any code recommended that would help me achieve this?

 

Thanks,

Mike

Minerva Homes

Please sign in to leave a comment.