How to show variable's value in Dialog Name (Einstein Bot) - salesforce

I need to show the Product's Name in the Menu, I think image says it all:
Click here to see the image
I have a menu, with two options, and the first show a text with a variable, but {!Product} don't works, there is a way of this work?
When I put {!Product} in Message or Question, this works normal...

I didn't find any solution for showing the variable in the title dialog, my solution was to change the message to "Know more about this product", I left a generic message.

Old topic but the answer might help someone.
There's a great article explaining how to get some dynamic information https://www.infallibletechie.com/2021/11/how-to-create-case-from-einstein-bot.html
In your case, I guess you need to
Query your products (the out-of-the-box Einstein Bot query is simple and has a limit of 3 items but you could call a flow or apex to get better granularity on the filter/logic and control le size)
Store the query result in a Custom record list Variable
Query data with a flow
Use a dynamic question and merge fields to display what you want
Top configuration of the dynamic question
Down configuration of the dynamic question

Related

Outputting Stripe plan name via plan-ID using AngularJS ng-model two-way data binding

I am outputting form inputs on the final page of a checkout field, titled "Review & checkout"... on this page I display the plan the customer picked and the personal info they provided so far.
I have no problem showing fields like Name or Email, as the value inputted is being shown, as Angular displays whatever was in the value="" field of the input.
To display the subscription plan that the customer picked, it's trickier.
The value field is already being utilized to tell stripe which plan the customer should be charged for.
How can I get around this problem?
I am able to display the stripe-id for the plan but it is not user-friendly. They are id's like trad-2-5, trad-2-6, trad-2-7... so what I want to do is display a custom title when trad-2-5 is selected, and so on...
Any help is greatly appreciated!!Thanks
There are a couple of ways you could do this.
The really silly answer is that you can just create a map of plan ids to human-readable descriptions in the Angular controller code, then display that. This might be enough for what you want, but it's also pretty hacky, and not a lot of fun to maintain.
The less silly answer depends on where these plan ids are coming from. If they are coming from an endpoint on your server, which gets them from Stripe's plans endpoint, then you could also pass along the display name of the plan from that endpoint. If the plan id's are hard coded somewhere, or whitelisted, then this may not make sense. However, that display name is what will appear on the customer's invoice, and credit card statement, so it'd be nice to make it match up with what they see on the checkout page.

Get content Id (nid) from path on views block

I just can't seem to wrap my head around Drupal relationships. I have been reading and watching tutorials, but as soon as I try to get my own project done - I fail. I think it's very basic, so I would love to understand it. Maybe someone here can help me understand how it works :)
On my drupal site, I want to keep track of some private game tournaments.
I have created a content type called contestant, which has fields like: Tournament date, Player name, Final Position. I can then create a view that list the information from one tournament. I used the help I got from this thread: drupal views dynamic filter
I would like to have the view described above as a block. And then place that block-view on a "tournament description" page. I could do this, by simply creating a new block each time, and then manually place it on the page it should be shown (structure-->Blocks-->configure), but that is not an elegant way to do it. I am pretty sure this is where Relationships should be used. But I fail to understand how to create this relationship, so that the specific block view, that matches the specific tournament description page will be displayed together.
Use a Content:Nid as a Contextual filter.
WHEN the Filter value is not in the URL >>
Provide default value
Content ID from URL

Parse - how to add comments to an image?

I'm trying to create an iOS application where users post and image, and then someone can comment on the image. So far I've set up the a message class which contains (among other things) the image file. I want to be able to add comments to the image, so what would be the best way of doings this.
Option A:
I could add an array (or object?) column to the already existing message class, and then store in this array the comment (string) and the id of the poster (string). For this I think I would need a two-dimensional array, but I'm not sure how I would go about doing this.
Option B:
I could make an entire new class of comments which contains the user's comments (string), as well as the image file that he/she linked to (perhaps though a PFRelation)
Basically I'm leaning to Option A, because it seems easier/more efficient to implement, but I don't really know how I would go about creating a two-dimensional/array of objects - so my question is, how would I go about doing this?
The way I did it in my app is option B. I then added a count column to the photo that was incremented/decremented onSave or onDelete. I think this method is better because it keeps the data more symmetric (with option A some data could have thousands of comments while others would have 0). Additionally, it allows you to query the comments cell if you wanted to have a notification view where you showed the user what activity has been done on their photo.

