Digibee capsules are a new way to think about reusability when it comes to code or logic. These allow you to encapsulate snippets of code as libraries that can then be used across your different pipelines or integrations. The result is you have API-like power but you get function-like simplicity.
So instead of having to publish something as an API anytime I want to be able to reuse it, I can instead just publish it as a capsule and make it reusable to other developers as they build out their Integrations. So let's take a look at a quick example here: I'm inside of a pipeline I've created that's processing different sessions. Inside of these sessions I have a For Each Loop that verifies and processes each presenter associated with a session.
Now, let's imagine that I might need to do this logic in other Integrations in the future so how could I make it so that this entire logic is exposed and usable for future integrations? In the old way of doing things, I would probably take this entire logic spin it up as an API publish it to an API Gateway and have all the management and overhead associated with that. And, that may be something you do in certain cases still.
But with Digibee, I now have the option to say "I want to take this logic and just make this a single component over here on the right hand side going forward. " So, these are out-of-the-box components and these are Capsules that I've built for my organization that I want to be able to have other developers use. So, all I need to do is copy this over and now I can create a new Capsule.
I can paste in all of that logic that was inside of that For Each Loop on my original Pipeline. And then I just need to supply "what are the inputs going to be for this Capsule? " So I could define that maybe the first step is going to be the user's name, and this is just going to be a text field.
I could specify what type of data needs to go in there, maybe the second one is going to be their title and I could just build out what does the input need to be the next time this is used? You can build your documentation and then verify the final output contract of what this is supposed to output at its final step. So now, I've got the power of APIs, but with the simplicity of functions.
And this is really going to help to accelerate that integration journey by making it so that I don't have to publish things unless I really need them to be exposed.