Skip to main content

TIL: Updating Idea Statuses via the API does not create a status update reply

  • 28 June 2023
  • 1 reply
  • 19 views

whereas when you update an idea status manually via Control, a reply is created that shows the idea transitioning from Status A → Status B, this does not happen when you use the Assign an Idea Status to an Idea call. 

Can confirm this is the case. 

I built adding a reply into my workflow after the status change webhook. 

From the idea.StatusAssigned webhook, I extract the ideaId, ideaStatusBgColor, ideaStatusColor, oldIdeaStatusBgColor, and oldIdeaStatusColor and then with the API make a POST call to reply to the idea. The content in the {curly brackets} is from the webhook. You will need to modify this based on how you are obtaining the webhook and making the API call. I’ve escaped the characters for JSON. My particular community style also has class=\"idea-status-pill\" for each idea <span>, but that can be removed if it does not work with your community. 

 

POST https://api2-us-west-2.insided.com/v2/ideas/{ideaId}/reply

Paylod:

{
    "content":"<div><span style=\"background-color:#{idea.StatusAssigned.oldIdeaStatusBgColor}; color:#{idea.StatusAssigned.oldIdeaStatusColor}\" class=\"idea-status-pill\">{idea.StatusAssigned.oldIdeaStatusName}</span>&rarr;<span style=\"background-color:#{idea.StatusAssigned.ideaStatusBgColor}; color:#{idea.StatusAssigned.ideaStatusColor}\" class=\"idea-status-pill\">{idea.StatusAssigned.ideaStatusName}</span></div>",
    "highlight": false
}

Results:

 


Reply