title: how to write or set parameter value from fulfillment in dialogflow
body: <p>Basically I need to be able to write a result from fullfillment to a previously defined dialogflow parameter.</p>
  
  <p>I can receive the values of the variables from dialogflow to fullfillment, but when I write back I do not get the expected result. An example of the function is the following:</p>
  
  <pre><code>function Validate(agent){
      let P1 = agent.parameters.rut1.Rut; //&lt;&lt;----received OK
      let P2 = agent.parameters.rut1.dv;  //&lt;&lt;----received OK
      let P3;
  
      P3 = some_function(P1,P2); //&lt;&lt;----------For example
  
      agent.parameters.next_state = P3; //&lt;&lt;---here the result is not written to the parameter.
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/C1pao.png" rel="nofollow noreferrer">enter image description here</a></p>