Move onto the Script tab, if you need to manipulate data coming into or out of your methods you can do so in the method script panel.
This script will run every time the method is called across any instance of this connector. You also have the option to set up scripts on a per method basis on a per step basis sorry, within the builder.
This script will run anytime this method is called across all instances, you also have the option in the cycle builder to set up per step scripting as well. And you can set up script overall for the connector.
You can refer to the documentation for more details on composing your script.
In this example, we’ve added a new field called Store Name to the response.
So I’ll just go through and do that.
And now to fill in that field.
Now anytime that this app is run, it will add a new field in called Store Name and set the value of that field to Cameron’s Pet Store.
You’ll notice that I’ve had to return true here. By default, Cyclr’s scripting returns false.
You’ll also see that there’s some basic linting so that you can catch some syntax errors. And if you want to neaten up your script, you just hit the Format button like so. And it sets everything neatly.
You hit Save when you’re finished.
Now that I made some changes to my methods, what you’ll see is in a Cycle I have Get Pet by ID as a step. Nothing interesting going on here, just the standard method.
However, once I promote this draft, and I promote this major release, what we’ll now see in the builder is any Step existing will have this upgrade option. So I click upgrade here.
And now from the source, I have the option for lookup.
I’m not authenticated, so it won’t work.
But I now have the newest version of the method from the latest release that I put out.
What you’ll also see is that the previous release is deprecated even though it’s used in an account, and it’s used by a Cycle, this is now treated as a deprecated release. So no new versions or no new templates or cycles will be able to use methods from this version of the connector.
If I refresh the page here what we’ll see is whilst I still have the original version installed, I’m only using steps now from the new Cycle.
Whilst I have the original version installed, I’m only using actual Steps from the newest release.