您如何让 Salesforce ping 我的应用程序?
How do you make Salesforce ping my application?
我在 Salesforce 和 运行 另一个使用相同数据的应用程序中有数据。当前的工作流程是,当数据输入自定义应用程序时,它会通过 SOAP 将信息发送到 Salesforce。我要建立反向link;当在 Salesforce 端更改值时,我希望 Salesforce 对我的应用程序执行更改。 Salesforce 是否有执行此操作的功能?也许相当于触发器?
我目前的解决方案是盲目迭代所有 Salesforce 记录。这很慢,经常达到 API 限制,并且数据陈旧时间过长。
您可以使用 Streaming API
Introduction:
- Use Streaming API to receive notifications for changes to Salesforce data.
- Use to push relevant data in realtime, instead of having to refresh the screen to get new information. Protocols Use for Connection:
- The Bayeux protocol and CometD both use long polling.
- Bayeux is a protocol for transporting asynchronous messages, primarily over HTTP.
- CometD is a scalable HTTP-based event routing bus that uses an AJAX push technology pattern known as Comet. It implements the Bayeux
protocol. The Salesforce servers use version 2.0 of CometD.
How it Works:
- Create a PushTopic based on a SOQL query. This defines the channel. (PushTopic is a standard object).
- Clients subscribe to the channel.
- A record is created, updated, deleted, or undeleted (an event occurs). The changes to that record are evaluated.
- If the record changes match the criteria of the PushTopic query, a notification is generated by the server and received by the subscribed
clients.
请检查这个 link : http://www.salesforce.com/developer/docs/api_streaming/
我在 Salesforce 和 运行 另一个使用相同数据的应用程序中有数据。当前的工作流程是,当数据输入自定义应用程序时,它会通过 SOAP 将信息发送到 Salesforce。我要建立反向link;当在 Salesforce 端更改值时,我希望 Salesforce 对我的应用程序执行更改。 Salesforce 是否有执行此操作的功能?也许相当于触发器?
我目前的解决方案是盲目迭代所有 Salesforce 记录。这很慢,经常达到 API 限制,并且数据陈旧时间过长。
您可以使用 Streaming API
Introduction:
- Use Streaming API to receive notifications for changes to Salesforce data.
- Use to push relevant data in realtime, instead of having to refresh the screen to get new information. Protocols Use for Connection:
- The Bayeux protocol and CometD both use long polling.
- Bayeux is a protocol for transporting asynchronous messages, primarily over HTTP.
- CometD is a scalable HTTP-based event routing bus that uses an AJAX push technology pattern known as Comet. It implements the Bayeux protocol. The Salesforce servers use version 2.0 of CometD.
How it Works:
- Create a PushTopic based on a SOQL query. This defines the channel. (PushTopic is a standard object).
- Clients subscribe to the channel.
- A record is created, updated, deleted, or undeleted (an event occurs). The changes to that record are evaluated.
- If the record changes match the criteria of the PushTopic query, a notification is generated by the server and received by the subscribed clients.
请检查这个 link : http://www.salesforce.com/developer/docs/api_streaming/