Conditional Statements, Loops, Logical Operators
We would like to do some automation of the project status (red/yellow/green) and increment a counter based on that status on a daily basis.
So our goal is to have the app do two things:
1) The project status is updated to yellow if any task under that project becomes overdue
2) Any day that a project is yellow, increment a custom field (Days Yellow) on the project by 1
In order to be able to do this, I think I will need an if statement and/or loop to do a daily check on all projects and accomplish the above steps. But, I have no noticed any mention of conditional statements or logical operators or loops in the Wrike documentation.
So my questions are:
1) Does the Wrike API support the above mentioned features (conditional statements/loops)?
2) If no, why not? Is this a planned feature for the future?
3) What workarounds are available to do this if it cannot be done fully within Wrike API? Would it have to be a custom built app in another language that supports these functions that is then integrated with Wrike?
Hi Bradley! You are right, our API does not have built-in methods for handling conditional logic or looping, it allows you to get or update information in a more straightforward way. Filters can cover some of it (for example, you can get a list of tasks that are overdue using the 'dueDate' parameter), but implementing the whole process would only be possible by building an app (it seems to me what you need can be accomplished by running a simple script once a day), or potentially by using an automation platform (personally I've spoken to people who used Zapier and Boomi for similar purposes).
Having this kind of functionality could be helpful, although I don't think it's a common practice for RESTful API's and may even add unnecessary complexity. Have you used any APIs that support this kind of logic internally? I'd love to see an example to use as feedback for the team. Also if you personally have an idea how this could work - please feel free to share it, it would be great to hear your thoughts!
Thank you for your response. I do not have experience with RESTful APIs, which may be why it seems like such a glaring omission to me. The closest thing i have worked with would be Salesforce's Apex, but that is object oriented which may explain the difference.
To me, the custom fields have a lot of untapped potential right now, since you cannot determine their value with a formula or base it on other fields/conditions. Having some option within the API or UI would make them much more useful and versatile.
I think you're right that a simple script could process the output from a Wrike app, transform it, then feed it back in, but i was hoping I could avoid doing that and accomplish it all within Wrike.
I see! While we don't have this kind of functionality right now it doesn't mean we won't add it later. It will help our Product Team a lot if you shared your opinion in the corresponding section of our Community and upvoted suggestions that seem relevant - like this one, for example.
Another option for the meantime would be to use Reports - you can get a report of all overdue tasks grouped by their projects, and go over it daily to make necessary updates to statuses and custom fields.
Add my vote for this functionality. Allowing conditional statement in formulas would be very useful/helpful.
Hi William Weinberger, thank you for reaching out!
Have you considered using Wrike's Automation Engine for automating certain actions related to projects?
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover