How to Change the Default Interval of a Plugin Trigger in the Connect API for Salesforce?

This topic was automatically generated from Slack. You can find the original thread here.

Hello team! I have a question, how can I change the default interval of a plugin trigger in the Connect API?

For instance I want to deploy programmatically a trigger for Salesforce, but I need to go from presumably 900seconds interval to 30 seconds temporarily while my user tests the trigger.
Thank you in advance!

Can you have a quick look to this, it would be really appreciated !
Thank you in advance (sorry for kinda spamming)!

That’s pretty poorly documented — can you see if this works? If so, we’ll update the docs asap: Deploying Triggers - Pipedream

I think this does not work:

const deployedTrigger = await client.triggers.deploy({
  externalUserId: "abc-123",
  id: "schedule-custom-interval",
  configuredProps: {
>>  "cron": {
      "intervalSeconds": 90
    }
  },
  webhook_url: "https://events.example.com/schedule-custom-interval"
});

But this does:

const deployedTrigger = await client.triggers.deploy({
  externalUserId: "abc-123",
  id: "schedule-custom-interval",
  configuredProps: {
>>  "timer": {
      "intervalSeconds": 90
    }
  },
  webhook_url: "https://events.example.com/schedule-custom-interval"
});

Basically replacing “cron” by “timer” makes the job.

I have another question though:
Is there any potential issue associated with a low interval, like 10 seconds?

Thanks for confirming, I’ll get the docs updated asap.

Hey Danny, I have small question here as well:
Is there any potential issue associated with a low interval, like 10 seconds?

We don’t charge credits when a source checks for updates, we charge when it emits an event. However, sources that have an excessively low emit rate (polling at an extreme interval and emitting very few events) will likely get paused in the near future programmatically, since that does consume resources on our end to support.

Got it, thank you! I wanted to know if I need to set a minimum limit for my users