This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
The following commit(s) were added to refs/heads/main by this push:
new f996c243 Regen for commit 6585384c6a5a11f714a42a9b60c2444a4f47f855
(#1613)
f996c243 is described below
commit f996c24392d081cef75aefaa68cf0a7e94bd1b59
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Sep 5 07:32:50 2023 +0200
Regen for commit 6585384c6a5a11f714a42a9b60c2444a4f47f855 (#1613)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: oscerd <[email protected]>
---
docs/modules/ROOT/nav.adoc | 1 +
.../salesforce-composite-upsert-sink.kamelet.yaml | 123 +++++++++++++++++++++
2 files changed, 124 insertions(+)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index d2cf515a..1e84234c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -179,6 +179,7 @@
* xref:replace-field-action.adoc[]
* xref:resolve-pojo-schema-action.adoc[]
* xref:rest-openapi-sink.adoc[]
+* xref:salesforce-composite-upsert-sink.adoc[]
* xref:salesforce-create-sink.adoc[]
* xref:salesforce-delete-sink.adoc[]
* xref:salesforce-source.adoc[]
diff --git
a/library/camel-kamelets/src/main/resources/kamelets/salesforce-composite-upsert-sink.kamelet.yaml
b/library/camel-kamelets/src/main/resources/kamelets/salesforce-composite-upsert-sink.kamelet.yaml
new file mode 100644
index 00000000..1c281698
--- /dev/null
+++
b/library/camel-kamelets/src/main/resources/kamelets/salesforce-composite-upsert-sink.kamelet.yaml
@@ -0,0 +1,123 @@
+#---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: salesforce-composite-upsert-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Stable"
+ camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
+ camel.apache.org/kamelet.icon:
"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHZpZXdCb3g9IjAgMCA0OCA0OCIgdmVyc2lvbj0iMS4xIj48ZyBpZD0ic3VyZmFjZTEiPjxwYXRoIGQ9Ik0zNi41IDEyYy0xLjMyNCAwLTIuNTkuMjU4LTMuNzU4LjcwM0E3Ljk5NCA3Ljk5NCAwIDAgMCAyNiA5Yy0yLjEwNSAwLTQuMDIuODItNS40NDUgMi4xNTJBOS40NjggOS40NjggMCAwIDAgMTMuNSA4QzguMjU0IDggNCAxMi4yNTQgNCAxNy41YzAgLj
[...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Salesforce"
+ camel.apache.org/kamelet.namespace: "Salesforce"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Salesforce composite upsert Sink"
+ description: |-
+ Upsert Composite List of sObjects in Salesforce.
+
+ The body received must contain List of JSON SObjects to insert/update
inside the records attribute, for example:
+
+ `{"records" : ["attributes" : {"type" :
"KameletSinkSObject__c"},"ExtId__c" : "1","Name__c": "Ziauddin", "City__c":
"Bhopal"], ["attributes" : {"type" : "KameletSinkSObject__c"},"ExtId__c" :
"2","Name__c": "Shaikh", "City__c": "Bhopal"] }`
+
+ required:
+ - sObjectName
+ - sObjectIdName
+ - clientId
+ - clientSecret
+ - userName
+ - password
+ type: object
+ properties:
+ sObjectName:
+ title: Object Name
+ description: The type of the Salesforce object. Required if using a
key-value pair.
+ type: string
+ example: Contact
+ sObjectIdName:
+ title: Object Id Name
+ description: The Field Name of the External ID of the Salesforce
object. Required if using a key-value pair.
+ type: string
+ loginUrl:
+ title: Login URL
+ description: The Salesforce instance login URL.
+ type: string
+ default: https://login.salesforce.com
+ clientId:
+ title: Consumer Key
+ description: The Salesforce application consumer key.
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ clientSecret:
+ title: Consumer Secret
+ description: The Salesforce application consumer secret.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ - urn:camel:group:credentials
+ userName:
+ title: Username
+ description: The Salesforce username.
+ type: string
+ x-descriptors:
+ - urn:camel:group:credentials
+ password:
+ title: Password
+ description: The Salesforce user password.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ - urn:camel:group:credentials
+ types:
+ in:
+ mediaType: application/json
+ dependencies:
+ - "camel:core"
+ - "camel:jsonpath"
+ - "camel:jackson"
+ - "camel:salesforce"
+ - "camel:kamelet"
+ template:
+ beans:
+ - name: salesforce
+ type:
"#class:org.apache.camel.component.salesforce.SalesforceComponent"
+ properties:
+ sObjectName: "{{sObjectName}}"
+ sObjectIdName: "{{sObjectIdName}}"
+ clientId: "{{clientId}}"
+ clientSecret: "{{clientSecret}}"
+ userName: "{{userName}}"
+ password: "{{password}}"
+ loginUrl: "{{loginUrl}}"
+ from:
+ uri: kamelet:source
+ steps:
+ - transform:
+ jsonpath: "$['records']"
+ - to:
+ uri: "{{salesforce}}:compositeUpsertSObjectCollections"
+ parameters:
+ sObjectName: "{{sObjectName}}"
+ sObjectIdName: "{{sObjectIdName}}"
+ rawPayload: "true"
+ allOrNone: "false"