Unable to add data to data table via an Entity Node

Hi,

I’m trying to add data from an entity node that I’d created. I’m trying to add the responses of the user to a table, but can’t seem to get it to work.

While in the service node I try setting up the {{context.entity}} parameter as seen in the image below, and get an error response:


Then I change the parameter to {{context.[name of the entity node]}} and get a response… But it doesn’t show any added data:


Am I adding the parameter incorrectly to add data to the data table?

Hello @rwhite,

You are getting an response error because we are mapping the values to context data. Without an active session we wont have context values. So if you configure as per first screenshot and test within the service node it will throw error.
If you really want to check whether your service is work give the static values and then test it and check it in the table data whether data is being stored or not. once you have ensure it works, you can change to the context placeholders - the first screenshot shows the correct configuration.

So I added the static entry to the value and got a response from the test.


And then changed it back to the {{context.entities.entity0004}} parameter and got the error. Meaning the service node does work, but not with the syntax above. Which makes me wonder, when you say active session, what do you mean? Does the bot have to be published? Please explain

Hello @rwhite ,

As explained earlier, a session and context data needs to be generated for the syntax to work.

This can only happen if you are talking to the bot in builder chat or channel. Try to chat with bot in builder once dialog task is configured, instead of testing in service node itself. It should work.

Alright, I’ve tried testing outside of the service node here:

Where do I go next to see the “Happy” response in the table?

Ryan

Ryan,

Try exiting the bot and go to the Data tab, assuming that’s where you’re trying to save the data.

Cheers,
Gurpreet

Hi, just following up on this question. Like I’d said, I started the bot outside of the service node, and looked to see if any data was collected after the user’s input.

Here’s my output from the data table API:

This is the full output of the query being run:

{
    "hasMore": false,
    "total": 0,
    "metaInfo": [{
        "name": "FeelingsResponse",
        "type": "string"
    }, {
        "name": "VideoJoy",
        "type": "string"
    }, {
        "name": "SoundJoy",
        "type": "string"
    }, {
        "name": "ImageJoy",
        "type": "string"
    }, {
        "name": "LastName",
        "type": "string"
    }, {
        "name": "FirstName",
        "type": "string"
    }, {
        "name": "sys_Id",
        "type": "string"
    }, {
        "name": "Created_On",
        "type": "date"
    }, {
        "name": "Updated_On",
        "type": "date"
    }, {
        "name": "Created_By",
        "type": "string"
    }, {
        "name": "Updated_By",
        "type": "string"
    }],
    "queryResult": []
}

Any help would me very much appreciated.

Thank you,
Ryan

Hello @rwhite ,

What is the operator you have used in the API. Also, try removing the sys_limit and then execute the API.

Even with this if the results are 0 then we will need to verify if the service node executed correctly. To verify that, check debug console while testing in bot chat window. You should find the status as shown below:

If it shows 400 then the service node failed to update the table. Detailed reason can be found from Analyze section- NLP metrics - Performance.

Hope this helps!!

Just removed the sys_limit and the operator is set at ‘or’ and am still getting the 0 results. However, I went into debug and got this response.

As you can see the “FeelingsResponse”:“Happy” response, which is what I was hoping to see! So that is cleared up.

Still concerned why I can’t see it in the API Table query response.

Ryan

Hello @rwhite ,

In the payload data we do not see the Payload - Firstname and Lastname values. Could it be that the values are not captured as part of the payload. That is once issue.

Try filtering through FeelingsResponse or other fields and let us know if the API still returns empty.

This has been resolved. Thank you for all your diligent help everyone!