Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ActionDescriptionRequestResponse

Get a list of pending approvals

Fetches the list of all the documents awaiting the user's approval.

/pricefx/{partition}/workflowsmanager.fetch/active

Code Block
titlePayload
collapsetrue
{
  "data": {}
}



Code Block
titleResponse
collapsetrue
{
    "response": {
        "status": 0,
        "startRow": 0,
        "node": "user1",
        "data": [
            {
                "version": 4,
                "typedId": "2147483713.W",
                "uniqueName": "R-2147483660-2147483713",
                "label": "R-2147483660 (New Rebate Agreement)",
                "approvableTypedId": "2147483660.RBA",
                "approvableUniqueName": "R-2147483660",
                "currentStepId": "ea303804-6807-4244-8aac-0eacc078964f",
                "workflowStatus": "SUBMITTED",
                "code": "RBA",
                "storesOnlyHeaderOfApprovableState": false,
                "expandedActiveUsers": "",
                "createDate": "2017-03-09T15:10:42",
                "createdBy": 5351,
                "lastUpdateDate": "2017-03-09T15:11:09",
                "lastUpdateBy": 2147483655,
                "delegation": "None"
            },
            {
                "version": 2,
                "typedId": "2147483750.W",
                "uniqueName": "P-1625-2147483750",
                "label": "P-1625 (New Quote 3)",
                "approvableTypedId": "1625.Q",
                "approvableUniqueName": "P-1625",
                "currentStepId": "87eeffbe-40b7-4b88-8cb7-db1a649f8106",
                "workflowStatus": "SUBMITTED",
                "code": "Q",
                "storesOnlyHeaderOfApprovableState": false,
                "expandedActiveUsers": "",
                "createDate": "2017-04-03T09:17:32",
                "createdBy": 5351,
                "lastUpdateDate": "2017-04-03T09:17:32",
                "lastUpdateBy": 5351,
                "delegation": "None"
            }
        ],
        "endRow": 2
    }
}


Approve a document

Executes the approve action on the workflow step specified by the External Action Token. As the External Action Token use the "currentStepId" value that you can find in the response when you call the workflowsmanager.fetch/active endpoint.
/pricefx/{partition}/workflowsmanager.approve/{ExternalActionToken}
Code Block
titlePayload
collapsetrue
{"data":{"actionComment":"Approved"}}



Code Block
titleResponse
collapsetrue
{
    "response": {
        "node": "user1",
        "data": [
            {
                "workflow": {
                    "workflowStatus": "APPROVED",
                    "isSelectStepOnDeny": null,
                    "type": "quote",
                    "steps": [
                        {
                            "reason": "Standard approval",
                            "reasons": [
                                "Standard approval"
                            ],
                            "isUserApprover": "true",
                            "userGroupNames": null,
                            "type": "ApprovalWorkflowStep",
                            "minApprovalsForGroups": [],
                            "isPostStepLogicFailed": null,
                            "postStepLogicName": null,
                            "id": "87eeffbe-40b7-4b88-8cb7-db1a649f8106",
                            "executedByNames": [
                                "janek"
                            ],
                            "userLoginNames": null,
                            "userGroupTypedId": null,
                            "approvalRequiredEmailAttachments": [],
                            "subSteps": [
                                {
                                    "approver": "Admin",
                                    "approverLoginName": null,
                                    "approverTypedId": "5351.U",
                                    "executionStatus": "EXECUTED_APPROVED",
                                    "lastExecutedBy": "Admin",
                                    "lastExecutedByName": "Admin",
                                    "approvedCount": 1,
                                    "minApprovalsNeeded": 1,
                                    "reason": "Standard approval",
                                    "comment": "Approved - well done!",
                                    "comments": null,
                                    "lastExecutionDate": "2021-02-10T08:53:51"
                                }
                            ],
                            "executionStatus": "EXECUTED_APPROVED",
                            "userTypedIds": [
                                "5351.U"
                            ],
                            "lastAccess": "2021-02-10T08:53:51",
                            "minApprovalsNeeded": 1,
                            "userName": "Admin",
                            "delegatedToTypedIds": [],
                            "userGroupTypedIds": null,
                            "userTypedId": "5351.U",
                            "uniqueName": "DefaultApproval",
                            "denialReasons": [],
                            "userGroupName": null,
                            "isDenialReasonOptional": "true",
                            "userNames": [
                                "janek"
                            ],
                            "comment": "Approved - well done!",
                            "mandatoryComments": []
                        }
                    ],
                    "approvableTypedId": "1625.Q",
                    "currentStepId": null,
                    "submitReason": null,
                    "submitterUserName": "Admin",
                    "denialReasons": [],
                    "submitterTypedId": "5351.U",
                    "isDenialReasonOptional": "true",
                    "id": "ed447a8a-2fdc-427d-b55a-244dea6e90b3",
                    "isAddStepRestrictedToWFAdmin": "false"
                }
            }
        ],
        "status": 0
    }
}


