Getting a P/L Document using Workato
Workato now supports the ability to generate a Profit and Loss document given a time range. With this information, the possibiilties are endless. There are quite a lof data to work with using this action itself, and the ability to extract them would also challenge your knowledge of Workato
These input fields allow you to refine the P/L. While not entirely compulsory, this helps if you know what you're trying to get.
Start Date and End Date
Emphasizes a range of time that the P/L should cover
Adds a new row that includes a customer's Income and Expenses. You may include more than one customer by using commas between them.
Adds a new row that includes a department's Income and Expenses. You may include more than one department by using commas between them.
DateMacros are a series of preset time ranges that you can pick from by QuickBooks. You can also specify DateMacros from a List by toggling the field.
The output provided by Workato may not look useful at first glance, but it is indeed a compact, contained by Lists and Objects, packed full of details. They are contained by layers of Lists and Objects, so there is definitely a need to master the understanding first of what they are in Workato.
To better visualize the App Data, we are going to use a sample P/L to guide you on what each App Data field means on an actual PL. Get Profit and Loss action gives you four sections : Header, Columns, Rows, and Accounts.
The Header section coincides with the headers on the top of your Profit and Loss.
The Column sections leads up to the number of Columns you have in your P/L. A last column, TOTAL, is included as the last oject in the list.
The Row sections represents each row available on the PL. This means that for each row, there can be more than one value given the number of columns there are.
The Row object my seems complicated at the surface, but they are rather well organized in order.
Each list item in the List Row belongs to a section. Examples of a section would be Income, Expenses, NET OPERATING INCOME, and more.
Under each section, you will have a Header, which is the name of the Section, and the Rows itself. If you'd like to access the data of each row as shown in the screenshot, this will be where the data resides in. Finally, Summary contains a total projection of each Section, combining values from all rows of that section.
Finally, the Accounts section contains all values of each column belonging to each Accouunt. If you have specified Customers and Departments, they should appear here as well. An Account, whether Income or Expense, will share its value here :
Understanding how the structure looks like compared to an actual PL is just half the battle. The ability to extract these data is very important too :
Expands out a List Item
If your data lies within a list item, and you wish to get the value of a specific data pills for each list item, you can use formula mode to do so :
This formula will turn trim down the array Accounts to include only the FullAccountName field and the value field in the specified format.
The end result can then be joined together if needed to, or used in an array source list area.
Finally, here is an example of how to utilize CSV lines to process your P/L for further use down your integration pipeline :