Skip to main content

We’re trying out the canvas app. When we pass the header and text components, the Canvas is loading correctly in the Inbox.
This is the request body: 
{
    "canvas": {
        "content": {
            "components": {
                "type": "text",
                "text": "Create Case in SF",
                "style": "header",
                "label": "sf create case",
                "align": "center"
            }, {
                "type": "text",
                "text": "his is a text component."
            }]
        }
    }
}

But, when we try to add a button as well, along with the text components, it is showing an error.
{
    "canvas": {
        "content": {
            "components": h{
                "type": "text",
                "text": "Create Case in SF",
                "style": "header",
                "label": "sf create case",
                "align": "center"
            }, {
                "type": "text",
                "text": "his is a text component."
            }, {
                "type": "button",
                "style": "primary",
                "label": "Click",
                "component_id": "url_button",
                "action": {
                    "type": "submit"
                }
            }]
        }
    }
}

 



Need to know what’s wrong in our second request?

Hey @ssyam011 👋 Eden from the support engineer team here.

 

Can you please tell me if you are still seeing the same issue when updating “component_id” to instead be “id”? Based on our documentation, “id” is the key that should be used there! 


Hi Eden, when changed to Id it’s working fine, now able to see the button.


thanks for the help. 😊


Reply