Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom field mappings in Flow #719

Open
jongpie opened this issue Jul 15, 2024 · 3 comments
Open

Add support for custom field mappings in Flow #719

jongpie opened this issue Jul 15, 2024 · 3 comments
Labels
Feature: Custom Field Mappings Items related to custom field mappings functionality Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Logging Source: Flow Items related to using Nebula Logger within Flow Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Type: Enhancement New feature or request

Comments

@jongpie
Copy link
Owner

jongpie commented Jul 15, 2024

In v4.13.14, custom field mappings were added for Apex. This same/equivalent functionality should be added for lightning components to use via the Flow invocable classes.

@jongpie jongpie added Type: Enhancement New feature or request Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Logging Source: Flow Items related to using Nebula Logger within Flow Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Feature: Custom Field Mappings Items related to custom field mappings functionality labels Jul 15, 2024
@JaskiratSinghIH
Copy link

Hi @jongpie, just wanted to get an ETA for this issue. As once this is feature releases, we are going to leverage this custom mapping attributes for datadog integration.

@jongpie
Copy link
Owner Author

jongpie commented Oct 27, 2024

Hi @JaskiratSinghIH - at the moment, I don't expect to work on this for at least several months. There are several challenges with making this work in Flow, including:

  • How to handle Flow's lack-of-support for generic Object inputs/outputs - since the custom fields could be of any data type, the custom actions need to have some way to support all data types, without using Object
  • How to present this functionality in Flow. I have issue Add custom property editor (CPE) for Flow invocable actions #753 open as a way to possibly improve the UI overall (using custom property editors) - this would also provide a way to help with mapping of the custom fields/attributes, but it also introduces a lot more complexity for the invocable actions.

My plan is to eventually build some proof-of-concepts for some of this & try to determine a path forward. But in the meantime, there are several other enhancements/issues with a clearer path forward, so I'll be focused on other items for the next few months.

With all that said, I'd love to know more about how this will help with your integration with Datadog - several people have asked for Nebula Logger to have Datadog integration (example: issue #466 started as a request for Datadog support), and I hope to provide it in the future using OpenTelemetry (OTEL), though I have not used Datadog very much myself & there's still some more exploration that I need to do. Can you share some context on how you plan to use custom fields/attributes in your Datadog integration?

@JaskiratSinghIH
Copy link

JaskiratSinghIH commented Oct 28, 2024

Hi @jongpie, Thanks for the quick response!!

Datadog Approach: As mentioned in #466 once the custom mapping is achieved then we can leverage the plugin approach -

  1. Creating Plugin Class For Datadog Integration: When the custom fields are populated on the Log Entry record, then plugin class will be executed which will perform the Datadog Integration to send the Log details as a JSON to the datadog.

We just need an approach for Logging & Datadog Integration from flow as the latest nebula logger package already has custom mapping feature implementation introduced in apex and LWC.

I also have the following suggestive approach for logging in flow for custom fields-

We are going to create a replica for FlowLogEntry to get all the standard logger attributes as well as add our custom attributes, and replace the flow apex action Add Log Entry with our new apex class. When this new apex class is executed from the flow action it will map the custom attributes in the platform event record using the “getLogEntryEvent” function and for the standard attributes it will call the logger functionality FlowLogger class for processing and finally save the Log records.

PRO: : No custom code or optimizations will be done in the nebula package-specific classes.
CON: : Whenever the latest package version will be introduced and installed with the latest features in the flow actions (FlowLogEntry, FlowRecordLogEntry, and FlowCollectionLogEntry), we have to manually update my custom class as well.

Please let me know if you have any questions/thoughts on this approach or if we should wait until you release this feature implementation for flow ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Custom Field Mappings Items related to custom field mappings functionality Layer: Configuration Items related to the custom hierarchy setting LoggerSettings__c or any included custom metadata type Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Logging Source: Flow Items related to using Nebula Logger within Flow Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants