Learn about the Automation involved when Importing Data into Maica
What are the Data Import Flows?
As part of the Data Import Utility, Automation is involved to ensure it's successful completion.
When using the tool, you are prompted to select a Flow Setting that essentially tells Maica which type of Data you are wanting to Import and allows the Automation to read the files correctly. It is important to understand the logic within the Automation and the altercations to the Data that will be involved when doing so. This article explains the logic behind each Flow Setting in more detail.
Maica - NDIS Import Support Items Catalogue
This flow is designed to automate the import of NDIS support items and their associated prices based on various state-specific rates and conditions.
Flow Detail
Flow Label
Maica - NDIS Import Support Items Catalogue
API Name
maica__Maica_NDIS_Import_Support_Item_Prices
Type
Autolaunched Flow
Flow Summary
This flow imports NDIS support items and their associated prices based on state-specific rates and conditions.
Starts automatically and checks if the Support Item Number is present.
Calls the import support item Apex action if the item number is valid.
Passes variables like allowed states, claim types, prices for different regions, and item details.
Handles errors by assigning appropriate fault messages when required.
Flow Description
Start (Auto-Launched Flow):
The flow is auto-launched and starts by verifying whether the Support Item Number is present.
It checks if the Support Item Number is not null or empty.
Decision (Support Item Number Is Not Null):
Outcome: Null: If the Support Item Number is empty or null, the flow proceeds to the Handle Support Item Number Null step, which sets an error message.
Outcome: Not Null: If the Support Item Number is present, the flow proceeds to the Call Import Support Item step.
Call Import Support Item (Apex Action):
The flow uses the NDISImportSupportItemsPricesInvocable Apex class to import the support item and its associated prices.
The following input parameters are passed to the Apex class:
allowedStates: The states where this item is applicable.
claimTypesFormula: The applicable claim types, built from multiple variables like CANC, IRSS, etc.
priceACT, priceNSW, priceNT, priceQLD, priceRemote, priceSA, priceTAS, priceVeryRemote, priceVIC, priceWA: The price of the support item for each state or region.
priceBookDescription: Describes how the item appears in the price book.
isQuoteRequired: A Boolean indicating if a quote is required, calculated using the quoteFormula.
registrationGroupCode, supportCategoryName, supportCategoryNumber, itemName, itemNumber, supportItemType, unit: Key details such as the support item's name, number, type, and unit.
Handle Error (Assignment):
If an error occurs during any stage of the flow, the FlowFaultMessage variable is assigned the error message for tracking and troubleshooting purposes.
Handle Support Item Number Null (Assignment):
If the Support Item Number is not provided, the flow assigns the error message: "Support Item Number is required for import."
Maica - NDIS Support Catalogue Import Configuration
This flow is designed to facilitate the configuration and import process for the NDIS Support Catalogue. It allows users to select specific areas (states) and provides the option to include additional descriptions for the generated Price Books.
Flow Detail
Flow Label
Maica - NDIS Support Catalogue Import Configuration
This flow streamlines the process of importing NDIS support catalogue data into Maica by allowing users to configure Price Book creation for specific states.
Users select states for which Price Books will be generated.
A description can be added for each Price Book.
The created Price Book records are used to organise NDIS support items based on regions.
Flow Description
Start (Screen Element):
The flow begins with a screen to configure the NDIS Support Catalogue import.
It contains two key options:
Selection of areas (states) for which Price Books will be created.
An optional description field to save relevant notes on the new Price Book(s).
Dynamic Choice Set (StateOptions):
Retrieves available states from the Pricebook2 object.
This dynamic choice set is used in the screen for state selection.
Assignment (Assignment):
The selected areas (states) and the description for the Price Books are stored in the respective variables.
The allowedStates and priceBookDescription variables are updated based on user inputs.
Maica - NDIS Import Update Support Items
This flow is designed to import and update NDIS support items, ensuring that relevant fields such as Claim_Types__c, Quote_Required__c, and Support_Item_Type__c are correctly populated for each Support Item (Product2). It includes error handling for missing or non-existent Support Items and updates existing records when conditions are met.
Flow Detail
Flow Label
Maica - NDIS Import Update Support Items
API Name
maica__Maica_NDIS_Import_Update_Support_Items
Type
Autolaunched Flow
Flow Summary
This flow ensures that NDIS support items are updated based on the data import, with proper error handling for missing or non-existent items.
Starts with checking if the Support Item Number is provided.
Retrieves the Support Item using the Support Item Number.
Updates key fields (Claim Types, Quote Required, Support Item Type) if the item exists.
Handles errors when the Support Item is not found or the Support Item Number is missing.
Flow Description
Start (Scheduled Trigger)
This flow is triggered by a data import event where support items need to be updated.
Support Item Number Is Not Null (Decision)
The flow checks if the Support_Item_Number__c is provided.
If the Support_Item_Number__c is null, the flow moves to an error handling step.
If the Support_Item_Number__c is not null, it proceeds to retrieve the Support Item.
Get Support Item (Record Lookup)
The flow looks up the Support Item (Product2) record using the provided Support_Item_Number__c.
If the record is found, it moves on to check if the item exists.
If the record is not found, it moves to handle the error.
Does Support Item Exist (Decision)
The flow checks whether the Support Item exists based on the lookup.
If the Support Item exists, the flow continues to update the record.
If the Support Item does not exist, the flow moves to an error step indicating that the Support Item does not exist.
Set Support Item (Assignment)
This step assigns values to the relevant fields on the Support Item:
Claim_Types__c is set using the formula claimTypesFormula.
Quote_Required__c is set using the formula quoteFormula.
Support_Item_Type__c is set using the input value itemType.
Update Support Item (Record Update)
The flow updates the Support Item (Product2) record with the assigned values.
If an error occurs during the update, the flow moves to the error handling step.
Handle Support Item Number Null (Assignment)
This error handling step is triggered if the Support_Item_Number__c is null.
The flow assigns a fault message: "Support Item Number is required for import."
Handle Support Item Doesn’t Exist (Assignment)
If the Support Item lookup returns no results, the flow assigns a fault message: "There is no existing Support Item."
Handle Error (Assignment)
This step is used to capture any unexpected errors during the flow execution.
The flow assigns the system fault message to the FlowFaultMessage variable.
Maica - Client Care Reference Data Import Handler
This flow is designed to handle the import of CSV data into the Maica system, populating various reference data objects such as Appointment Service, Availability, Checklist, Client Goal, and others. The flow allows for creating and updating records for these objects based on imported data, and provides error handling mechanisms for any issues during the import process.
This flow processes CSV imports and creates or updates reference data records for the Maica system, handling various objects related to client care.
Determines the object type from Object_API_Name and processes it accordingly.
Creates or updates records for objects such as Appointment_Service, Availability, Checklist, Client_Goal, Resource, and more.
Provides error handling mechanisms to capture and log faults during the import process.
Flow Description
Start (Auto-launched Flow):
The flow starts by evaluating the Object_API_Name to determine which type of record to process.
Decision (DECISION_Object_API_Name):
Determines the object type based on Object_API_Name and routes the flow accordingly to handle specific objects like Resource, Availability, Unavailability, etc.
If an unknown object type is encountered, it triggers the fault message.
Assignment (ASSIGN_Appointment_Service_Values):
Assigns values to various fields in the Appointment_Service object, such as Available_Sections__c, Claim_Types__c, Client_Note_Template__c, End_Date__c, and others.
Assignment (ASSIGN_Availability_Values):
Assigns values to the Availability object, including fields like Active__c, Effective_From__c, Effective_To__c, Location__c, and others.
Assignment (ASSIGN_Checklist_Values):
Assigns values to the Checklist object, such as Create_During_Quick_Complete__c, Default_Checklist_Item_Status__c, End_Date__c, and others.
Record Lookup (GET_Resource):
Retrieves a Resource record based on the provided Resource_Name.
If the record is found, the flow assigns the Resource_Id and proceeds to update the relevant object.
Record Create (CREATE_Appointment_Service):
Creates a new Appointment_Service record using the assigned values.
If an error occurs, the flow assigns a fault message to handle the error.
Record Create (CREATE_Availability):
Creates a new Availability record with the provided values.
Record Create (CREATE_Client_Goal):
Creates a Client_Goal record by assigning values like Contact__c, Goal__c, Description__c, Stage__c, and others.
Maica - Client Management Reference Data Import Handler
This flow is designed to handle the import of reference data objects for Maica Client Management via a CSV. It looks up and creates records for several Salesforce objects such as Product2, Pricebook2, Connection__c, Support_Category__c, and PricebookEntry.
Flow Detail
Flow Label
Maica - Client Management Reference Data Import Handler
This flow imports client management reference data from CSV into Maica.
It handles objects such as Product2, Pricebook2, Connection__c, Support_Category__c, and PricebookEntry.
The flow performs the following actions:
Looks up existing records (e.g., Contact, Product, Support_Category).
Assigns values to variables (e.g., Connection__c, Product2, Support_Category__c).
Creates new records (e.g., Connection__c, Product2, Support_Category__c, PricebookEntry).
Includes decision logic to route based on the object’s API name (e.g., Product2, Pricebook2, maica__Support_Category__c).
Handles error conditions with fault messages (e.g., missing Standard Price Book).
Flow Description
Start (Triggered by CSV):
The flow starts when CSV records are imported.
DECISION_Object_API_Name (Decision):
Determines the object to process based on the Object_API_Name passed to the flow.
Routes the flow to handle various object types, such as Product2, Pricebook2, or maica__Support_Category__c.
GET_Contact (Record Lookup):
Looks up the Contact object using the Contact_Name.
Assigns the Id of the retrieved contact to Contact_Id.
ASSIGN_Connection_Values (Assignment):
Assigns values to a new Connection__c record (such as Contact__c, Invoice_Recipient__c, and Primary_Contact__c).
The assigned values are later used in the CREATE_Connection.
CREATE_Connection (Record Create):
Creates a new Connection__c record using the values assigned from the ASSIGN_Connection_Values.
GET_Product (Record Lookup):
Looks up a product (Product2) based on Product_Name.
The found product's Id is stored in Product_Id.
ASSIGN_Product_Values (Assignment):
Assigns values to the Product2 record, including fields such as Support_Item_Type__c, GST_Code__c, and Funding_Level__c.
CREATE_Product (Record Create):
Creates a new Product2 record based on the assigned values.
GET_Standard_Price_Book (Record Lookup):
Fetches the standard price book if it exists and is active, storing the Id.
DECISION_Standard_Price_Book_Entry (Decision):
Checks whether a price book entry exists for the product in the standard price book.
If not, routes to create the PricebookEntry.
CREATE_Standard_Price_Book_Entry (Record Create):
Creates a new standard price book entry for the product if it does not already exist.
GET_Support_Category (Record Lookup):
Looks up a Support_Category__c record using the Support_Category_Name.
Stores the category Id for further processing.
ASSIGN_Support_Category_Values (Assignment):
Assigns values to the Support_Category__c record, such as Budget_Type__c, Category_Number__c, and Support_Purpose__c.
CREATE_Support_Category (Record Create):
Creates a new Support_Category__c record using the assigned values.
Flows related to the BPR Remittance File Import are located on the Remittance Management page, whilst Flows related to the NDIS BPR Results File are located on the Claim Management page.