In a recent webinar with CodeScience Technical Architect Mark Pond, we learned how CodeScience addresses a common problem that our clients face — guaranteed delivery of messages to off-platform applications with return acknowledgment of success or failure.

This post is only covering some highlights from the webinar. If you’d like to see the webinar in full as well as a look at the code behind this pattern, you’ll have to register here:

Weighing Your Integration Pros and Cons

If you have an off-platform application that needs to be integrated with Salesforce, there are some fundamental pieces that you must have considered along the way in implementing your integration. As Mark notes, “With all integrations, it is important to evaluate the resiliency that your solution requires. Not every integration needs to be bulletproof, but others do need to be bulletproof and ensure that every message is sent by the platform and acknowledged that it was received by the recipient.”

To begin to understand the level of resiliency your solution needs, Mark lists out 11 pieces that every organization should weigh out as they build out their integrations.

Why We Often Choose a Custom Queue for Our Customers

Building a custom solution, which relies on data stored temporarily in an SObject, enables quite a few solutions to be designed to address the considerations in the previous list.

It enables guaranteed delivery of messages, retry behavior, prioritization, delayed processing of messages, custom interfaces, dynamic instantiation of custom ‘workers’ via queueables, background / asynchronous operations, and more.

Mark walks through the high-level design pattern, which starts by building an example queue that listens for specific activity on an object or collection of objects.

From there, he explains how this pattern triggers on the Queue Item to begin processing records and ultimately passes them off platform to do work and log whether the work was successful or not.

Mark showcases the importance of having records automatically clean themselves up from the queue where otherwise, the stale records lingering in the queue would continue to grow and ultimately cause performance and data storage issues.

After establishing the framework, Mark walks viewers through a live code demo explaining how the various pieces of the workflow were engineered and provides an example of a remote service being used to enrich an Account.

Not One Size Fits All

As Mark concludes, he explains that there’s no true one size fits all solution to solve all integration needs. Every app has different integration needs, and while this robust solution centralizes much of the functionality on the platform in apex, this may not be the best fit for your business requirements — always do your due diligence when designing an integration solution.

If you want to see the code in action, learn more about the pros and cons of this pattern, and see what other options are available, register here:

We help businesses build their business on the Salesforce AppExchange. If you need help evaluating what integration patterns are right for your business or aren’t sure where to start, CodeScience is here for you. Get in touch today!