Send window height width , toolbar=0 menubar=0 in url for webex adaptive cards - adaptive-cards

I am sending a URL in actionset for Webex card API. This opens up in a new tab.
is there a way to send JS parameters so that it opens in custom window size without toolbars?
"type": "ActionSet",
"horizontalAlignment": "Right",
actions": [
{
"type": "Action.OpenUrl",
"title": "Edit CID",
"url": str("https://www.Casemon.com="+CID_ID+ "&Source=CaseMon")
]
}

Related

Bot Framework Composer - Adaptive Card - Button to start another dialog

I have 2 buttons on the adaptive card."submit" button brings me the information I entered on the form.but the "cancel" button does the same.I want the "Cancel" button to redirect to another dialog when pressed. Any idea?
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Submit",
"style": "positive"
},
{
"type": "Action.Submit",
"title": "Cancel",
"associatedInputs": "none",
"id": "cancel",
"style": "destructive"
}
]
}
here the steps
Assign value in submit and cancel button
based on the value bot received , check the condition invoke the dialog

Redirecting to Bot from URL

I am working on a .Net core Bot application where I have created an adaptive card and when user clicks it would be redirected to a new URL. Once, redirected I want to add a functionality that after user posts in the URL, he should be redirected back to the BOT with the posted data. Can anyone guide me how to approach this. Below is the sample JSON we have created for redirecting user to URL.
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "This card's action will open a URL"
}
],
"actions": [
{
"type": "Action.OpenUrl",
"title": "Action.OpenUrl",
"url": "https://adaptivecards.io"
}
]
}
if you are asking about a Teams bot then you should follow the pattern for a Bot Task Module
Bot message + Card
Activate Task module (aka pop-up window)
task module can display another Adaptive Card
or a HTML page
Task Module completes and sends back info to your bot using task/submit

In MS Team Adaptive Card, how do I specify the server it post to?

I am trying to use Action.Submit in my adaptive card to hit my Google Cloud Function. Where do I specify where to send the submission to? The reason I am doing this is I want to skip building a full chat server due to time constraint.
Example of Adaptive Card, no property to specify post URL:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "Present a form and submit it back to the originator"
},
{
"type": "Input.Text",
"id": "firstName",
"placeholder": "What is your first name?"
},
{
"type": "Input.Text",
"id": "lastName",
"placeholder": "What is your last name?"
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Action.Submit",
"data": {
"x": 13
}
}
]
}
Adaptive cards aren't developed specifically for bot service.
so working with them needs some tricks , in your case if you are trying to send a request that contain adaptive card inputs you need to know :
when the user click the submit button the adaptive card will send a message to bot activity handler on behalf of the user, this message contains a JSON object (you can view this object by adding this line in the bot onMessage function.
console.log(context.activity)
you can get the data from this meesage by using :
context.activity.value.firstName (to get the firstName sent by the adaptive card)
Now you can send your request to the server i prefer using Axios .

Browse Carousel Card not working for google assistant in Dialogflow

I am trying out browse carousel card (in rich responses) feature available for Google Assistant in Google's Dialogflow.
I am getting only simple response as shown:.
Pasted below the Raw API response (no instances of browse carouse card response).
{
"responseId": "ea913388-8753-458c-b033-396512d1af42-e13762d2",
"queryResult": {
"queryText": "show browse carousel",
"parameters": {},
"allRequiredParamsPresent": true,
"fulfillmentMessages": [
{
"platform": "ACTIONS_ON_GOOGLE",
"simpleResponses": {
"simpleResponses": [
{
"textToSpeech": "sample text"
}
]
}
},
{
"platform": "ACTIONS_ON_GOOGLE"
},
{
"text": {
"text": [
""
]
}
}
],
"intent": {
"name": "projects/leafy-winter-268704/agent/intents/bd457567-02c8-4e15-aca7-c32adfcb45f2",
"displayName": "sampleintent"
},
"intentDetectionConfidence": 1,
"languageCode": "en"
}
}
This is the simulator response. The bot is getting disconnected when an intent with browse carousel is triggered.
Am I doing it in the correct way? what can be done to resolve this issue?
The issue is that you're using a Browse Carousel, but attempting to test it with a Smart Display. Smart Displays don't support links, so they can't support the Browse Carousel.
You can switch to testing it with Android and you should be able to see the Browse Carousel.

How to link QnA Maker answer in Adaptive Card=

I'm rather new with these technologies so bear with me. I have successfully deployed Bot Framework and linked QnA Maker to it. I am using Adaptive Card for first response and i want images in that adaptive card to (when clicked) to generate answer from QnA Maker. How can i link these images to generate QnA Maker answer? Is there a way to just give it URL that would trigger QnA Maker?
You could use the data property in your Adaptive Card to send a message payload to the Bot, which would then trigger the QnA answer.
For example, in the data property, if you put something like 'How do I upload a file', so when the image is clicked, the payload will be 'How do I upload a file' and will be sent to the Bot, where the QnA service should respond in kind with the correct answer.
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"style": "Person",
"url": "${creator.profileImage}",
"size": "Small",
"selectAction": {
"type": "Action.Submit",
"id": "image",
"title": "image",
"data": "show me the text 'image'"
}
}
],
"width": "auto"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2"
}