Involve adopting a standardized approach to development and management. Here are some best practices to consider:
Best Practices for OmniScript
To improve the functionality and usability of OmniScript, it’s recommended to follow these best practices:
- Provide a description of an element’s function in its Internal Notes attribute.
- Avoid changing the element names to maintain DataRaptors and Apex classes. If a name change is required, modify the name of the DataRaptor or Apex class instead of the element.
- Avoid assigning a ContextId to the OmniScript. The ContextId reserved key in OmniScript assigns a Record Id based on the URL.
- Create reusable OmniScripts and add them to the relevant parent OmniScripts when procedures can be repeated across numerous scripts.
- Implement global branding using the Newport Design System.
- Assign only one owner for each OmniScript.
- Create a skeleton of the entire OmniScript to identify reusable elements.
- Prefill forms with contextual data to reduce the number of fields the user must fill out.
- Divide processes into simpler steps with fewer components to avoid confusing the user.
- Provide contextual help text and logically order input fields to assist the user.
- Trim the Response JSON to speed up the application of responses.
- Eliminate spaces from element names to speed up the loading of OmniScript.
- Keep the element count low in the script. The recommended maximum number of items in one OmniScript is 200.
Best Practices for DataRaptors
To ensure that DataRaptors function correctly, it is recommended that you follow these best practices:
- Create DataRaptors that extract or load data for a single task only.
- Use relationship notation (queries) whenever possible when retrieving data from other SObjects.
- Use relationship notation in the Extract JSON Paths for parent sObject fields instead of adding a second sObject in the DataRaptor’s Extract tab. Only child-to-parent relationship queries are supported by DataRaptors.
- Limit the number of SObjects used in DataRaptors to three or less.
- Ensure that all filtering and sorting operations (ORDER BY) are performed on indexed fields. The Id and Name fields are always indexed.
- Consider using caching to store frequently accessed but infrequently updated data. When you call a DataRaptor from a caching Integration Procedure, the DataRaptor data is cached alongside the Integration Procedure data.
Best Practices for Integration Procedures
To maximize the effectiveness of Integration Procedures, it is recommended to follow best practices whenever possible.
- Use Integration Procedures for all data calls to Salesforce.
- Trim the data returned by using a Response Action in Integration Procedures to only return what is required.
- To allow early exit from an Integration Procedure under certain conditions, use multiple Response Actions with different Execution Conditional Formulas.
- Caching can be used to store frequently accessed but infrequently updated data.
- To run data operations asynchronously, call Integration Procedures with the following settings:
- Use Future: If completion time is not critical and the calling OmniScript or Integration Procedure does not require a response.
- Invoke Mode: Fire and Forget: If the calling OmniScript needs to immediately invoke the Integration Procedure, use this method instead of Use Future.
- Invoke Mode: Non-Blocking: Use this method to run the Integration Procedure immediately while continuing the user interaction of the calling OmniScript. A response is provided when the Integration Procedure is completed.
Best Practices for Flex cards
Use Flex cards sparingly: Flex cards should be used only when necessary, such as when there is a need to display data in a customizable way.
- Use appropriate Flexbox properties: Use Flexbox properties to control the layout of Flex cards, such as flex-direction, justify-content, align-items, and align-self.
- Limit the number of Flex items: Avoid having too many Flex items within a Flex container. This can make it difficult to manage the layout and may cause performance issues.
- Use responsive design: Ensure that the Flex cards are responsive by using media queries to adjust the layout based on the screen size.
- Use appropriate typography and color: Use appropriate typography and color to ensure that the Flex cards are easy to read and visually appealing.
- Use appropriate images: Use high-quality images that are optimized for the web and that are relevant to the content being displayed.
- Test on multiple devices: Test the Flex cards on multiple devices and screen sizes to ensure that they are displayed correctly and that the layout is consistent.
- Use consistent design: Ensure that the design of the Flex cards is consistent with the rest of the application to provide a cohesive user experience.
I hope this information is helpful for you.