web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Set quote to closed via PowerAutomate

(0) ShareShare
ReportReport
Posted on by
Hi, i'm in a pickle as we speak.

We are trying to close quotes per power automate but i'm not able to set the status to "Won" it won't allow me.

The only accepted status is "Canceled", before trying to set the quote to won i activate it via "Update row" and then for the closing action i use unbound action "CloseQuote" with these action parameters:

{
  "QuoteClose": {
    "subject": "Quote Won (Won) - @{triggerOutputs()?['body/quotenumber']}",
    "category": 1,
    "quoteid@odata.bind": "quotes(@{triggerOutputs()?['body/quoteid']})",
    "quotenumber": "@{triggerOutputs()?['body/quotenumber']}",
    "revision": @{triggerOutputs()?['body/revisionnumber']},
    "statuscode": 2
  },
  "Status": 4
}
 
But i only get this error


and when looking at the available statuses to apply 4 i clearly won
 
"Vunnen" is "Won" in swedish.
I can apply the value 6 which gives me "Canceled", but that's about it.
 
Please help! :)
I have the same question (0)
  • Suggested answer
    Tom_Gioielli Profile Picture
    2,927 Super User 2025 Season 2 on at
    Status and Status Reason (statecode and statuscode respectively) are always linked to each other. When you are setting a new status to a record, you will always need to set values for both fields and ensure that the [Status Reason] is a valid choice for the given [Status].
     
    In looking at the out of box configuration, this is what you can use. (Status is the top reason, Status Reason is the sub-bullets) and the code is in parantheses.
    • Draft (0)
      • In Progress (1)
    • Active (1)
      • In Progress (2)
      • Open (3)
    • Won (2)
      • Won (4)
    • Closed (3)
      • Lost (5)
      • Canceled (6)
      • Revised (7)
    So for your example, you would need to set the Status (statecode) to 2 and the Status Reason (statuscode) to 4 for the system to recognize it as a valid option. Setting a Status Reason through Power Automate does not inherently change the Status, unlike when you use a D365 workflow to make the change.
     
    Conversely, unless you have added other options to the "Won" Status Reason you can simply set that as the parent state and the Status Reason will default to "Won" as well.
     
     
    If this response helped, please consider marking as verified so future users can see the resolution. If you have additional questions or problems, please tag me in the response so I receive a notification.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 91

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 86 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans