- Commander release 8.0.X or higher
- Commander REST API v2 Powershell Module v2.9.1
- Commander Forex Script File
Create the Commander REST API Credential
It is recommended to create a superuser account in Commander that is used only for API actions such as the workflow in this article so you can easily identify actions taken by workflows or other automated systems.
If you have already created a credential for use with the Commander REST API you can skip this section and use that credential instead.
- In Commander, select Configuration > Credentials.
- Click Add.
- In the Add Credentialsdialog:
- Select Username/Password for the Credentials Type.
- Enter Commander REST API for the Name.
- Enter the required username (for example "apiuser") and password.
- For Category, select Guest OS Credentials.
- Click OK.
Create the Scheduled Workflow
- In Commander, select Configuration > Command Workflows.
- Click Add.
- In the Command Workflow Configuration dialog:
- Enter Commander Forex Sync for the Name.
- Select No inventory Target as the Target Type. Click Next.
- Add an Execute Embedded Script step.
- Enter Sync Forex for the Name.
- Select the Commander REST API credential.
- Enter powershell.exe for the Executable.
- Copy and paste the contents of the commander_forex_sync.ps1 file into the Script Contents.
- Edit the Script Contents and set the $baseCurrency to the 3-digit currency code for the currency your billing data is received in.
- Set the $convertToCurrency to the 3-digit currency code for the currency you want to convert your billing data to.
- Set the $targetCostModel to the name of the Commander Cost Model related to the costs you wish to convert.
- Click Next and save the workflow.
- On the Command Workflow list, select the Commander Forex Sync workflow and select Schedule > Schedule at the bottom.
- Set the Frequency to Daily and select a Time. Click Next and save the schedule.
Configure the displayed Currency Symbol
- In Commander, select Configuration > Costs. Select Cost Configuration.
- Select the currency symbol you want to display from the Currency Symbol dropdown.
- Click Save Settings to save your changes.
Once the Scheduled Workflow runs the script will retrieve the currency exchange rate between your base currency and the convert-to currency and save it to the Cost Model you chose.
The exchange rate will be stored as the Markup of the selected Cost Model and will apply to all costs seen by users in the Commander User Portal.
Combined with the selected Currency Symbol the Commander User Portal users will see prices in their local currency value and with their local currency symbol.