Forums | Back to Concur Developer Center

Approval workflow action URL is not working if there are multiple approvers,


#1

When there are multiple approvers for an expense report, then approval expense workflow is throwing an error.

Request:

curl -X POST
https://implementation.concursolutions.com/api/expense/expensereport/v1.1/report/gWujNPAb5679LjhqgN7BLZs0JXvPjQN8pDMnhT6WlnEk/WorkFlowAction
-H ‘accept: application/json’
-H ‘authorization: OAuth 0_5sfyEKPk8cnxxxxxOpPsLk=’
-H ‘content-type: application/xml’
-d ‘
Approve
Approved via Concur Connect

Response:

curl -X POST
https://implementation.concursolutions.com/api/expense/expensereport/v1.1/report/gWujNPAb5679LjhqgN7BLZs0JXvPjQN8pDMnhT6WlnEk/WorkFlowAction
-H ‘accept: application/json’
-H ‘authorization: OAuth 0_5sfyEKPk8cnxxxxxOpPsLk=’
-H ‘content-type: application/xml’
-d ‘
Approve
Approved via Concur Connect

But if the first approver has approved it manually, then the second approval works through API.

Can anyone please explain why this issue occurs and how we can solve it?

Am I missing any parameters in the CURL request?


#2

The Workflow Action URL allows you to take a workflow actions such as Approve or Send Bank a specified expense report at a specified workflow step. I emphasize “specified workflow step” because you must be aware that the expense report can be approved or sent back manually using the Concur Expense user interface. Here is the warning posted in the API documentation.

WARNING: Prior to calling this endpoint the Caller must check the Approval Status found in the ApprovalStatusName element in the response for Get Report Details to ensure the report is at the workflow step the Caller expects. Under no circumstance should a Caller make a call to this endpoint without being certain the report is at the workflow step the Caller expects.

What can happen is you get an Workflow Action URL from the GET Report Details, and then use this to make a Workflow Action call to approve an expense report. However, between the time you made the call to GET Report Details to learn the Workflow Action URL and the time you make the call to Workflow Action someone using the user interface made an approval decision. When this happens the call to the Workflow Action will result in an error.

This might be what is happening.

John Toman
Chief Product Officer
Pivot Payables, Inc.