I differentiate between an Item Link and performing a Lookup search for a cue string.
The Item Link of a document in a DEVONthink database is a unique identifier of that document. With the document selected, the menu command Edit > Copy Item Link will copy that identifier to the clipboard. From the clipboard, it can be pasted into a rich text document that results in inserting the Name of the document as a clickable link to the document. Clicking that link will result in opening the document within DEVONthink.
In the case of PDFs, there’s a related Page Link. Control-click (right click) on any page of a PDF and choose the contextual menu option, Copy Page Link. This will copy the Page Link to the clipboard, with the result that a clickable link can then be pasted into a rich text document, and will be displayed as the Name of the PDF. Clicking on that link will open the PDF and scroll to the designated page in DEVONthink. A Page Link can be useful in one’s notes, as it will take the user to the page location from which an excerpt was copied, for example (but not to the location on that page from which the excerpt was taken).
Item Links work for documents of any filetype, while Page Links apply only to PDFs.
As my databases contain documents of various filetypes, I often use cue strings to designate the location in a document that can be used in a Lookup search to take me back to the source location in the document from which an excerpt was copied, or to which my note refers.
I find it easy to designate a string of text as the cue string, that will result in very few results in the resulting search list. Ideally, there should be only two results: my note, of course, and the specific document to which I wish to refer.
To use a cue string, I select it in my note, Control-click (right click) on the selection and choose Services > DEVONthink Pro Office: Lookup…. The search results list in DEVONthink will of course include my note itself, and one or more other documents in the open database(s) (depending on whether Search is set for one one database or all open databases). Selecting any search result will open the document within DEVONthink and, if possible, scroll to the first occurrence of a highlighted search term.
Note that, unless the selected cue string includes quotation marks enclosing it, and the selected string includes the quotation marks, the search is not an exact string (phrase) search, but will include all the documents that contain the terms included in the search string, not necessarily in that precise order. Depending on the terms included in the search and my database contents, a Lookup search that’s not based on an exact string (phrase) search could yield far too many results to make it easy to find the one document to which I want to refer.
In the latter case, the solution is to modify the DEVONthink search by adding quotation marks before and after the query string (in the Search window query field), then repeating the search. If my cue string was a good one, I’ll expect to see very few results this time, and hopefully only the minimum two results—my note document and the document to which the cue string was intended to refer.
You may find some tips about automating such procedures on the forum. Personally, as my workflows tend to require most of my time in thinking rather than in repetitive procedures, I wouldn’t derive much benefit in automation for these particular procedures.