I want to automatically get the Billing Invoice details of my Azure Resource-group on a monthly basis using the Schedule Export feature in Azure Cost-Management.
I'm able to create a monthly export. However, I'm not able to get the entire month's invoice details. Eg. Oct2020, Nov2020, Dec2020.
Instead this is the format in which my invoice is getting exported -->
This doesn't prove to be useful to me because I need to get the billing and invoice details for the entire month. And the invoice should automatically be exported monthly.
Eg. Oct2020 then next -> Nov2020 then next -> Dec2020, so on & so forth.
Any advise on how to achieve this?
Thanks in advance!
As you mentioned, the scheduled exports doesn’t support invoice-wise data export. However, here is what you can do:
Use Azure Cost Management Query API to generate the usage for the invoice period using the custom timeframe value.
Convert the JSON response to CSV.
Export the file to Storage Account.
Currently, the Query API supports grouping up to 10 dimensions. If you need the complete dataset, you can use Usage List API instead of Query API. In the Usage List API, you can specify the start and end date (as per your invoice) using the $filter parameter. Rest of the process is same.
Related
A power automate flow triggered on a daily schedule will check the list for any tickets that meet (or exceed) due date and submit a ticket to Orion via email. The last run and due date will then be updated. The system may be used to trigger tickets in supplier interface in the future - the destination system should be considered in the list schema.
i am having a hard time to develop a flow that executes the above requirement.
In Power Automate, create a scheduled flow that runs every day.
Declare all variables you will need later.
Assuming you store the value of the last run timestamp in a configuration SharePoint list for example, search and use the action Get item to get the list item where the last run time is stored in this list (you're have to create it if not existing though).
Search and use the function utcNow() in an expression to get the current datetime value.
Convert the previous datetime value with the action Convert time zone to an ISO-8601 datetime using FormatDateTime() function according to your timezone.
Search and use the action Get list items to get all the items of day from your SharePoint list, and filter the query via an OData expression according to the rule (today's date =< last run date + frequency).
Search and use Send an email V2 to send email.
Search and use the action Update item to update the last run time that is stored in a list item in the configuration list mentionned at the beginning.
I want to preview the upcoming invoice using disposable prices. The user (sales team) can input any price they want for the product, and a table with the upcoming invoice is displayed and refreshed with each change in the input.
Since Prices are resources that we can't delete, is there a way to use temp/disposable prices valid only on the invoices.retrieveUpcoming request?
Edit:
I don't want to create a Price that will not be used at all. Think that the user can input any value at any time, and for each new value, I create a new price just to get the upcoming invoice.
The Retrieve Upcoming Invoice API has the subscription_items parameter which itself contains the price_data parameter allowing you to pass dynamic pricing as needed without having to create the Price upfront. It mirrors what the Create Subscription API offers.
I have added a schedule export for my Azure Resource Group Billing invoice on a monthly basis.
The invoice generated will consist of the billing details of the Last Month and will store the
.CSV file in my storage account as a Blob every month.
I'm using an Azure Logic app to retrieve the Invoice file and send it via mail to a group of
recipients.
The invoice is a .CSV file which consists of a number of columns like "InstanceID, MeterID,
UsageQuantity, ResourceLocation". But I need to get the TOTAL COST for the billing period.
Any idea how I can achieve this? Is there a specific column that I need to include in my CSV file. Or do I need to do some sort of data processing of the CSV file to get the total amount of resources consumed?
Any advise on this?
Thanks!
1. I created a csv file(named billing.csv) as below and upload it to blob storage.
InstanceID, MeterID, UsageQuantity, ResourceLocation, Pre tax cost
1,1,2,aa,10
2,2,3,bb,20
3,3,5,cc,30
2. In logic app, use "Get blob content" to get the csv file.
3. Search the action "Parse CSV" in you logic app.
4. The "Parse CSV" action will ask you to input "API Key", you need to go to this page first --> click "Start free trial", register an account and create a new API Key.
Copy the secret and paste it to your logic app as "API key", it will allow you to connect Plumsail.
5. Then choose the blob content into the "Parse CSV" and input the headers InstanceID, MeterID, UsageQuantity, ResourceLocation, Pre tax cost. Add a new parameter "Skip first line" and set its value as Yes.
6. Initialize a variable sum and set its value as 0 in integer type. Initialize another variable tempItem and also set its value as 0.
7. Use a "For each" loop.
The Body comes from "Parse CSV" action and the expression of "value" is: add(variables('tempItem'), int(items('For_each')?['Pre tax cost']))
8. After running the logic app, we can see the sum in last loop is:
9. Here is the whole logic app for your reference:
Import:
This solution uses the third party connector "Plumsail Documents", I'm not sure if it is free. I registered account in the past, it worked without any cost. But today the api key can't continue use, I need to register another account and create another api key. So I think this third party connector need extra cost if you want to use it for a long time.
I cannot see a way to do this natively, but essentially I would like to tap into the version history for a specific field value to calculate the difference between the current value and the last entered value.
Scenario:
Business user will update a numeric value in a column for each list item once a week to a cumulative amount. (i.e. Sales made to date)
I am currently able to see in the version history what the last entered value was, who entered it, and when it was entered. I want to know if there is a way to access this information in the form of a calculated column to find this difference (i.e. sales made this week). The solution I am thinking is adding another column for "Total Sales Last Week" and have the user manually update that when they update "Total Sales This Week" then have a calculated column to just subtract these values. However, this seems tedious since the information is already in Sharepoint. If there is a way to do this either with a calculated column, PowerAutomate flow or another method please let me know.
It is not possible to capture the Version History using calculated column. REST API is the only option that will be helpful to fetch these details. Considering this, there are two solutions that I can suggest here:
Using REST API
Create an additional column in your list and update it with the data that you will capture from version history using SharePoint REST API. Here, Rest API will be used to fetch the version history and also to update the list item.
As a trigger event to execute this code, Either you can setup a button on the page (if using any custom screen) or set this to execute periodically.
Using REST API in Power Automate (Recommended)
Power Automate/MS Flow doesn't provide any direct connector to fetch the version history but you can use the HTTP request connector which will help you to execute the SP rest call to fetch the version history.
Once you have version history data from your HTTP request call, you can use that to update the column in your list using the same power automate in next action.
This solution will be more useful as you don't need to setup any trigger event as mentioned in the first solution but instead of that you can simply configure this Power Automate to run as and when list item is updated and you will be having immediate result in your list.
You can refer to this link to check how to get data from HTTP request using Power automate and you can also refer to this link which will help you to understand how to get version history using SharePoint rest API.
I hope this will be useful information for you to achieve your goal.
We are trying to write customization to generate a download GL account summary information from Acumatica to text file. Need to be able to calculate period summary information (beginning balance, net change, and ending balance for each account using code. I'm assuming that Acumatica has an object to calculate those values for a specific Financial Period ID...but I dont know what it is. Can anyone help?
The information you're looking for is already stored in the GLHistory table. The data is aggregated by ledger, branch, financial period, account and subaccount. This information is updated by accumulator attributes that are used during the GL release process.