Hello Samliew,
Sorry for not getting back to you immediately, but something bugged out on my end.
As I am dealing with live data and sensitive financial data I will be posting some “edited” screenshots to illustrate the desired end result. Hopefully explaining everything with context.
The Scenario
Here you can see the data being pulled from the datastore that was uploaded with a different scenario. This data is correct and the other scenarios are working without issue.
There are 116 bundles currently, but will be increasing into the 1000s eventually. These are subdivided into Company and Quarter it was posted (Key), as Xero has a limited number of lines that can be entered into a Journal Entry, this will need to be divided into separate entries.
This part is less of an issue compared to the next screenshot.
With this screenshot, I am trying to input into the “Map” Section of the Xero Manual Journal Entry module a JSON to post the Journal Lines.
I tried using the “input JSON” from Xero’s API’s documentation, but that doesn’t seem to work.
This results in an output error of:
This is one of many errors that have occurred as I have been changing and trying new things. But it just doesn’t seem to like even my static JSON (without any “variable functions”).
The Hurtles
Within the Journal Lines, I need the system to spit out a separate line for each bundle’s specific month’s output for interest as the amount. The description for that line would be the Lessee’s Name and Vehicle.
After all the bundles have run, a last line would sum all the interest amounts.
All the other areas of the Manual Journal Module seem to be fairly easily mapped or changed manually as needed.
So to summarize, not only do I have issues with just making the “Map” in the Journal Entries function, but I also need to complicate that function by having it create a separate line for each bundle, dependent on the filtering of Months and Destination Accounts (I can figure this out on the filters), but meaning this will be 1-30 lines depending on that filtration.
My Questions
What code is supposed to be “mapped” into the Journal Entry lines? I would have assumed it was the JSON API from Xero’s API. Found Here
Do I need an aggregator in between the Datastore and Xero? As I need 1 Journal Entry per batch not an entry per bundle, I believe this is done with an Aggregator converting them to an Array. Does that make sense?
Can this even be done with Make? Or is the “repeat function” within the JSON Xero Mapping too difficult to handle?
If all these questions seem basic, I apologize as I am an accountant, not a programmer.
Best I can do is Excel formulas and read code these days.
Any assistance is much appreciated.