Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Automated Workflow Records Via API

AlexHorton
Collaborator II

Hello all, silly question, but I thought I'd ask anyway -

 

Can you update a record in the automated workflow with either the REST or SOAP API?  Meaning, can you take a record from one stage of the workflow to a separate stage of the workflow?

6 REPLIES 6

JeffLetterman
Archer Employee
Archer Employee

I think it would depend on the node type the record is on.  For example, a User Action node requires a user to click a button and this is not possible via API.  But a Wait For Content Update node might since there is a delay before the rule is processed again.....of course, give this a test.

User Nodes I'm less concerned with, yep.  The Wait for Content Update nodes are the ones that I'm more wondering about.

How would I reference the Node to direct the record?  Meaning, if I'm on Wait for Content Update node A and I'm sent to Wait for Content Update node B, how do I get the record back to Node A?

 

Again, knowing that there's no official solution for this.  How about the "unofficial, if I were guilty, I'd do it this way" version?

 

I would guess that wait for content update would mean that whatever your rules are for the "wait node", you need to use the APIs to update those fields.

Not sure if this works, tho...

If I'm right, this would be the normal webservice or rest api to update a record content.

Anonymous
Not applicable

Jason is correct.

You should just be able to update the particular field(s) you want via the API.  The record can only sit on one node at a time. So if node B is a Wait node and you update the field being evaluated then save the record, AWF should send the record back to the eval node, which then evaluates the completed field and then flows to where ever AWF says is the next node.

JeffLetterman
Archer Employee
Archer Employee

I mocked up a simple example and confirmed that REST API can update a record sitting on a Wait node and the Evaluate Content node processes it correctly. 

 

I tested with sending record back to the Wait node (or User Action node) by default and if the Rule is true.  When the Name field equals "1", the Rule is true and moves to the Update Content node to completion.  

 

1.png

 

Sample REST API Body with PUT verb to update the record:

{
  "Content": {
    "Id": 227060,
    "LevelId": 310,
    "Tag": "Test app",
    "FieldContents": {
      "20792": {
        "Type": 1,
        "Tag": "Name field",
        "Value": "1",
        "FieldId": 20792
      }
    }
  }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

JeffLetterman
Archer Employee
Archer Employee

Starting with 6.5, you can use the Save Workflow Actions to move a record forward in an Advanced Workflow process using the REST API.  You can test is out using the latest Archer API Templates - an Archer application to quickly test the Archer Web Services API, REST API, and Content API using Custom Objects and much more.

 

Also, please vote up Enhance the REST API response for Save Workflow Action responses to return valid JSON for successful call.