15

Word direct from the API PM: We have customers doing thousands of clients… one customer is going to do 150K clients. Folks just need to ping us for an increase request. We like to rollout things small and grow as we move forward. We just doubled our limits. We will continue to do that. In the mean time we can increase folks no problem.


14

Very generally, the Streaming API was created primarily to update UI components(Source) where as Platform Events are for integrations via a Message Bus. With a PushTopic from the Streaming API you are limited to receiving events notifications when the configured query and event occur. There is no capacity to manually generate these events beyond causing the ...


13

Web Application to Salesforce You don't state the technology your web application is built with, however the Salesforce REST and SOAP API's provide a full CRUD based API to the data in Salesforce, such that you can use these API's to callout from the appropriate place in your code. Salesforce to Web Application The Salesforce Streaming API is not ideal ...


12

Another significant differences - In streaming API's we lose the update (event) if the subscriber is offline, however in platform events they will be available in the event bus for a duration of 24 hours. So if a subscriber comes online after sometime, he will still have access to updates happened during outage time. [Update] Same can be achieved for ...


12

How about option 3: Wait a week. According to the release notes, EmpApi is currently slated to go live in LWC for Summer 19.


11

The best object will be dependent on a number of factors, such as how quickly you want to know about the change, how many records are expected to change over the period of interest, and how many API calls you can burn to monitor the changes. There are several options: Use an Outbound Message fired by a Workflow rule that is monitoring the fields of interest ...


9

