Why Foursquare venue search api omits some results when using parent category id but shows them when child category id is used? - foursquare

I'm trying to narrow down foursquare venue search api results by specifying category ids.
when I try a parent category id like "Food" with id 4d4b7105d754a06374d81259 the result does not contain some of restaurants with child category id "Fast Food Restaurant" with id 4bf58dd8d48988d16e941735" but when searching with child category id omitted restaurants show in search results.
I think when a parent category id is specified the result must contain all results with all child category ids? is this true or I'm missing something?
thanks
edit: setting intent = browse seems to solve my problem.

edit: setting intent = browse seems to solve my problem.
Yes, you should set intent = browse because default value is checkin.
checkin finds venues that the current user is likely to checkin to at the provided ll, at the current moment in time.
browse find venues within a given area. Unlike the checkin intent, browse searches an entire region instead of only finding venues closest to a point.
See also https://developer.foursquare.com/docs/api/venues/search

Related

How to pass value from one intent to another in bixby

My app is giving user types of news based on the input. For ex: If user is saying what is happening in sports, so I give user sports news in the form of compound card. Now if user is saying that "Show me similar news", so all i need to do is pass the category id of that news to my other file and process that category id to get more same type of news. I am unable to pass the category id.
My news details file is NewsSearch.model.bxb and input i have taken is categoryName, which I convert into id and pass it to my api.
My similar News file is SimilarNews.model.bxb and input is categoryId, which I am supposed to pass to my api to get the same category news.
How to pass categoryId from NewsSearch.model.bxb to SimilarNews.model.bxb?
This is similar to a Continuation. If NewsSearch concept is not marked as transient, you can create an Action SearchSimilarNews that will take NewsSearch as the input. Since this is a followup query, NewsSearch will be available to the Planner from a historical perspective and will therefore be automatically passed into the input.
You may want to look at the Continuation sample capsule for more ideas https://github.com/bixbydevelopers/capsule-samples-collection/tree/master/continuation-for-training

Dialogflow: Determine product name or Select a product from a list which are fetched using a webhook

I am trying to build a bot(custom UI in my website) where a user will enter a product name to view the details of it and I will provide a link to the product full details page. I have a situation where if the user enters a name and there are multiple results from my database, I want to show him those products as quick replies so that he can select one from them.
How do I recognize that the user has entered the product name and anything else? I can use #sys.any, but all small conversation will also go there, which will be of no use.
The same problem occurs when I display him a list of products with matching name. But now when the user clicks on any of the button I am taking him to a custom follow-up intent where I have entered the template for a product entity. But, dialogflow only recognizes the products that have been defined in the entity(listed few products and checked auto expand).
I have tried using #sys.any instead, but the intent is called for any string the user types in. Lets say, the user does not respond and after a while he types in "hi", my intent with any is being called. How do I overcome this situation?
So far as I understand, I can see two ways to solve this query. First, using an entity & defining your product list over there for bot to understand user responses (which you have done) but this will become an overhead when you have a list of say 1000/more products. Second way, you can continue using #sys.any & define a parameter, write a webhook where you validate user entered response to product list in database & check if it is present over there, if yes, show product details or say, entered response is incorrect.

Can I get list of all categories that foursquare API could return to me?

Can I get list of all categories that foursquare could return to me ?
https://developer.foursquare.com/docs/responses/category.html (link to category object description)
I know that the new categories could be created, and some deleted. But I just would like to prepare my app to be able to handle some categories in special way, and I need to know in advance what they could be.
Thanks for time in advance.
This should include all possible Foursquare categories. It's this endpoint: https://developer.foursquare.com/docs/api/venues/categories
Foursquare also provides an up-to-date category hierarchy without using the API. Useful if you just want to take a look at the list without doing a call.
Interestingly on that page, they also provide "Supported Countries" where the category "can only appear on venues in those countries".
https://developer.foursquare.com/categorytree

Foursquare get venue details

We are planning to use foursquare api to get venue in a particular city. I want data of all the food outlets in a particular city. I have managed to get the categories list but not sure how to get venues from that particular category in a particular city or area.
Please share some tutorials or document which i can check out.
One way of doing what you want will be using the Venues Platform for browsing according to a category ID.
Look at venue search API reference.
Example of using it:
I know that 4bf58dd8d48988d11f941735 is nightlife (just picked the first one I saw)
So I will call the API (the ll is someplace in New York):
https://api.foursquare.com/v2/venues/search?ll=40.7268,-73.9972&categoryId=4bf58dd8d48988d11f941735&limit=50&intent=browse&radius=1500&your ids/oauth
Or use the explorer to see results right away.
Important, read the search API and the parameters used here to alter behavior to your needs.
Another very important thing, the API parameters are case sensitive!! (so if they want categoryId, categoryid will not work :) )

How do I modify the Magento Search to check child skus?

Currently, the site search will search all of the skus of the items marked as being visible in search. This is all well and good.
The problem arises when the customer knows a sku of the individual child item. So, let's say a product comes in both a 20 foot and 25 foot variation. We would put those into a configurable product and have a single product page where a customer could then choose which of those two lengths.
What happens is, a customer invariably knows that the sku of the 20 ft variation is RDB-20, while the other is RDB-25. A search for RDB-25 then, comes back with no results since the simple product is not visible in search - it doesn't realize there is a match.
How do I get the search to search an item with visibility "Not Visible Individually", when it's parent is visible in search?
The desired effect is that, if a child SKU is searched for, the parent should show up in the results.
There really is no good way of doing it without extending the default search, but at that point you might as well look for other options.
Here's a workaround that might be doable depending on how you manage your products and it worked for me until I moved on from the default search.
Rather than altering the search, try adding an attribute to all products and make it hidden concatenating all the skus into this field. The search should find the text attribute and show the configurable.
Its a bit of a workaround but works for me.
This is untested, but I did a bit of perusing in our attributes and I think I found something that might help.
Currently since our child products don't show up in our search, we have the parent populate with the children product's attributes.
However, things like brand, taxable amount, description, populate for every child product while our SKU does not.
The only difference I can see between the two attributes is under manage attributes -> click on attribute -> and then under properties go to frontend properties and select
Use In Search Results Layered Navigation: YES
Used in Product Listing: YES
Use In Layered Navigation: Filterable (with results)
I'm not sure which of these do what, but in the population of the fulltext search data table, somewhere it is being told to populate for the children and I believe that the admin panel is where.
I hope this helps!

Resources