Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. URLs of the images from Orbita backend. see Upload How do I upload an image to Orbita? for more information.

  2. To render the carousel and card list, you should switch to chatbot version - v2 in Bot view template node.

...

Parameters used for Carousel

Property

...

Description

The type property should be set “carousel

items

"type": "carousel"

This property accepts carousel and card options.

"items": [{
"reviews": {
"rating": 2.5,
"label": "Reviewslabel",
"count": 20000
}
}]

The items property is used to fill the carousel options. Each carousel option can have the below properties.

"title": "Title for Carousel",

The Title of the carousel option.

"reviews": {
"rating": 2.5,
"label": "Reviewslabel",
"count": 20000
}

This is an optional property. You can show the rating on the carousel options and in the detailed view using this property.

  • rating - This is the calculated rating value. The rating stars will get filled based on the number given here. (hardcoded in the sample code).

  • label - You can set a custom name to the rating icon. (Can only be seen in Detailed view)

  • count - The total number of ratings received. (Can only be seen in Detailed view)

items

reviews

This is an optional property. You can show the rating on the carousel options and in the detailed view using this property.

...

Code Block
if(!msg.payload.orbita) {
    msg.payload.orbita = {}
}
msg.payload.orbita.directive= [
    {
        "type": "cardlist",
        "items": [
            {
                "title": "Title for Card Option 1",
                "reviews": {
                    "rating": 1.5,
                    "label": "Reviews label 1",
                    "count": 20000
                },
                "appointmentDetails": {
                    "dateHeader": "Small description for your card option",
                    "lineItems": [
                        {
                            "title": "Line item 1",
                            "description": "Line item desc 1"
                        },
                        {
                            "title": "Line item 1",
                            "description": "Line item desc 2"
                        }
                    ]
                },
                "image": {
                    "alternateText": "OE",
                    "url": "https://s3.amazonaws.com/orbitahealth/clients/sandbox5/assets/dynamic/images/smallimage192c03a10-384d-11ea-9e3c-4750e1188599.jpg"
                },
                
                "detailView": {
                    "title": "Title of detailed view 1",
                    "description": "Description of detailed view 1",
                    "image": {
                        "url": "https://orbita.ai/wp-content/uploads/2017/08/vxhero_bg_v2.jpg",
                        "alternateText": "OE"
                    },
                    "buttons": [
                        {
                            "text": "Button Text 1",
                            "type": "link",
                            "value": "https://yourdomain/buttonlink/"
                        }
                    ],
                },
            }
        ]
    }
]
return msg;

Parameters used for Card

Type

The type property should be set “cardlist

...

The items property is used to fill the cards in the card list. Each card option can have the below properties.

title

The Title of the card option.

...