Sending Slack message based on a condition

Hi!

Objective: Kanban app sends automated message to a Slack channel when a new order for a specific item is placed in the app. By the “specific item” I mean that it only sends a message when the Item P/N matches the predefined condition.
As a background information the kanban app is from the library with some slight modifications.

Current situation: So far I have successfully set up the Slack connector and tested it with an expression containing static text.

Problem description: I am lost with setting the “IF” condition for the action and with adding the variables to the message expression.
My logic says that for the IF condition, I would need to check the Item P/N value (that was stored with the previous “Place order” trigger) and match it with a defined value(s).
My second problem with the variables in the message is that I don’t know which variable I would need to use there (from which table).

Please let me know what other information input is needed to guide me in the right direction.

Thanks!
Erik

Hi @erikpets, thanks for your question. I want to ask one clarifying question to make sure I understand the issue you’re having before offering any suggestions. Can you tell me if this accurately describes the problem you’re having:

Your PLACE ORDER trigger stores a P/N value, and that value is required as a lookup key to get the values you need to load in the Slack message. You’re struggling because P/N is not the ID, and you can’t pull reference values from a table without an ID.

If this is the case, then there’s a simple fix, so please let me know if I understand you correctly.

Hi @John and thanks for the reply. Your problem description is correct. The P/N value is the lookup key, and I need to look it up from the PLACE ORDER trigger transaction that was just completed. So I guess I need the PLACE ORDER transaction unique ID to do that?

@erikpets, this is how I would approach the problem as you’ve described it. Let me know if this is what you’re looking for!

Thank you so much for the thorough explanation and taking your time to make it into a video. I will need some time to wrap my head around it to fully understand what you did there. Will update soon if I was able to do this.