- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-15-2021 05:30 AM
Per the title, I'm looking to call a method in an integration instance from within another integration. Is this possible?
Cheers
Mark
09-15-2021 08:16 AM
Hi Mark!
It's not designed to work that way. If you think about how we package our integrations it could potentially create some terrible dependencies if you weren't careful. Our recommended practice would be to:
a) write each of the integration calls into Playbook tasks or
b) write an automation that accesses each of the integrations.
The integration code should be considered more or less a black box with inputs and outputs of data from the particular third party application. If you need to send data to the app use a command to do that. If you need to fetch data from the app, same. Any intelligence around what you do with the data is better managed outside in either a playbook or an automation to allow you the flexibility to make adjustments to it.
Thanks!
-Doug
09-15-2021 08:16 AM
Hi Mark!
It's not designed to work that way. If you think about how we package our integrations it could potentially create some terrible dependencies if you weren't careful. Our recommended practice would be to:
a) write each of the integration calls into Playbook tasks or
b) write an automation that accesses each of the integrations.
The integration code should be considered more or less a black box with inputs and outputs of data from the particular third party application. If you need to send data to the app use a command to do that. If you need to fetch data from the app, same. Any intelligence around what you do with the data is better managed outside in either a playbook or an automation to allow you the flexibility to make adjustments to it.
Thanks!
-Doug
09-15-2021 09:24 AM
Hi Doug
thanks for the response. The use case here is that we are intending to replace our SIEM over the next year so I wanted to decouple the backend SIEM integration logic from the front-end commands used by the playbooks. That way when the time comes we can simply replace the backend integration without updating each playbook.
I take your point about the dependency issues though it wasn't really clear to me why the same doesn't apply to automations which do provide this abiiity via the demisto.executeCommand() method. I've more or less resigned myself to using automation wrappers (your option b) but this is less desirable because once we replace the backend I will have a bunch of automations to update rather than a single integration. Still we only have handful of these compared with 200+ playbooks so it definitely helps.
Thanks for the response. I have marked this as the correct solution.
Mark
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!