Skip to main content

I am attempting to create a bot that both makes product recommendations, but also addresses customer support issues by creating Salesforce Cases. I’ve leveraged the Knowledge Source feature to provide all of the recommendation data, and it’s working incredibly well - it’s even fun to use!

I’m struggling on the support side though - I’m not sure if it’s because I am learning about effectively writing directives as I go.

This data collection (to me) is effectively the same as collecting a lead.  For this reason, I am currently leveraging the Collect Leads action, and I’ve added the fields I want to collect (same as the default with the addition of a Description field). Frankly, it works pretty well - it collects all of the information, and I have a Zap triggering off the Collected Data, doing some light data transformations and sending to Salesforce.

It’s just not very intuitive from the user’s perspective and I’m struggling to fix it (if it can be fixed) using the Directive.

  1. If this is even possible, how do I instruct the bot to ask 1 question for one piece of data?  Currently it will say something like “provide your name, email, phone, company etc” all in one question.  I really want it to ask 4 separate questions, repeating questions if it can’t automatically parse the user input correctly.
  2. If this is even possible, how can I instruct the bot to not re-ask for specific information?  For example, if the chat contains two user reported “order problems” I’d prefer to not ask the same user twice for their name, email, phone and company - but rather just their new problem statement.
  3. Is there a better way to solve this than using the “Lead Collection” action?
  4. Lastly - I am leveraging querystring parameters to pass in certain data.  For example, Name and Email is available via {{params.name}} and {{params.email}} respectively.  Is there a proper way to inform the chatbot to use these parameters for the lead collection, and only ask if they aren’t provided?

Hey there, @devinmcbride! 👋 

 

If this is even possible, how do I instruct the bot to ask 1 question for one piece of data?  Currently it will say something like “provide your name, email, phone, company etc” all in one question.  I really want it to ask 4 separate questions, repeating questions if it can’t automatically parse the user input correctly.

I did a quick test with a chatbot and was able to get it asking for each detail separately by adding these additional instructions in the #Other Rules section: “- when collecting the name, email, phone and company information at the start of the chat first, ask for each piece of information in a separate question. For example, first ask for the name then once they have provided that ask for the email address and so on.

That instruction resulted in the following:
898a83d7c56c819f16d74af16699e427.png
 

If this is even possible, how can I instruct the bot to not re-ask for specific information?  For example, if the chat contains two user reported “order problems” I’d prefer to not ask the same user twice for their name, email, phone and company - but rather just their new problem statement.

If the chat is re-started then I don’t think it would be possible to prevent the chatbot from attempting to collect the person’s information again. In the directive you could tell it to ask the user whether there are any further issues to report and to store any subsequent details in a “other problems” field? perhaps? Just thinking that might allow you to capture details for multiple cases in a single conversation?

Is there a better way to solve this than using the “Lead Collection” action?

I don’t think so, you’d need the lead collection action to collate the information.

Lastly - I am leveraging querystring parameters to pass in certain data.  For example, Name and Email is available via {{params.name}} and {{params.email}} respectively.  Is there a proper way to inform the chatbot to use these parameters for the lead collection, and only ask if they aren’t provided?

If those parameters are successfully passing the details to the chatbot then maybe you could add an additional rule to the directive to ensure that it only asks for the information it doesn’t already have.

Can you give the above a try and let us know how you get on? 


@SamB you are amazing, thank you! I’m learning as I go, but this is going to make for a much better customer experience for those interacting.  Thank you for taking the time to document this.


You’re most welcome, @devinmcbride! 🤗 

I’m so glad that was useful. Happy to help if you run into any further issues or questions at all. But for now, happy Zapping! ⚡️