Tutorials
Reports - Expensify -> Priority
25 min
this tutorial will guide you through the smooth setup process, enabling efficient report management for creating a transaction log in priority each day, we will process new templates and reports in expensify prerequisites before you begin, ensure the following connections are established connection between engini and priority learn how to https //app archbee com/docs/ixqqblwfxopjg0nave78y/9hy5ma3mbcko4jgxebuai connection between engini and expensify learn how to https //app archbee com/docs/ixqqblwfxopjg0nave78y/td33fdcyfx3ign84qa0pd add a schedule trigger to get started, add a trigger the process will run once a day at 6 00 am create report template next , add create a report template action of expensify add a new activity and choose “create report template” action of expensify template format click on the on the right field of “template format ” and choose json from the tooltip name click on the the on the right field of “name” and write “report template” templete fields click on “add template fields” click on the left side and write the name of the field, for example “approvedreport” click on the right side and choose the values from the tooltip for example, report approved repeat on steps 1 3 to add more fields in addition to the fields we already added, if necessary export report export the template of the report you have just created choose the template you have created report template click on “add fields” button to fill the fields on the left field, select from the drop down the field you want to populate input report state\[] filter approved after on finish mark as exported click on the right field, and the tooltip will pop up showing the options of the values you can choose for the ‘input report state\[]’ field click on ‘approved’ in the field options for ‘filter approved after’ click on the functions choose the adddays function which which adds or subtracts days enter on the left side of the comma and choose the localtimenow() function which returns the current date and time in your area on the right side of the comma, enter 1 to get yesterday’s date for ‘on finish mark as exported’ write ‘engini’ initialize variable no1 now, let’s initialize a variable that will later hold the amount of the non reimbursable expenses choose “initialize variable” action of engini name field click on the empty field and choose from the tooltip a name for the variable for example “non reimbursable” type field choose from the drop down the “numeric” option value choose the initial value type 0 click on the “next step” button initialize variable no2 now, let’s initialize a variable that will later hold the amount of the reimbursable expenses choose “initialize variable” action of engini name field click on the empty field and choose from the tooltip a name for the variable for example “reimbursable” type field choose from the drop down the “numeric” option value choose the initial value type 0 click on the “next step” button for each loop for each exported report, we will interact with priority add a new activity and choose the “for each loop” action click on the the right field, and the tooltip will pop up showing the options of the values you can choose choose the export report result and then select the reports value from activity number 3 create “יומן תנועות” add a new activity and choose the “create “יומן תנועות”” action of priority click on the “add fields” button to fill the fields in the “יומן תנועות” form on the left field, select from the drop down the field you want to populate in the form for this process choose the fields ת למאזן ת ערך ת אסמכתא סוג תנועה פרטים אסמכתא click on the right field, and the tooltip will pop up showing the options of the values you can choose for “ת למאזן” field click on functions and choose the function “localtimenow()” for “ת ערך” fieldclick on functions and choose the function “localtimenow()” for “ת אסמכתא” field click on functions and choose the function “localtimenow()” for “סוג תנועה” field enter “m” for “פרטים” field choose ‘reports’ and then ‘reportsubmitter’ from activity number 3 for “אסמכתא” field choose ‘reports’ and then ‘reportid’ from activity number 3 parse json/xml to access all the expense fields, such as the ‘reimbursable’ value, parse the exported report from activity 3 click on the the right field of “content” and the tooltip will pop up showing the options of the values you can choose choose the export report result from activity 3 click on the “load json/xml sample to generate structure paste sample json payload from activity 3 to learn about parsing, https //app archbee com/docs/ixqqblwfxopjg0nave78y/ ddvjwv7zsh7ylijtbpvf for each loop each exported report, can have many expenses add a new activity and choose the “for each loop” action click on the the right field, and the tooltip will pop up showing the options of the values you can choose choose the export report result and then select the expenses value from activity number 3 create “פירוט התנועה” (subform of “יומן תנועות”) for each expense we will create “פירוט תנועה” in priority add a new activity and choose the “create “פירוט התנועה” (subform of “יומן תנועות”)” action of priority click on the empty field next to “מס תנועת היומן (יומן תנועות)” and a tooltip will pop up showing the options of the value you can choose choose the “מס תנועת היומן” value from “create “יומן תנועות”” activity click on the “add fields” button to fill the fields in the “פירוט תנועה” subform on the left field, select from the drop down the field you want to populate in the subform for this process choose the fields חשבון תאור חשבון סכום חובה אסמכתא 1 שורת ת”י פרטים שורת ת”י click on the right field, and a tooltip will pop up showing the options of the values you can choose for the “חשבון” field choose ‘reports,’ then ‘expenses,’ and finally select the “expensecatergotygicode” value from the exported report in activity number 3 for the ‘תאור חשבון’ field, choose ‘reports,’ then ‘expenses,’ and finally select the ‘expensecategory’ value from the exported report in activity number 3 for the “סכום חובה” field choose ‘reports,’ then ‘expenses,’ and finally select the “expenseamount” value from the exported report in activity number 3 for the “אסמכתא 1 שורת ת”י” field choose ‘reports,’ then ‘expenses,’ and finally select the “reportnumber” value from the exported report in activity number 3 for the “פרטים שורת ת”י” field choose ‘reports,’ then ‘expenses,’ and finally select the “expensecomment” value from the exported report in activity number 3 for each loop add a new activity and choose the ‘for each loop’ action to specify the amounts for reimbursable and non reimbursable expenses click on the the right field, and the tooltip will pop up showing the options of the values you can choose choose the parsing of the export report and then select the expenses value if condition add a new activity and choose the ‘if’ action click on “add condition” choose the parsing of the export report, then select the ‘expenses’ value and the ‘reimbursable’ property choose “=” condition in the right, enter the value ‘true’ if the value of reimbursable is ‘true’, we are in “if yes” section add a new activity and choose the ‘set variable’ action click on the drop down and choose the name you gave the variable you initialize, reimbursable click on the empty field next to the “value” click on the functions choose the add function on the left side, choose the amount field from the pasring on the right side, choose the field reimbursable variable if the value of reimbursable is ‘true’, we are in “if no” section add a new activity and choose the ‘set variable’ action click on the drop down and choose the name you gave the variable you initialize, non reimbursable click on the functions choose the add function on the left side, choose the amount field from the pasring on the right side, choose the field non reimbursable variable create “פירוט התנועה” (subform of “יומן תנועות”) add a new activity and choose the create “פירוט התנועה” (subform of “יומן תנועות”) action of priority מס תנועת היומן (יומן תנועות) field click on the empty field and choose from the tooltip the “מס תנועת היומן ” from create “יומן תנועות” activity click on the “add fields” button to fill the fields in the “פירוט התנועה” subform on the left field, select from the drop down the field you want to populate in the table for this process choose the fields חשבון סכום חובה אסמכתא 1 שורת ת”י click on the right field, and the tooltip will pop up showing the options of the values you can choose for the “חשבון” field write 3025 for the “סכום חובה” field click on the functions choose the sum function enter the field reimbursable value from activity 21 for the “אסמכתא 1 שורת ת”י” field click on the functions choose the first function choose the report number value from the exported report create “פירוט התנועה” (subform of “יומן תנועות”) add a new activity and choose the create “פירוט התנועה” (subform of “יומן תנועות”) action of priority מס תנועת היומן (יומן תנועות) field click on the empty field and choose from the tooltip the “מס תנועת היומן ” from create “יומן תנועות” activity click on the “add fields” button to fill the fields in the “פירוט התנועה” subform on the left field, select from the drop down the field you want to populate in the table for this process choose the fields חשבון סכום זכות אסמכתא 1 שורת ת”י click on the right field, and the tooltip will pop up showing the options of the values you can choose for the “חשבון” field write 3025 for the “סכום זכות” field click on the functions choose the sum function enter the field reimbursable value from activity 21 for the “אסמכתא 1 שורת ת”י” field click on the functions choose the first function choose the report number value from the exported report create “פירוט התנועה” (subform of “יומן תנועות”) add a new activity and choose the create “פירוט התנועה” (subform of “יומן תנועות”) action of priority מס תנועת היומן (יומן תנועות) field click on the empty field and choose from the tooltip the “מס תנועת היומן ” from create “יומן תנועות” activity click on the “add fields” button to fill the fields in the “פירוט התנועה” subform on the left field, select from the drop down the field you want to populate in the table for this process choose the fields חשבון סכום זכות אסמכתא 1 שורת ת”י click on the right field, and the tooltip will pop up showing the options of the values you can choose for the “חשבון” field write 3026 for the “סכום זכות” field click on the functions choose the sum function enter the field non reimbursable value from activity 22 for the “אסמכתא 1 שורת ת”י” field click on the functions choose the first function choose the report number value from the exported report create “פירוט התנועה” (subform of “יומן תנועות”) add a new activity and choose the create “פירוט התנועה” (subform of “יומן תנועות”) action of priority מס תנועת היומן (יומן תנועות) field click on the empty field and choose from the tooltip the “מס תנועת היומן ” from create “יומן תנועות” activity click on the “add fields” button to fill the fields in the “פירוט התנועה” subform on the left field, select from the drop down the field you want to populate in the table for this process choose the fields חשבון סכום זכו אסמכתא 1 שורת ת”י click on the right field, and the tooltip will pop up showing the options of the values you can choose for the “חשבון” field write 3006 for the “סכום זכות” field click on the functions choose the sum function enter the field reimbursable value from activity 21 for the “אסמכתא 1 שורת ת”י” field click on the functions choose the first function choose the report number value from the exported report create report template (pdf) add “create a report template” action of expensify add a new activity and choose “create report template” action of expensify template format click on the on the right field of “template format ” and choose pdf from the tooltip name click on the the on the right field of “name” and write “report template” template fields click on “add template field click on the left side and write the name of the field, for example “approvedreport” click on the right side and choose the values from the tooltip for example, report approved repeat on steps 4 to add more fields in addition to the fields we already added, if necessary export report export the template of the report you have just created choose the template you have created report template click on “add fields” button on the left field, select from the drop down the field you want to populate filter report ids\[] output include full page receipts pdf click on the right field, and the tooltip will pop up showing the options of the values you can choose for the ‘filter report ids\[]’ field click on the functions choose the createarray function enter the reportid from the exported report for ‘output include full page receipts pdf’ click on ‘true’ in the field options create “נספחים” (subform of “יומן תנועות”) add a new activity and choose the create “נספחים” (subform of “יומן תנועות”) action of priority מס תנועת היומן (יומן תנועות) field click on the empty field and choose from the tooltip the “מס תנועת היומן ” from create “יומן תנועות” activity click on the “add fields” button to fill the fields in the “נספחים” subform on the left field, select from the drop down the field you want to populate in the table for this process choose the fields נתיב קובץ שם קובץ click on the right field, and the tooltip will pop up showing the options of the values you can choose for the “נתיב קובץ” field click on the functions choose the concat function which combines two or more strings, or expression text results into a single string on the left side of the comma enter the first name from the billing from activity 1 the first value is “data ” for the second value, choose the getmimetype function, which returns the mime type of a given file extension, and enter “ pdf” for the third value, enter “;base64,” for the fourth value, enter the exported pdf report for the “שם קובץ” field click on the functions choose the concat function which combines two or more strings, or expression text results into a single string on the left side of the comma enter the reportid of the exported report on the right side of the comma enter “ pdf”