Canvas Kt Initiate Screen Issue | Community
Skip to main content
Answered

Canvas Kt Initiate Screen Issue

  • July 19, 2023
  • 3 replies
  • 79 views

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": [{
                "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?

Best answer by Eden

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! 

3 replies

Eden
Employee
Forum|alt.badge.img
  • Premier Customer Support Engineer
  • Answer
  • July 26, 2023

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! 


  • Author
  • New Participant
  • August 10, 2023

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


  • Author
  • New Participant
  • August 10, 2023

thanks for the help. 😊