Dynamically disabling menu based on database query?

So I'm not a programmer, but my friend is. He's trying to help me develop a web/phone app but we are stuck because I'm having trouble communicating to him an idea and he is having trouble understanding. One or both of us is a moron ;) Part of the problem is that I don't even know where to search for the answer cuz I don't know the specific search terms...believe me I've tried...and I've searched stack overflow as well. Here is the problem:
Short Question:
Websites (like hotel search) allow you to search for rooms by selecting checkboxes in certain categories (i.e. smoking/nonsmoking, stars, size of bed, near downtown, etc.). Certainly these sites are referencing a large database of hotels in a city.
How can you create a site so that as you check boxes (narrow your search), other options which are no longer available are dynamically "grayed out" or disabled on the fly so you cannot check those boxes. So if I were to check 4 stars and that excluded all smoking rooms based on the database, then the option to check "smoking" would be disabled.
The key to this is that the site is querying a database as you click boxes, then based on the results of that query (which is presumably many rows of data (a subset)), it is analysing that subset of data to determine whether checkbox options should be on/off, then dynamically "graying out" specific options that are no longer available. Once you got to only a single possible result, then the site would pop up the website for that hotel (or some other action).
What is this called? Where can I get more information on this. Any pointing toward the right direction would be tremendously appreciated.
Thanks so much in advance!
Roy
HERE IS AN EDIT TO ORIGINAL QUESTION...HERE IS AN EXAMPLE:
So here is my sample database. Each Column (i.e. AA, AB, AC) represents a checkbox. '1'= True, '0'= False, and '2'= Either. Therefore, if you click checkbox AA, then only the top three rows would meet the criteria of AA=True. So query would return the top three rows. The '2's could be either True/False so since they don't affect outcome, those checkboxes should be disabled and only the checkboxes CA,CB, & CC should remain choosable. If you then click checkbox CB, then result ZYX would be output.
Conceptually, How do you go from the initial click to the point where the database is queried and the results are used to dynamically change the menu. People have suggested javascript but i am not looking for a language. I am more looking for the concept. I was thinking that the query would return a new "temp" array with just the top three rows. Then each column of this "temp" array would be queried to see if it contained a '1' in any of the rows. If it did, then that button would be turned "ON". If it didn't then that button would be turned "OFF". Is this confusing? Am I asking for too much ;)
This sounds like javascript could help. For example, using jQuery, you can dynamically send queries to databases based on whatever you click on checkboxes, and then reload a particular section of the webpage. Javascript can also dynamically disable checkboxes.

Report Builder 2.0 Create a dataset with Parameters

I cannot get my dataset to recognise a parameter supplied to it.
I have created a report parameter "ProjectID".
(In Report Parameter Properties, Name="ProjectID", Prompt="ProjectID").
In Dataset Properties|Parameters, Parameter Name="ID", Parameter Value="[#ProjectID]".
When I click on the Filter button in Query Designer, the "Projects with" panel says:
"? ID equals (unspecified)".
But when I run the query I'm not prompted to enter a parameter value, and multiple rows are returned.
I should stress that I'm simply trying to replicate the functionality of a pre-existing report where all this works exactly as expected.
When I diff the rdl files of the two reports there are obvious differences, and I can hack the xml (of the semantic query) so that it works, but I don't really have the understanding of why it's working, or how to replicate the necessary changes via the GUI.
Can someone please give me some pointers - preferably without referring me to the documentation as I've been through this numerous times as well!!
Thanks in advance,
Peter.
p.s. I can post some of the rdl differences if that will help, but wanted to keep my initial post clear and to the point.
OK, so what you need to do is when in the Filter screen of the Query designer, assuming you've already specified a filter in the main pane, such as:
"ID equals (unspecified)"
You need to click on "ID" and a context menu appears with "Edit as Formula", "Prompt" and "Remove Condition".
Select "Prompt", and there you go.

Resources