Too much text for Dialogflow

(Felipe Marquardt) #1

Sometimes sellers and candidates for job interview just paste long text blocks in just one send of text to flow xo. I´m using Dialogoflow to respond, but for long blocks of text, the answer is empty.
Did anyone solved this issue?

(Daniel Beckett) #2

You could use the Text service which has an option for ‘Truncate Text’. This would let you break up the text into smaller chunks that Dialogflow can handle.

(Felipe Marquardt) #4

Thank you. It worked fine to apply case on name recevied from user.

But how do I use the truncate to make dialog flow undertand long text?

Using the truncate action, it asks the lengh. Must be a number of could the text be truncated at commas of periods?

(Karen Barker) #5

Hi @agenciaadd,

To use truncate this does need to be a number - you could truncate at the maximum number of characters dialog flow can accept. Alternatively you could use the split function to split the text at commas for instance. This will return a different number and length of strings each time. :slight_smile:

(Felipe Marquardt) #6

great. I´m trying to set this.
Can I set the split function to split on commas, exclamation mark or full stop?

My goal is to split when the user send something like:

Hello how are you? What´s you´r phone number?
or
I´m fine, thanks. What´s you´r phone number?

Since I´m sending to dialogflow, I think I could send separete phrases.

How do I send the string to Dialogflow ? I´m sending like bellow:

{
“query”: [
“{{catchall.message}}”
],
“lang”: “pt-BR”,
“sessionId”: “{{catchall.user_id}}”
}

(Karen Barker) #7

Hi @agenciaadd,

The split function only allows you to specify a single separator I’m afraid. This could be a word or a single punctuation mark, but using the split function you wouldn’t be able to list multiple different separators I’m afraid.

To send this you’ll just need to update the {{catchall.message}} output to use the output of whatever action you decide to use to shorten the text. :slight_smile: To access outputs just click the Flow XO icon at the right hand side of the input field and select the required output from the drop down list.