Deny a document

Executes the deny action on the workflow step specified by the External Action Token. As the External Action Token use the "currentStepId" value that you can find in the response when you call the workflowsmanager.fetch/active endpoint.

/pricefx/{partition}/workflowsmanager.deny/{ExternalActionToken}

Code Block
titlePayload
collapsetrue
{"data":{"actionComment":"Not approved"}}



Code Block
titleResponse
collapsetrue
{
   "response":{
      "node":"e2e-stable-node",
      "data":[
         {
            "workflow":{
               "workflowStatus":"DENIED",
               "isSelectStepOnDeny":"false",
               "type":"quote",
               "steps":[
                  {
                     "reason":"Admin has to approve - 2017",
                     "reasons":[
                        "Admin has to approve - 2017"
                     ],
                     "isUserApprover":"true",
                     "userGroupNames":null,
                     "type":"ApprovalWorkflowStep",
                     "minApprovalsForGroups":[
                        
                     ],
                     "isPostStepLogicFailed":null,
                     "postStepLogicName":null,
                     "id":"e724ac84-1160-4604-89c8-f1eb1f9fe3f5",
                     "executedByNames":[
                        "Admin"
                     ],
                     "userLoginNames":[
                        "e2e-admin"
                     ],
                     "userGroupTypedId":null,
                     "approvalRequiredEmailAttachments":[
                        
                     ],
                     "subSteps":[
                        {
                           "approver":"e2e admin",
                           "approverLoginName":"e2e-admin",
                           "approverTypedId":"2147483721.U",
                           "executionStatus":"EXECUTED_DENIED",
                           "lastExecutedBy":"Admin",
                           "lastExecutedByName":"Admin on behalf of Manager",
                           "approvedCount":1,
                           "minApprovalsNeeded":1,
                           "reason":"Admin has to approve - 2017",
                           "comment":"Not approved",
                           "comments":null,
                           "lastExecutionDate":"2021-02-10T08:35:13"
                        }
                     ],
                     "executionStatus":"EXECUTED_DENIED",
                     "userTypedIds":[
                        "2147483721.U"
                     ],
                     "lastAccess":"2021-02-10T08:35:13",
                     "minApprovalsNeeded":1,
                     "userName":"e2e admin",
                     "delegatedToTypedIds":[
                        
                     ],
                     "userGroupTypedIds":null,
                     "userTypedId":"2147483721.U",
                     "uniqueName":"Admin Approval",
                     "denialReasons":[
                        
                     ],
                     "userGroupName":null,
                     "isDenialReasonOptional":"true",
                     "userNames":[
                        "e2e admin"
                     ],
                     "comment":"Not approved",
                     "mandatoryComments":[
                        
                     ]
                  }
               ],
               "approvableTypedId":"2147489670.Q",
               "currentStepId":null,
               "submitReason":null,
               "submitterUserName":"Admin",
               "denialReasons":[
                  
               ],
               "submitterTypedId":"2147483691.U",
               "isDenialReasonOptional":"true",
               "id":"29fa9901-4938-4c3b-a551-3b7c6f0f099f",
               "isAddStepRestrictedToWFAdmin":"false"
            }
         }
      ],
      "status":0
   }
}


Get a list of approved documents

Retrieves a list of all documents with workflow status 'Approved' where the current user was involved as an approver.

/pricefx/{partition}/workflowsmanager.fetch

Code Block
titlePayload
collapsetrue
{
  "data": {
    "criteria": [
      {
        "fieldName": "workflowStatus",
        "operator": "equals",
        "value": "APPROVED"
      }
    ]
  }
}



