Dragging in LinkedIn Profile URLs - Duplicate detection?


(Ian Goldsmid) #1

Hi

I’m building a large quasi CRM system in Tinderbox - it will comprise hundreds or maybe thousands of LinkedIn contacts. I am using the public URL, which is a permanent unique URL - whereas if you find a profile via a search or other routes, the URL for that same Profile will always be different.

My question is if I were to drag in, for example, https://www.linkedin.com/in/iangoldsmid/, and it was already present, may be added some weeks previously but I’d forgotten, is there some way Tinderbox can alert me, in ‘real-time’, to it being a duplicate?

Many thanks,

Ian


(Paul Walters) #2

I don’t know about “real time alerts” (which can be tricky), but you can use Attribute Browser, or columns in an Outline view, to show the URL attribute you are using, and then sort and inspect that view for dupes.


(eastgate) #3

Attribute Browser is your friend here, especially as there (a) might not be much harm in tolerating duplicates for a day or two, and (b) it’s pretty easy to scan an attribute browser list for duplicates.

But, let’s say you want to detect duplicates. Let’s do it with some agents. First, we gather all the profiles.

name: /all profiles
query: $Prototype="profile"
sort: $URL

For the sake of argument, we’ll assume that two profiles are duplicates if they have the same $URL. Now, we’ve sorted the aliases inside the agent all profiles by URL. Let’s make a second agent that detects duplicates:

name: /duplicates
query: inside(/all profiles) & $URL==$URL(previousSibling)

This finds notes inside the existing agent in which the URL is the same as the preceding URL; since that agent is sorted by URL, those are duplicates.

Finally, if we want to know right away when an agent finds a duplicate, we could use some sort of dashboard relay:

name: duplicate alert
prototype: dashboard
rule: if($ChildCount(/duplicates)>0) {$Subtitle=$ChildCount(/duplicates);$Color=red;} else {$Subtitle="";$Color=;}

This turns the dashboard note red, and repeats the number of duplicates in the subtitle. If you really wanted to be notified, you could get your Tinderbox document to complain

speak(“There are duplicates! Oh dear!”)

or make a sound

play(“Morse”)

or send you a Tweet

twitter(“example”,"@example! You’ve got duplicates!")


(Pat Maddox) #4

Unfortunately no. My approach to this is to have an inbox, and then a stamp that processes individual notes. Something like:

var myID($ID);
var myURL($URL);

if(find($URL == myURL & $ID != myID)) {
  $Badge = "x";
};

which will assign a red “x” to any notes that I stamp that have a URL matching one elsewhere in the document.

You could also move new unique notes into a “Contacts” container and duplicates into a “Duplicates” container for manual processing:

var myID($ID);
var myURL($URL);

if(find($URL == myURL & $ID != myID)) {
  $Container = "/Duplicates";
} else {
  $Container = "/Contacts";
};

If you have a bunch of existing notes, or you just want to be certain that you’ve found the duplicates, you can run this stamp on all the notes. Then set your “Duplicates” container to sort by $URL ascending, $Created descending, and you can work down the list. Using TB’s column mode in outline view, or Attribute Browser here will come in handy.


(Ian Goldsmid) #5

Thank you!

Since I am a Tinderbox newbie, and also have zero experience creating/executing scripts - although to my credit I do have a technically capable brain and am a quick learner - and I don’t want to bother you with likely pre 101 stuff about this, can you indicate where I can most quickly understand how to apply this kind of scripting/coding in Tinderbox?

Many thanks


(Mark Anderson) #6

Take a look at the two PDFs accessed from the Help menu: “Getting Started with Tinderbox” and “Actions and Dashboards”. For reference on what operators are available, see my aTbRef resource.


(Ian Goldsmid) #7

thank you, much appreciated!


(Kay Krämer) #8

Where can such actions be performed? These are not TB actions but OS actions, right?


(Mark Anderson) #9

No, they are actions: see String.speak(), play(), twitter() and notify().

$Text.speak();

Will read the selected note’s $Text in the OS default voice.

See also the Tinderbox Help article " Notify, Twitter, Speak, and runCommand"