Null values for system entities - dialogflow-es

I tried an example in api.ai, with reference to the Beginner's Guide, I am attaching error response as a screen-shot. I was expecting to get the values of marked intents.

The problem is that, somehow, you have "tomorrow" associated with a city entity in the first example phrase (the purple color matches the #sys:geo-city-gb entity). Because of this, it is looking for a phrase "Can I know available slots for somewhere" where the somewhere should be a city name. But "tomorrow" is not the name of a city, so it doesn't include that.
Since neither parameter is required, but it has a pretty close match, it is able to match the intent - but none of the parameters fit, so they're all left empty.
You should be able to delete this and re-type "tomorrow" to change it back to a #sys.date entity. Or add additional phrases which match it against a date.

Related

Saved Search criteria/results seem to have a different naming scheme from everything else

I'm trying to find a resource or explanation for how to determine how a field will display in the criteria or results dropdown of a saved search. For instance, in the results I would like to see the PO# field (fieldId:otherrefnum). But when looking through the drop down, I see neither of these as options. This has been a serious source of frustration for me with many other fields, I'd like to find a definitive way to avoid wasting time on this in the future.
Thank you!
There are a number of contributing factors to this.
The field names you see on forms may have been re-labeled by form customizations
Netsuite normalizes transaction searches to which leads to some (IMO) odd column name re-use.
A lot of old fields or fields tied to functionality (e.g. transaction status fields) don't follow the regular pattern of numeric id and text name.
The records browser helps quite a bit. You can search here and see that otherrefnum is named 'PO/Check Number' in the search editor. (An example of field name normalizing referred to above)
If you look at transaction you'll see it is just search filters and columns. If you compare to Sales Order you'll see something perhaps more familiar in terms of fields.
Even armed with the records browser experience is still needed. e.g.
A sales order has an items sublist and one of its fields is itemtype. In order to get that value in a search you need to select Item fields and then choose Type. A Sales Order's items.description column becomes the line level memo field in search results.
Hope this helps

When one field doesn't equal another field then show a completely different field

First time asking a question and have learned a lot from this forum. I work in a weird industry and we are using NetSuite. I am having a hard time coming up with a criteria or formula for what I am trying to do. On any sales order we have the Business Source who could be the listing agent or the selling agent for a property. The business source is not always the listing agent or always the selling agent. So I am trying to do a search where (excuse the bad coding example):
If business source is the listing agent, then show the selling agent
If business source is the selling agent, then show the listing agent
From a sales perspective, we want to reach out to the other agent, even if they didn't direct the order our way, and thank them for working with us.
I hope I was somewhat clear...and thanks in advance!
Add a line in the Results tab and select Formula (text) under the Field column. In the Formula column add:
CASE WHEN {custbody_business_source} = {custbody_listing_agent} THEN {custbody_selling_agent} ELSE {custbody_listing_agent} END
You will need to replace the fields in braces {} with the correct IDs for the fields you're using. I have assumed that these fields all pull from the same list of records (contacts or customers) for the information they contain. It probably won't work, for example, if one is a select (List/Record) field and the others are Free Text. This simply compares the Business Source field with (arbitrarily) the Listing Agent and returns the Selling Agent if there's a match, otherwise it returns the Listing Agent. Note that this means the Listing Agent will be returned in any other circumstances also; for example if one of the compared fields is empty.
You could match the Business Source against both the agent fields explicitly and return some other value when neither match by extending the CASE statement a little:
CASE WHEN {custbody_business_source} = {custbody_listing_agent} THEN {custbody_selling_agent} WHEN {custbody_business_source} = {custbody_selling_agent} THEN {custbody_listing_agent} ELSE {somethingelse} END
or by using a DECODE instead:
DECODE({custbody_business_source}, {custbody_listing_agent}, {custbody_selling_agent}, {custbody_selling_agent}, {custbody_listing_agent}, {somethingelse})
DECODE has the following signature:
DECODE({expr}, search, result, [search, result]..., [default])
It compares expr with each search value one by one. If it finds a match it returns the corresponding result. If no match is found, the default is returned, or null if default is not specified.

Multi LookUp - Check for unique values

I´m trying to set up unique values in my PowerApp-Form. The data is stored in a Sharepoint list. I have a column called watches, items in this column have a unique number, which have to be unique. People can pick multiple of those watches in a LookUp-field. But before submitting the form, I need to check if those picked values already exist in my list and at least display an error message.
I have setup a regular text field and added following rule to it:
If(LookUp(MyList.Watches;DataCardValue4.SelectedItems.Value in Watches;"OK")<>"OK";"No Error";"Watch already exist")
DataCardValue4 is my LookUp field, where people can pick those watches. With this rule I want to check if a item already is in my column watches and let my text field display the error. Somehow the rule doesn´t work.
Can you tell me how I compare multiple lookup choices to my table/column entries?
The first parameter to the LookUp function should be the table (SharePoint list) rather than the column. So the first parameter should be 'MyList' rather than 'MyList.Watches'. Also, I'm not sure that the formula provided (second parameter to LookUp) will work. In your formula, you will be looking for multiple items (DataCardValue4.SelectedItems.Value) within multiple items (Watches). Perhaps you can update your app to have users only pick one watch value before submitting?
One last thing to note. I'm not sure how big you expect your SharePoint list to get, but I would highly recommend keeping your LookUp formula within the bounds to support delegation. More specifically, SharePoint has different formula requirements than other connectors. For example, you can use '=' in your formula, but not 'in'.
Your new rule might look something like below. Please note that it could have syntax errors and might not even be delegable in it's current form since I am providing the rule with no checking. Also, I switched from using LookUp to using Filter instead just because I'm more familiar with Filter. However, both functions are very similar.
If(CountRows(Filter(MyList; DataCardValue4.Selected.Value = Watches)) > 0; "Watch already exist"; "No Error")

Entity detection from sentences differ in training and testing sentences

Entity detection is working fine while training the phrases i.e the words of interest (entities) are highlighted when the sentence is being added as a training sample, but when the same sentence is tested , the entities are not selected.
If we look at example attached, the entity
price of property
was automatically selected during training but was empty/not detected during the test.
Please check if the value / entry "2 crores" is not duplicated in "price of property" entity.
In order for a reference value to be matched, it needs to be included as a synonym itself. When you first enter a reference value, it will be automatically added as a synonym. If for some reason this is removed, make sure to add the original value as a synonym so it can be matched.

Two or more identical parameters in one sentence

I have a dialogflow intent which includes different parameters.Shown as below:
1.png
I set generic "number" for all number parameters such as "Years to Average Principal" and generic "percentage" for all percentage parameters.Like this:
2.png
When I say something like "Change vacancy rate to 56%" or "change Years to Average Principal to 5", it works well.But when I say a sentence which includes two or more parameters with same type, it sets the first value for all parameters.I used the "Change depreciation percentage to 30% and down payment to 45%" phrase and the result is following images:
3.png
4.png
As I have to use only one intent and one action,would you please help me what should I do to have separate values for different parameters?
I hope I could make it clear. Thanks in advance,
Good try using the "is list" setting for a parameter! Unfortunately, you only set it for one of the parameters, so it treated that as the list and then used the first matching value for the other parameters since both matched the rule for percentage. If one was for percentage and the other for currency, it might have worked better, but probably not.
Two (untested) thoughts about how to get this to work (and it is a good attempt to solve the problem of entering multiple values at a time):
You can try to see if setting all the other parameters as lists will work as well. But this still might have the problem of setting one parameter to a number and the other to a percentage.
Look into Developer Composite Entities. This will let you create a composite entity that contains both the name and value and treat it as a single Entity. Then you can specify, in your sample phrase, that you will accept a list of these Entities.

Resources