-
Notifications
You must be signed in to change notification settings - Fork 153
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
Comprehensive enhancements for Salesforce connector #1859
Comments
I think this could be implemented with Advanced Sync Rules. We could set it up identically to WS Salesforce connector. We could do something like:
|
We've one more option to fetch all fields including custom ones using SOQL query - As per this point - Also, the RCF seems easy to configurable to user for specifying custom objects for this point - what's your view on it? @danajuratoni @navarone-feekery |
The downside/limitation to using We currently map the result to an elastic doc format in this class, so including all custom fields will return some fields not included here that have a Currently all elastic doc keys are snake case. @danajuratoni would you prefer if we convert the custom fields to snake case? The above |
I want to avoid RCFs for this. This would be a dynamic JSON input that the user would need to configure. I think using Advanced Sync Rules is a better fit. The Kibana UI supports it and the JSON is much easier to edit. We can add custom objects to the example I made above, like this: {
"indexing": {
"rules": [
{
"object": "account",
"all_custom_fields": false,
"fields": [
{
"remote": "AccountNumber",
"target": "title"
},
{
"remote": "Phone",
"target": "description"
}
]
},
{
"object": "campaign",
"all_custom_fields": true,
"fields": []
},
{
"object": "idea",
"all_custom_fields": false,
"fields": [
{
"remote": "IdeaNumber",
"target": "idea_number"
},
{
"remote": "Origin",
"target": "origin"
}
]
}
]
}
} In this structure the In the above example, |
I followed documentation here to configure the OAuth permissions for a custom app. We would need to figure out which of these permission(s) are the lowest required to do all of the operations we need. |
I had a look and found that we didn't have DLS set up for the Workplace Search Salesforce connector (list of ACL-enabled WS sources), so we would be starting from zero here. |
Agreed, |
I feel the same. Advanced sync rules would be more flexible for user to specify objects and fields. @navarone-feekery I've drafted a schema {
"objects": [
{
"object": "Account",
"object_type": "standard",
"all_custom_fields": false,
"custom_fields": [
{
"field": "BirthYear",
"field_type": "custom"
}
],
“standard_fields”: [
{
"field": "AccountNumber",
"field_type": "standard"
}
]
},
{
"object": "Connector",
"object_type": "custom",
"all_custom_fields": true,
"custom_fields": [],
“standard_fields”: [
{
"field": "ConnectorName",
"field_type": "standard"
}
]
}
]
} |
@navarone-feekery just a question, in which case all custom objects should index? Are we planning ingest all pre-defined objects (
cc: @danajuratoni |
@moxarth-elastic Thanks for thinking of a sample schema! I have a few concerns about it though. In the I chose I'm happy with having Also thinking back I don't like Your sample with edits: {
"objects": [
{
"object": "Account",
"ingest_all_custom_fields": false,
"fields": [
{
"remote": "BirthYear__c",
"target": "custom"
},
{
"remote": "AccountNumber",
"target": "account_number"
}
]
},
{
"object": "Connector__c",
"ingest_all_custom_fields": true,
"fields": [
{
"remote": "ConnectorName",
"target": "connector_name"
}
]
}
]
} |
Oh, i see. I've added a type just to add
Totally agreed, we should make this consistent with the WS connector.
+1. Even i was thinking the same, The updated schema looks good to me 👍 |
Another point I've found out (this time about DLS): Salesforce DLS exists for both Objects and Fields. This is an issue for us for two main reasons (cc @danajuratoni):
|
Regarding Field Level Security (FLS), we do support it in Elasticsearch, just not in any connectors yet. Here's some extra documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/field-level-security.html |
@moxarth-elastic I've spoken with the team on this topic and there are a few points that we would like to see implemented/changed.
|
Yes, i think this should be done because we never know what fields will be there in custom objects and might get missed while doing custom mapping. Even we've done a 1:1 representation in Jira connector due to custom fields' presence.
Yes, SOQL can be a flexible approach. @navarone-feekery Do you have any draft schema in mind? |
@navarone-feekery @danajuratoni For the SOQL query, there is a limitation i have recently come across that if we use |
@navarone-feekery please refer this documentation to remove global admin permission role to fetch data from salesforce - https://docs.google.com/document/d/1HL2SNhdAvXN7SakBXdBN1AwjPhVkJpudhkbRVwElAv0/edit#heading=h.cjdfeh86h0i. |
Discovery doc for DLS: https://docs.google.com/document/d/1_mt7zNS4HW98QjM3_dIBntVbqr9vfH8wyFzx1gogXjY/edit |
@moxarth-elastic Were there any changes related to this needed in the connector? Which connector version is the first one that can be used without global admin permission role? |
There were no changes related to this in the connector. The current version can be used with the suggested approach in the doc. |
cc: @navarone-feekery ticket is waiting on the engineer signoff before closing it |
Everything looks good, thanks heaps @moxarth-elastic, great work! |
Acceptance criteria
The text was updated successfully, but these errors were encountered: