app.post("/new_contact", function(req, res) {
var notification = req.body["soapenv:envelope"]["soapenv:body"][0]["notifications"][0];
var sessionId = notification["sessionid"][0];
var data = {};
if (notification["notification"] !== undefined) {
var sobject = notification["notification"][0]["sobject"][0];
Object.keys(sobject).forEach(function(key) {
if (key.indexOf("sf:") == 0) {
var newKey = key.substr(3);
data[newKey] = sobject[key][0];
}
}); // do something #awesome with the data and sessionId
}
res.status(201).end();
});
app.post("/new_contact", function(req, res) {
var notification = req.body["soapenv:envelope"]["soapenv:body"][0]["notifications"][0];
var sessionId = notification["sessionid"][0];
var data = {};
if (notification["notification"] !== undefined) {
var sobject = notification["notification"][0]["sobject"][0];
Object.keys(sobject).forEach(function(key) {
if (key.indexOf("sf:") == 0) {
var newKey = key.substr(3);
data[newKey] = sobject[key][0];
}
}); // do something #awesome with the data and sessionId
}
res.status(201).end();
});
例如,使用Salesforce for CRM的公司收购了另一家公司,该公司使用Java内置的自定义系统。集成这些系统的第一种简单方法就是在Heroku上运行Java系统并在Salesforce中进行渲染。在Heroku上运行Java系统可以减轻扩展和操作负担,同时标准化自定义系统的部署体系结构。在Heroku上运行并与Salesforce数据集成的独立用户界面可以为Salesforce以及面向客户的Web和移动应用程序提供后台扩展。自定义用户界面可能具有库,功能或开发人员技能组,这些技能组决定了在本机Force.com选项上使用Heroku和开源技术。