Code Block
titleResponse
collapsetrue
{
   "response":{
      "status":0,
      "startRow":0,
      "node":"user1",
      "data":[
         {
            "version":6,
            "typedId":"2147483664.W",
            "uniqueName":"R-2147483648-2147483664",
            "label":"R-2147483648 (Test Rebate Agreement)",
            "approvableTypedId":"2147483648.RBA",
            "approvableUniqueName":"R-2147483648",
            "workflowStatus":"APPROVED",
            "code":"RBA",
            "storesOnlyHeaderOfApprovableState":false,
            "createDate":"2017-03-06T13:08:02",
            "createdBy":5351,
            "lastUpdateDate":"2017-03-06T13:09:01",
            "lastUpdateBy":2147483655
         },
         {
            "version":10,
            "typedId":"2147483679.W",
            "uniqueName":"R-2147483651-2147483679",
            "label":"R-2147483651 (New Rebate Agreement)",
            "approvableTypedId":"2147483651.RBA",
            "approvableUniqueName":"R-2147483651",
            "workflowStatus":"APPROVED",
            "code":"RBA",
            "storesOnlyHeaderOfApprovableState":false,
            "createDate":"2017-03-06T15:01:17",
            "createdBy":5351,
            "lastUpdateDate":"2017-03-06T15:05:02",
            "lastUpdateBy":5351
         },
         {
            "version":5,
            "typedId":"2147483683.W",
            "uniqueName":"R-2147483652-2147483683",
            "label":"R-2147483652 (New Rebate Agreement)",
            "approvableTypedId":"2147483652.RBA",
            "approvableUniqueName":"R-2147483652",
            "workflowStatus":"APPROVED",
            "code":"RBA",
            "storesOnlyHeaderOfApprovableState":false,
            "createDate":"2017-03-06T15:19:33",
            "createdBy":5351,
            "lastUpdateDate":"2017-03-06T15:19:50",
            "lastUpdateBy":2147483655
         },
         {
            "version":5,
            "typedId":"2147483684.W",
            "uniqueName":"R-2147483653-2147483684",
            "label":"R-2147483653 (New Rebate Agreement)",
            "approvableTypedId":"2147483653.RBA",
            "approvableUniqueName":"R-2147483653",
            "workflowStatus":"APPROVED",
            "code":"RBA",
            "storesOnlyHeaderOfApprovableState":false,
            "createDate":"2017-03-06T15:23:33",
            "createdBy":5351,
            "lastUpdateDate":"2017-03-06T15:24:15",
            "lastUpdateBy":2147483655
         }
      ],
      "endRow":4
   }
}


Create workflow delegation

Create a new workflow delegation.

/pricefx/{partition}/workflowdelegationmanager.add

Code Block
titlePayload
collapsetrue
{
   "data":{
      "sourceUser":"john.smith",
      "targetUser":"ren.sato",
      "startDate":"2021-11-23T12:55:00.587Z",
      "endDate":"2021-11-28T12:55:08.364Z",
      "note":"Holiday backup",
      "sourceUserId":"2147409691",
      "targetUserId":"2147407801"
   }
}



Code Block
titleResponse
collapsetrue
{
   "response":{
      "node":"qa-node",
      "data":[
         {
            "version":1,
            "typedId":"11.WD",
            "uniqueName":"WD-11",
            "label":null,
            "sourceUserId":2147409691,
            "sourceUser":"john.smith",
            "targetUserId":2147407801,
            "targetUser":"ren.sato",
            "status":"INITIALIZED",
            "note":"note",
            "createdByAdmin":true,
            "createDate":"2021-11-22T12:55:21",
            "createdBy":2147483691,
            "lastUpdateDate":"2021-11-22T12:55:21",
            "lastUpdateBy":2147483691,
            "startDate":"2021-11-23T12:55:00",
            "endDate":"2021-11-28T12:55:08"
         }
      ],
      "status":0
   }
}


Logics

ActionDescriptionRequestResponse

Execute a Calculation Logic

When you use the output=rawjson parameter, it returns the response in the simple format:
{
ElementName1 : ElementResult1,
ElementName2 : ElementResult2
...
}

listing only calculation results and excluding all other fields.

/pricefx/{partition}/formulamanager.executeformula/{formula name}?output=rawjson

...