In Mind, Cloud provides the ability to write custom logic on top of standard application functionality in groovy scripts to cater to custom business requirements that cannot be solved through configuration. Some sample scenarios could be:
- Integrate with arbitrary external systems for order creation, pricing, document storage, approval via BAPIs
- implement non-standard ERP integration
- Define general application behavior such as defaulting of values, copy behavior, etc.
- Influence pricing or availability of custom attributes values
- Implement functions on top of Google Maps API
- Prepare content before generating a PDF quote
Specific features (not a complete list) are:
# |
Field Name |
Description |
---|---|---|
1 |
Retrieve details of a quote line item |
- Object name - ERPID - Product type - Product URI - SalesItem URI - Quantity - Value of a dynamic attribute |
2 |
Change the quantity of a line item |
|
3 |
Filter children by |
- Product / ERP ID - Product type - Dynamic Attribute |
4 |
Get parent/children of a line item |
|
5 |
Check whether a line item contains a dynamic attribute |
|
6 |
Set value of the dynamic attribute |
|
7 |
Change the parent line item |
|
8 |
Add child line items |
|
9 |
Split/copy delete line items |
|
10 |
Send notification to the user |
|
The scripts can be loaded in the master data management tab of the administration work center under ‘Administration’ > ‘Master Data Management’ > ‘Groovy Scripts’ or, if there have been groovy scripts uploaded already, under ‘Administration’ > ‘Content Management’ > ‘groovy’.
Pricing: Update and Remove Functions
A Create function should always have an Update and a Remove operation available since otherwise due to several circumstances operations do leave the model space. In this case, the delete library function is missing in the Groovy library.
Proposed solution:
- create new method underclass SalesItemNode to delete price item
Additional documentation from In Mind Cloud and other official sources as well as recommended editors can be found here:
- In Mind Libraries for Groovy Scripts; 'https://in-mind-cloud.github.io/content/groovy-doc/'
- Recommended Editor; 'https://code.visualstudio.com/'
- Official Language Documentation; 'http://groovy-lang.org/'
Note: For specific requirements, consult with your Customer Success Manager and/or your implementation team.
Groovy Script on Create and Update
Exit points are supported to write a groovy script after creating and updating. The user(s) can use these to improve data quality by adding validation checks, calculating, and defaulting values based on custom logic to leverage them on their initial implementation to meet the ever-changing business requirements. These exit points are available on creating and after saving for the following key objects:
- Account
- Opportunity
- Product
- Quote
While this can solve many problems, below are just some examples of frequently requested features:
- Account: on save check if account domain is empty, then use contact e-mail to fill it, to improve duplicate check
- Account: on create use address to default the right Sales Org, Distribution channel, division, currency.
- Opportunity: Use account region to default Sales Org, Use ABC classification to default distribution channel (Direct vs digital), use account prospect to decide division / type - New Business vs Upsell
- When the ERP ID of a product changes, add the old ERP ID in a custom field (append values comma separated), to track old IDs.
Quote Auto Save Before and After Groovy Script Execution
A significant update to our system provides enhanced flexibility for Groovy script exits. This update addresses the need for precise control over when Quotes are saved—both before and after Groovy script execution.
- Toggles for Auto Save: Introducing two new boolean toggles named "Auto Save Before Execution" and "Auto Save After Execution" within the configuration options for Groovy scripts of Type “Organize Line Item Structure.
- Toggle Functionality: When "Auto Save Before Execution" is set to "True," the system will automatically save the Resource before the execution of the Groovy script. When "Auto Save After Execution" is set to "True," the system will automatically save the Resource after the execution of the Groovy script.