UNPKG

@cgignite/ignite-sf-commerce

Version:

Salesforce Commerce connector for Ignite

62 lines (60 loc) 2.65 kB
<script type="text/javascript"> RED.nodes.registerType('promotions', { category: 'salesforce commerce', color: '#00a1e0', defaults: { name: { value: "" }, method: { value: "GET" }, endpoint: { value: "/organizations/{organizationId}/promotions" }, Id: { value: "" }, }, inputs: 1, outputs: 1, icon: 'font-awesome/fa-rocket', label: function () { return this.name || "promotions"; } }); </script> <script type="text/html" data-template-name="promotions"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-method"><i class="fa fa-tasks"></i><span> Method</span></label> <select type="select" id="node-input-method"> <option value="GET">GET</option> <option value="POST">POST</option> <option value="PUT">PUT</option> <option value="PATCH">PATCH</option> <option value="DELETE">DELETE</option> </select> </div> <div class="form-row"> <label for="node-input-endpoint"><i class="fa fa-globe"></i><span> Endpoint</span></label> <select type="select" id="node-input-endpoint"> <option value="/organizations/{organizationId}/promotions">/organizations/{organizationId}/promotions</option> <option value="/organizations/{organizationId}/promotions/{id}">/organizations/{organizationId}/promotions/{id}</option> </select> </div> <div class="form-row"> <label for="node-input-Id"><i class="fa fa-sitemap"></i> Promotion Id</label> <input type="text" id="node-input-Id" placeholder="Promotion Id"> </div> </script> <script type="text/html" data-help-name="promotions"> <p>Promotions Node helps you consume Salesforce Commerce Promotions api endpoints.</p> <br> <p>you must use a configuration node before this node to in order to access Sales Commerce API</p> <br> <p>Provide all the required information to get an access token in configuration node.</p> <br> <p>By default this node will pick only authorization header coming from configuration node.</p> <br> <p>User can override headers by passing in a msg.reqHeaders object.</p> <br> <p>msg.payload object will be set as request object for POST, PUT, PATCH requests.</p> <br> <p>To attach query parameters, pass in a msg.reqParams object with key value pairs.</p> </script>