# Salesforce Plugin

**URL:** https://discuss.elastic.co/t/salesforce-plugin/353804
**Category:** Logstash
**Created:** [February 21, 2024, 3:44pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804 "2024-02-21T15:44:34Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kkalwaysok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkalwaysok/32/123733_2.png) [@kkalwaysok](https://discuss.elastic.co/u/kkalwaysok)
#### Post date: [February 21, 2024, 3:44pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804/1 "2024-02-21T15:44:34Z")

</div>

Hi,

I'm using salesforce plugin to pull the logs, and it is downloading 6months worth data that is available in Salesforce. Is there a setting that I can use to download logs from specific date?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [February 21, 2024, 5:46pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804/2 "2024-02-21T17:46:34Z")

</div>

That's not really a logstash question. SOQL allow date comparisons in the [WHERE clause](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_conditionexpression.htm), so if your rows have a timestamp that you can compare to then you can select by date in the [sfdc\_filters](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-salesforce.html#plugins-inputs-salesforce-sfdc_filters) option to the plugin.

---

<div class="post-metadata">

### Author: ![kkalwaysok](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kkalwaysok/32/123733_2.png) [@kkalwaysok](https://discuss.elastic.co/u/kkalwaysok)
#### Post date: [February 22, 2024, 3:22pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804/3 "2024-02-22T15:22:35Z")

</div>

Thanks Badger for pointing us in the right direction. I used this filter to grab data from Salesforce and it worked.

sfdc\_filters =\> "CreatedDate \>= 2024-02-20T13:58:24.000+0000"

Now if I remove the filter and rerun logstash will it get the older data before the above filter date or will it get the current data?

Thanks,  
KK

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [February 22, 2024, 5:26pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804/4 "2024-02-22T17:26:54Z")

</div>

> [@kkalwaysok](#):
>
> Now if I remove the filter and rerun logstash will it get the older data before the above filter date or will it get the current data?

I do not know. Just try it and see.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [March 21, 2024, 5:27pm UTC](https://discuss.elastic.co/t/salesforce-plugin/353804/5 "2024-03-21T17:27:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
