forked from Stwissel/node-red-contrib-salesforce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
obm.html
45 lines (43 loc) · 1.79 KB
/
obm.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script type="text/javascript">
RED.nodes.registerType('obm', {
category: 'Salesforce',
color: '#C0DEED',
defaults: {
name: {
value: ''
}
},
inputs: 1,
outputs: 2,
icon: "salesforce.png",
label: function() {
return this.name || "parse obm";
}
});
</script>
<script type="text/x-red" data-template-name="obm">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="obm">
<p>When used with an http in node, parses the XML from a Salesforce Outbound Message to a JSON object.</p>
<p>The resulting <code>msg.payload</code> should look something like:
<pre>{
"organizationId": "00D37000000PdLZAE1",
"actionId": "04k370000008OrqZZE",
"sobject": {
"type": "Contact",
"id": "a0037000001I1EvWWO",
"name": "Nikola Tesla",
"firstname": "Nikola",
"lastname": "Tesla"
},
"sessionId": "00D37000000PdLB!"
}</pre>
</p>
<p>Connect this node downstream from a POST http input node to parse the XML received from an Outbound Message call from Salesforce. Use the URL from the http in node for the Endpoint URL for your Outbound Message.</p>
<p>See the <a href="https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_om_outboundmessaging_setting_up.htm" target="_blank">Salesforce Setting Up Outbound Messaging documentation</a> for more information.</p>
<p>The second exit simplifies the construction of the reply to the OBM. When nothing further is required, connect that one to a http response and it will return the expected message to SFDC</p>
</script>