I just did some research on this and found an answer in the Salesforce developer documentation page "Isolation of Test Data from Organization Data in Unit Tests": https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_data_access.htm Under the last major bullet ("There might be some cases where you can’t create certain types of data from ...


9

The error you are reporting is related to the fact that the Salesforce Platform does not yet provide a WebSocket server for Platform Events. While waiting for this feature, you have to add this line just after your call to cometd.configure(...) : cometd.websocketEnabled = false; This will switch CometD to a long polling transport. You can check out a ...


8

As a data point I would be interested to hear if you get this working for you what the key modification was to do so. Maybe "OAuth" instead of "Bearer", the callback pattern, the versions, etc. So here is what I am doing (Full lightning component and in Lightning out), YMMV: Keep in mind, it seems that the first step to troubleshooting the streaming API ...


8

The replication API is designed to have synchronization windows of at least five minutes, so would not be suitable for synchronization of shorter periods. Most ETL tools also don't support windows of less than five minutes, since they tend to use the replication API or SOAP API. ETL stands for "Extract-Translate-Load". There's nothing in there about ...


8

You do not need EMP-Connector if you are using lwc. Salesforce has a lightning-emp-api base component for it (https://developer.salesforce.com/docs/component-library/bundle/lightning:empApi). The lightning/empApi module uses a shared CometD connection. You can use the provided functions from the module import { subscribe, unsubscribe, onError, ...


7

You cannot give community users access to the Push Topic object. it is not available on profiles and if you try to assign it via permission sets, you get the error "Can't assign permission set StreamingAPI to user xxxxxxx. The user license doesn't allow the permission: Read Push Topics"


7

Open Developer Console by clicking your name up top-right: Go to Debug > Execute Anonymous: Then select your PushTopic(s) by name and delete them: List<PushTopic> pts = [SELECT Id FROM PushTopic WHERE Name = 'Channel']; Database.delete(pts);


7

I had the same issue and by deleting the push topic, and creating it again worked. The query had managed fields and managed objects, and when uninstalling and installing again the managed package, some how invalidates the push topic referring to its data.


7

A Lightning Data Service record will only update on-screen if the record is edited/updated in another Lightning Data Service context. So, assuming that the database change is not done by the same user, I would suggest using Streaming API, or an on-screen polling mechanism that does calls to APEX.


7

Change Data Capture : Receive near-real-time changes of Salesforce records, and synchronize corresponding records in an external data store. Change Data Capture publishes data change events, which represent changes to Salesforce records. Changes include creation of a new record, updates to an existing record, deletion of a record, and undeletion of a record. ...


6

We had the exact same issue and it ultimately led to us bailing on the streaming API and using a very simple variable-frequency polling mechanism instead. In our case we were subscribing to the push topic in our VF pages on complete and unsubscribing on unload. I could actually see these unsubscribe calls completing successfully in a JavaScript debugger, ...


6

While evaluating the variable and then substituting it might help the creation of one, your PushTopics are ultimately going to proliferate (and you must hoover them up as your users change). Why not use Streaming API filtered subscriptions? You can insert a PushTopic like: insert new PushTopic( Name = 'Doers', Query = 'SELECT Id, ...


6

I have it working with a lightning component. The deal with the $Api variable is that it is not available. BUT in my component I have a up:inputText hidden via CSS that I store the sessionId in. In my doInit function I call some apex to return UserInfo.getSessionId() I am working on a blog entry for that now as well but it's not complete as I just got it ...


6

The Streaming API is useful in two general scenarios (Source - Introducing Streaming API): Applications the poll frequently Applications that have constant polling action against the Salesforce infrastructure, consuming unnecessary API calls and processing time, would benefit from Streaming API which reduces the number of requests that return no data. ...


6

CDC and Platform Events are really different use cases. Platform Events are a generalized event-driven, publish/subscribe mechanism. You can publish Platform Events to represent record changes (in Apex triggers that you implement), but that's not all it can do, and that use case isn't provided as out-of-the-box Platform Events functionality. You can also,...


5

Go to workbench ,login with your salesforce credentials. Select queries -> Streaming Push Topics -> select your push topic and click on delete button


5

Actually I've seen this been demonstrated in sever-to-user scenarios as well and thus this question tends arrise from those thinking ahead in the audience! As such I think the messaging is a little mixed on this from Salesforce. What I have heard being told on occasion is that Salesforce Support will consider use cases for increasing the limit, as it is set ...


5

Update: basic filtering available in the form: /topic/MyTopic?User__c=005A0000000gqi6IAA Conditions can be combined by using an & for example: /topic/MyTopic?User__c=005A0000000gqi6IAA&Id={ID-18Char} This translates into OR condition: User__c == 005A0000000gqi6IAA OR Id == {ID-18Char} This is not nearly as robust as MVEL ...


5

Yes, you can create a PushTopic via the REST API. Based on the Create a Record example and PushTopic: curl https://na1.salesforce.com/services/data/v32.0/sobjects/PushTopic/ -H "Authorization: Bearer token -H "Content-Type: application/json" -d "@newpushtopic.json" Request Body newpushtopic.json { "Name" : "Account", "Query" : "SELECT ...


5

It seems that with the newer streaming api versions, the initial update of a record generates an event, and then when field update actions from the workflow rules fire, another event is generated. So even though these two update events are happening milliseconds apart in the same execution context, there are two updates happening, and they both get sent over ...


5

Summer 19 is 1 week away, but that won't stop you from preparing it beforehand in your Summer 19 Sandbox or Scratch org. lightning:empApi does not show LWC button as enabled as its referring to the Spring version of docs. Also , the release notes dont tell us about how to use empAPI in LWC. I could not find any public documentation on about how to use it. ...


5

Community licenses don't support Streaming API, therefor empApi doesn't work. Streaming API is based on Push Topics and Read of Push Topics are not supported by Community License (so you can create events, but cannot subscribe to them)


4

Supported or not :-/ I may have found a way - here's what I did: created a Force.com Site, saved a Session.page containing the following: <apex:page contentType="text/plain">{!GETSESSIONID()}</apex:page> edited the list of Site Visualforce Pages on the Site to include it, viewed the page at the Secure Web Address (mysite.secure.force.com/...


4

Several potential issues that lead me to believe the answer is no: not 100% but pretty sure public sites user cannot authenticate via OAuth (you can't "sign in" as guest in other, more traditional ways - it's a magic user). Even if they can, you'd want to validate that the Streaming API is available to the guest profile (which I doubt). Could not find any ...


Only top voted, non community-wiki answers of a minimum length are eligible