Finding Related Items with Pulse IDs

Hello, I have two boards: Customers and Jobs

Customers includes all of my customers
Jobs includes all of the jobs we’re working

Jobs has a “Connect board” column that links to the Customers board. This column contains which Customer the Job is for.

Customers can have many Jobs at any given time.

What is the best way to pull the Jobs for a specific Customer?

And can this be done in a single GraphQL query?

I can find my customer like this (Ex. the customer name is Jill Mahomes):

query {
    items_by_column_values (board_id: 123456789, column_id: "name", column_value: "Jill Mahomes") {
        id
        name,
    		column_values {
    		  id,
          value,
          text
    		} 
    }
}

The “link to projects” field looks like this:

          {
            "id": "link_to_projects",
            "value": "{\"linkedPulseIds\":[{\"linkedPulseId\":1308587615},{\"linkedPulseId\":1308587623}]}",
            "text": ""
          }

How do I then use the linkedPulseIds to pull my related Jobs? Can this be done in a single query or do I need some scripting to dig into the JSON, grab the IDs, then run another query?

Thank you!

@chadhutchins10
I always iterate through the linked pulse ids to get the details of the jobs. I don’t know of a way to include the linked pulse id information in the graphql call.

Sometimes I’ve had luck with adding mirror columns on the other board, if you just need 1 column. (it will come across as a different column, but this seems to be inconsistent from the API) so I almost always just end up iterating through the linked pulseIds.

maybe someone else has a more efficient method, as I’m sure thats not the answer you were hoping for.

Best.
Tim

hi @chadhutchins10

Few things here:

  • you can’t do this in one query, you need to get the linkedItemIds by decoding / parsing the JSON
  • I see the item is linked to two items. items_by_column_values requires a single search string (not an array of search strings)
  • items_by_column_values can only search in text or number columns, not the automatically generated pulseId column

Thank you @timlittletech and @basdebruin! This has been helpful. I was able to get it working with your help. Have a nice weekend!

1 Like

@basdebruin I’ve noticed the Item ID column type, despite what the documentation says, can be be used to search for a pulse. While this is silly since you have to have the pulse id to start with - I use it in integromat/make to get a single item and specify the columns i want values for. Because for some reason, the get item column value module only gets one column value but there is no module to get multiple columns from an item by item id (pulse id).

1 Like

@anon29275264

I like your creative solution to reading an items data.

However, there is another way. Us the “Get an item” module:


Jim - The Monday Man (YouTube Channel)
Watch Our Latest Video: Is the System Down or is it just me?
Contact me directly here: Contact – The Monday Man

However the “get an item” module returns all columns. When I dont need all the columns - especially mirror columns, that is a lot of extra latency and query complexity. If I only need two or three columns, i can use the search.

That said, I’m working on transitioning my work to AWS Lambda, so I can optimize the snot out of things with multiple operations in a single call (for example).

Get an Item does not provide any ability to specify columns (in Make.com at least, which is replacing integromat and you can’t sign up for new integromat accounts), and always returns all columns in my experience.

Search Items in the Board by Column Value does let you specify output columns.

@anon29275264

You are correct.

I have asked Make to enhance with a module that lets us get an item and specific columns though.

1 Like

For future reference.

If the link between the two boards is bidirectional:

Instead of searching the Customer ID in the Job Board (search item in board by column value), you can get the the item of the desired Customer in Customer Board and read all related Job-IDs