You need to sign in to do that
Don't have an account?
Arthur Almeida
Einstein Bot - How to use variable in Object Search Custom Value
I have two 'Object Search' in my Chatbot.
The first Object Search is to find a Product, and I save the result in a custom variable. This works normally.
The second Object Search would is to find the Machines of Product, and I need to find all Machines where Product = {!product.Id}, for the example:
But this gives an error.
He would should replace {!ProdutoSelecionado[0].Id} for Id value...
How to use a variable in Custom Value of Object Search?
The first Object Search is to find a Product, and I save the result in a custom variable. This works normally.
The second Object Search would is to find the Machines of Product, and I need to find all Machines where Product = {!product.Id}, for the example:
But this gives an error.
Error: Exception when invoking /support/conversations/0X9e00000004CDF/invocations/1rle00000008OOEAA2: [{"message":"; nested exception is: \n\tcommon.exception.ApiQueryException: \nProduto_da_Maquininha__c WHERE Produto_do_Bot__c = '{!ProdutoSelecionado[0].Id}'\n
He would should replace {!ProdutoSelecionado[0].Id} for Id value...
How to use a variable in Custom Value of Object Search?
The solution was to use Action Apex instead of Object Search, because, in Action Apex, we can pass variable in Custom Value.
Please consider marking the answer best to close the thread.Thank you
All Answers
Based on https://help.salesforce.com/articleView?id=sf.bots_service_deliver_knowledge_articles.htm&type=5
>The chatbot should work in a custom user context.
>The bot can deliver up to three records and hold three fields for each record.
Can you make sure these are considered in your scenario?Thanks
The solution was to use Action Apex instead of Object Search, because, in Action Apex, we can pass variable in Custom Value.
Please consider marking the answer best to close the thread.Thank you