title: How to link telegram button with functions in dialogflow?
body: <p>I have 2 functions called searchHSCODEfromDB and readIncofromDb. searchHSCODEfromDB helps me retrieve a HS Code when I key in the HS Description as well as stores for me everything that the user keys in, in my database collection called 'StoreHSDesc'. readIncofromDb lets user types a question. if the database has the answer to the, the chatbot will display the answer. However, if it doesn't, it is suppose to store in a database collection called 'StoreUnans' but it doesn't and stores into 'StoreHSDesc' instead. How do I ensure that whatever is not found in the readIncofromDb function goes into the 'StoreUnans' database collection and whatever found in the searchHSCODEfromDB function goes into 'StoreHSDesc'</p>
  <p>Oh, and I'm also using firestore firebase **below is not the full entire code but just a snippet of adding into the collection</p>
  <pre><code>// Get the value of 'entry' in the document and send it to the user
  return searchHSCodeQuery.get().then(HSCodesnapshot =&gt; { 
   
  if(HSCodesnapshot.empty){ 
   
    //db.collection('UnfoundHSDescription').add({Unfound_HSDescription: hsdescription});
    db.collection('StoreHSDescription').add({Searched_HSDescription: hsdescription, DateTime: datetime, Found: 'No', HS_Code: '0'});
    
    agent.add('No HS Code found'); 
    console.log('No HS Code found');
  
  
  //get the value of 'entry' in the document and send it to the user
  return incoRef.get()
    .then(doc =&gt; {
    if (!doc.exists){
      db.collection('StoreUnAnsQues').add({DateTime: datetime, question: Incoterm});
      agent.add('No data found in the database!');
  </code></pre>