How to compare datatypes in a backend workflow?

Hi guys,
I have 2 datatypes i’d like to compare in a backend workflow. I’d like for the the client to be able to input their search requirements then it conducts a search on the backend and compares their requirements to another datatype to see if any of the data intersects.

I’ve looked at the backend workflows but can’t see how to do this logically.

Searches in backend workflows work just the same as on-page workflows…

Just send whatever search constraints the client enters into the backend workflow as parameters, then apply them in your searches…

So the client adds their list of requirements and it creates a datatype called “Client”. I’d like to compare that against another datatype and then produce a new datatype called “Lead” if it matches. The lead datatype contains the details of the client and the other datatype. I’m currently sending through this “Client” datatype to the backend but what workflow action do i need to run to make this comparative search?

If you want to create a new ‘Lead’ entry then use a Create New Thing workflow action to create the new Lead.

Put an ‘only when’ condition on either the action or the workflow itself, and apply the relevant search there.

I need to capture the data type on the other side of that search to put into the lead data type details. how can I do that?

I’m not entirely sure what you mean… but that shouldn’t be a problem (you can refer to whatever data you want in your ‘create a new lead’ action)…

Maybe you can clarify exactly what you’re trying to do, and which bit you’re having trouble with…

Sure :slight_smile:

I need to conduct the search first to find if there is a match, let’s call the other data type item. If there is a match, the item details need to be put into the new data type called Lead.

I just don’t know how to take the details from the “only when” search and put it into the lead datatype

Just do the same search again to get the relevant datatype when creating the new Lead

So i would have to do an “only when” search to initiate the creation of the lead datatype, then i’d have to do 2 nested searches for 2 seperate fields to get the details? Isn’t that a bit inefficient, is there a better way? @adamhholmes

I don’t know specifically what you’re doing, so I can’t answer specifics….

But you might want to check out the List Popper & Friends plugin… it gives you custom states on the backend, so you can set values in those and refer to them elsewhere in your workflow if you don’t want to have to do the same search more than once.

Just to provide more clarification, here’s what my workflow action looks like:
image

So the client and lead agent would be extracted from the “item” that it matched with. In order to get these i would need to do 2 searches in each field.

Actually scratch that mate, that list popper is amazing, thank you.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.