Using Apply rules step in custom bots to tag conversations based on specific keywords

  • 6 April 2023
  • 3 replies
  • 118 views

Userlevel 1

Hello Intercom community,

 

Pavel here, Engineering manager from Automation group here at Intercom. 

 

We recently shipped the “Apply rules” step to our Custom bots. This step is essentially a “case” statement that allows to apply multiple sets of actions based on specific conditions for each set.

What I wanted to share in this post is how well this step handles a very popular use case of tagging conversations based on keywords.

Before this release you could do it only in Inbox Rules, and you had to create a rule per each keyword. Now you can do the same work in custom bots using just one bot.

Here’s how it works: 

  1. Go to custom bots and find “After a customer sends any message trigger”

BooN-IADzmGncmkPDO9-Zy0RXeJuXz_IJVVeURTRZzkE83SEdtkMKCoV2XKEWk-u3_8MOzb0oXHQWPfw69eKOQha8jgVPoCYoTNyAE1EccnBTj4Na0FahzQZv0n8GzUtzFXuwkeAB_vLBXfqO_Jksxo

 

  1. Add the “Apply rules” step​

​​​​​​BDqZC_Ygo_5zxA_EsVhTb248qeKpDlrrrlbbpFZ88we0hct_LH9DjY07xvXCP0FVGP95zERS92TmZvYM8BrfofBibNBqDUiFNH2q6MCqol-REYSOqhTJpLHU3AjwW0utlH7-YWRXXCjK5yQn4wBCOM8

 

  1. Set up keywords/tags pairs

L3PdBrQU_2MAq5_fHn2sjOeCbKLJ4ReAlzjOAyemTmRyjIPOVBZJIhfITeLAvqzyMTJqXF9CQSTC5f_pGpds4URqyHAnGQrWl516luSZ0D36Tp4RWFUtnanq6LvMkX8_eIRXPWLBAPbIhzXqyZN_BMY

 

  1. Set your bot live!

 

Hope it helps!
 

Cheers,

Pavel


 


3 replies

Hi Pavel. 

quick question: i am trying the Apply Rules feature in my custom bot but i’m at a dead end. The rules that I am trying to do is simple:

the custom bot will answer users that dont want to go to their shift.

if the user has rating below 2 then custom bot will say “you will be deactivated” 

else if the user has rating above 2 then custom bot will say “sorry to hear about that”

 

however, this is what i got:
it showed both conditional statement.

 

here’s what my custom bot look like:

 

 my bad, that was the wrong screenshot. this is the correct custom bot set up:

 

 

 

Userlevel 1

Hi Leo, second screenshot that you shared looks right for your use case.

Reply