Question

New case -> slack message with one condition

  • 17 December 2020
  • 3 replies
  • 250 views

Userlevel 1

I have a zap that sends an auto-message to Slack when a new Case is registered. For this zap, I want to add a process so that it only sends only when the condition is matched. 

 

1.New Record in Salesforce
  Object: Case

2. Find Record in Salesforce (this is for convenience for process 4)
  Object: Account
  Find To Search: by Account ID
  Search value: Account ID
 3. Find Record in Salesforce (this is for convenience for process 4)
  Object: User
  Find To Search: by User ID
  Search value: Owener ID

4. Send Channel Message in Slack
…showing a new case is created and the case is associated to the Account.

Between 1 and 2 (or 3 and 4 maybe?)  , I want to set the condition so that it will look into Account with a certain field is “A”. In Account, we have a field with API name of A_B__c. I want to send it to a Slack channel called # voice A.

In the same manner, If the case belongs B group, I want to send it to a Slack channel called #voice B.

 

I tried Find Record by Query in Salesforce using the following set up action.
Salesforce Object: Account
WHERE Clause: A_B__c=’A’

In that trigger, test was succesful (it brought a sample of A group)

 

However when I tested the whole thing, it did not come out how I expected.. (duplication of message, brought different Account name...etc) Without the Action, Send Channel Message in Slack works correctly.

 

Can anyone give me advice for me please?


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Help article about Salesforce QUERY: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm

 

Help article about Salesforce Search in Zap: https://zapier.com/help/doc/tips-and-tricks-salesforce-triggers-and-actions#using-the-find-object-by-query-search

 

How search actions work

Salesforce search actions return the most recently created record that meets the search criteria, even if there are multiple records that match.

Userlevel 1

Thanks @Troy Tessalone I will learn from those sites you shared.

As long as I set WHERE clause correctly in my zap, when a new record is found (process 1), I get a slack message (process 4) only when the condition is maches as specified in the WHERE clause. Correct?

Funny (maybe too basic?), but no website I can find where it explain what Using the Find Object by Query Search does..

Userlevel 7
Badge +10

@chika.o 
Just checking in to see if you still need help with this?