Exam AI-102 All QuestionsBrowse all questions from this exam
Question 290

HOTSPOT -

You are developing the shopping on-the-go project.

You need to build the Adaptive Card for the chatbot.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

    Correct Answer:

    Box 1: name.en -

    Box 2: "$when": "${stockLevel != 'OK'}"

    Product displays must include images and warnings when stock levels are low or out of stock.

    Box 3:image.altText.en

Discussion
halfway

1. name[language] 2. "$when": "${stockLevel} != 'OK'" 3. image.altText[language]

MarceloManhaes

I ´m sure if is correct if you see the shopping on the go project requirements for chatbot that says the multi-language approach

james2033

File JSON { "sku": "b1", "name": { "en": "Bicycle", "es": "Bicicleta", "pt": "Bicicleta" }, "stocklevel": "Out of Stock", "description": { "en": "Bicycle", "es": "Bicicleta", "pt": "Bicicleta" }, "image": { "uri": "https://upload.wordwideimporters.org/bicycle.jpg", "alttext": { "en": "Bicycle", "es": "Bicicleta", "pt": "Bicicleta" } }, "createdUtc": "2020-0214T06:08:39Z", "language": "en" } 1. name.en 2. "$when": "${stockLevel != 'OK'}" 3. image.altText.en

upliftinghut

This is correct because the structure of original requirement Json is reflected and replaced by $<parameter name>

sl_mslconsulting

You don’t want code it in a way that the code just works with en - it’s a bad coding practice.

AzureJobsTillRetire

The given answers are correct. The correct answer pairs for box1 and box3 could be- name.en and image.altText.en name["language"] and image.altText["language"] since name["language"] does not exist as an option in box3, we will have to choose the first pair as the correct answer. https://www.w3schools.com/js/js_json_syntax.asp

ParkXD

it seems a repeat question, but with a slight different option. The earlier one with altText.[language], but this altText[language] without . which one is right?

Canyu

This is a repeat question, but this time the answer does not give an explanation or reference document. Is this answer correct?

sdokmak

If there was an option for name.[language] instead of name[language] then I'd use that for more than one language option, otherwise we can't. For name[language], language would have to be an integer but it's a string, wouldn't work. But.. for name.[language], that works. https://stackoverflow.com/questions/882727/is-there-a-way-to-use-variable-keys-in-a-javascript-object-literal

RamonKaus

This is a repeat of an earlier question but they changed the answer? Weird.

krzkrzkra

1. name.en 2. "$when": "${stockLevel != 'OK'}" 3. image.altText.en

Toby86

Requirement: "Support interactions in English, Spanish, and Portuguese" If you hard set it on english, how can you satisfy this requirement? must be name[language] on top and AltText.[language] on bottom.

fba825b

How I understood it: The description in the first table says that the app and the user input is in english => app is in english => adaptive card should be in english In addition to that, the provided JSON has a language property with value 'en'. So, my guess is: 1. name.en 2. "$when": "${stockLevel != 'OK'}" 3. image.altText.en

NagaoShingo

1. name.en 2. "$when": "${stockLevel != 'OK'}" 3. image.altText.en

takaimomoGcup

Is this question still available on May 21, 2024?