Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Identifying new Records to Create when comparing against Addresses records

Masond3
8 - Asteroid

Afternoon Community, 

 

Hoping you can help me.

 

I know the flow but just struggling to think how i could get this to work within alteryx 


I have attached some sample data to help explain my use case.

 

I have two input files ;

  • Company 
  • Contact

 

The aim of the exercise is to the following ;

  1. Map contacts to the correct "Office"
  2. Only search for those offices in the given hierarchy for a "Practice_Id" 
  3. Flag new Office records which need to be created where contact address doesn't match office address for a practice_Id hierarchy 


Steps : 

  1. Find "Adviser_Practice_ID" against "Practice_Id" where "Level" = Company 
  2. Return all child records where Level = "Office" & "Parent id" = Id of the company id above
  3. Compare Contact Address vs Company address where the address matches then return "Company ID" 
  4. Compare Contact Address vs Company address where the address does not match then return Blank

Contact Input data

Adviser_Practice_IDBuildingAddress CityStatePostcode
18000009Suite 52-6 Albert StBlackburnVictoria3130
18000009Suite 52-6 Albert StBlackburnVictoria3130
18000009Suite 52-6 Albert StBlackburnVictoria3130
18000009Suite 1128 Jolimont RdEast MelbourneVictoria1111
18000009Suite 52-6 Albert StBlackburnVictoria3130

 

Company Input data 

 

Practice_IDNameBuildingAddress CityStatePostcodeLevelCompany id Parent id
18000009Mason LTDSuite 52-6 Albert StBlackburnVictoria3130Office001j000000eKhoRAAS0013a00001ndVPtAAM
18000009Mason LTDSuite 52-6 Albert StBlackburnVictoria3130Company0013a00001ndVPtAAM 
 Mason LTDSuite 217, Toorak Business Centre19 Milton ParadeMalvernVictoia 2952Office0013a00001ndflGAAQ0013a00001ndVPtAAM
18002199Amber Insurance  1 High Street ToorakVictoria3142Office001j000000eKh8dAAC0013a00001ndXIwAAM
18002199Amber Insurance  1 High Street ToorakVictoria3142Company0013a00001ndXIwAAM 

 

Expected out come 

Adviser_Practice_IDBuildingAddressCity Adviser_StatePostcodeCompany ID Helper 
18000009Suite 52-6 Albert StBlackburnVictoria3130001j000000eKhoRAASMap To Existing Company ID 
18000009Suite 52-6 Albert StBlackburnVictoria3130001j000000eKhoRAASMap To Existing Company ID 
18000009Suite 52-6 Albert StBlackburnVictoria3130001j000000eKhoRAASMap To Existing Company ID 
18000009Suite 1128 Jolimont RdEast MelbourneVictoria1111 Create New Company
18000009Suite 52-6 Albert StBlackburnVictoria3130001j000000eKhoRAASMap To Existing Company ID 

 

 

Looking forward to your help 

Regards
Masond3

 

5 REPLIES 5
RaviP
8 - Asteroid

Interesting problem @Masond3.

 

Let me know if the attached solution would help.

 

RaviP_0-1618938728599.png

 

Ravi

Masond3
8 - Asteroid

@RaviP 

Thank you for taking your time to have a look at this. 

 

Whilst checking i have found some items;

 

1) An advisor can only ever be associated to records where level = "Office". In the final output we currently have;

 

Helper = "Map to existing company id" 

Company id = "0013a00001ndVPtAAM"

Level = Company  

 

when it should be 

 

Helper = Map to existing company id" 

Company id = "001j000000eKhoRAAS"

Level = Office

 

2) I need another column which will be the Parent Id (Level = Company) of the Office 

 

For example advisor practice id 18000009

 

Helper = Map to existing company id"

Parent Id =0013a00001ndVPtAAM

 

Helper = Create new Company

Parent Id =0013a00001ndVPtAAM

 

I like what you have done with the concatenation of address , as addresses can be tricky, do you think we should enhance and run a fuzzy matching logic to find address matches and set a threshold ? 

 

For example 
Lets say in the company input file i have the following ;

 

126 Jolimont Rd

East Melbourne

Victoria

1111

 

and in the contact file i have; 

Suite 1 

128 Jolimont Rd

East Melbourne

Victoria

1111

 

We currently doing a concatenation  of the full address and doing a join. As these 2 records dont match it would , it wouldn't return in the result set. If we applied a fuzzy match, you may find that we have a 98% hit rate, and we should join these two records together as they are pretty similar 

RaviP
8 - Asteroid

Hi @Masond3 

 

I haven't really used the fuzzy match. I've tried to see what I can do with the example you gave me. It works even if there's a null value in building. Not sure if this will work if there missing values in other columns.

 

Don't think my solution is particularly effective, but it works.

 

Regards,

Ravi

Masond3
8 - Asteroid

@RaviP  - I tried to understand your flow and i am little confused. 
How do you ensure you are only comparing the child records (offices) for a given parent (Company)  and not the entire data set ? 

RaviP
8 - Asteroid

Hi @Masond3 , apologies for the delay. 

 

I've tried to answer your and added a few comments. Let me if this is fine

Labels