Recently we launched a service for MuleSoft employees (Muleys) to be able to manage their stock options online using Charles Schwab’s service. With the solution, there is a requirement to exchange data between our HR system and Schwab in both directions. As you can imagine, accuracy is key where anything financial is concerned and as such, reducing complexity reduces the risk of errors. With over six hundred employees now and forecasting fifty percent growth in headcount this year, we needed to have something automated and efficient. We decided to use our technology to build a solution to help us make this easy for our employees – especially since we needed to launch the solution all at once to our existing employees as well as make it scale over time.
For the first phase of the project, we needed to bring employee data from our HR system and transform it to fit the specification for the CSV that the target system expects. This involved sitting down with experts on both the MuleSoft and the Schwab teams to decide which fields made the most sense to map into the target system. The process of identifying the right data to feed actually took some effort from a human perspective, but thanks to Anypoint Studio, we were able to do the mapping and transformations while collaborating with the business process owners. This rapid feedback loop allowed us to move fast – testing the iterations with the target system until we were satisfied with the results. From there we were able to publish to CloudHub and get the integration running.
Anypoint Studio and CloudHub allowed us to rapidly prototype the solution with the business process owner in the room – and deliver it rapidly as a service running in the cloud. From here I’m going to hand off to Andrew McAllister to talk about the technical side.
MuleSoft at MuleSoft
At our yearly company Meetup we went went live with our ESPP (Employee Stock Purchase Plan) using Charles Schwab Equiview Product. This integration was accomplished using Anypoint Studio and Cloudhub Platform as part of our continued initiative to use our own product to connect everything internally.
The initial scope of this project was to take both organization and payroll data such as year to date, withholdings, etc. and push this data daily into Charles Schwab Equiview. Charles Schwab is a more traditional system that consumes a tab delimited text file via SFTP to insert updated data. Certainly our HR system has a built in EIB (Enterprise Interface Builder) for integrations, however a few key items made it clear the choice to use Anypoint was best for desired capabilities and time to market.
Key items
Our HR system has calculated fields however they are somewhat limited on more complex operations such as filtering results and returning specific object values on filtered results based on the key value meeting certain criteria. Anypoint provided flexibility needed to store criteria for certain business rules and formatting requirements.
Exception strategy and logging are essential to make sure data uploaded to Schwab is accurate. The HR system has its own audit logs, but if an internal integration was used, we would still need to pull the audit logs via API on a scheduled basis. Anypoint provided flexibility in this area.
The system must be both performant and reusable: Today we have one HR system, but someday we might need to add a new system. Any new system with a REST / SOAP API would only require modification to a couple of Dataweave connectors to make sure the sample payload remained the same and integration would continue to work. Our HR system’s data model and built-in integration tools are proprietary.
Why Anypoint?
Dataweave was the exact tool we needed as it gave us a very simple way of both transforming and mapping data from several calls made to the HR system into one object. Each record once transformed was stored to a string buffer and then streamed as tab-delimited data via SFTP. Dataweave was particularly helpful for address data. Charles Schwab has specific requirements for their address fields. In the HR system, certain address fields have address data concatenated for mailing purposes. For international records, the field used for mailing purposes is not consistent compared to USA or other countries. This presented a problem for consistency needed for Charles Schwab address data. Dataweave allowed us to hide and or transform the HR system’s address data easily so it was consistent and country specific when passed to Charles Schwab.
The SFTP connector just worked.
An HTTP payload as application/json, plain text or even just “hello world”becomes the body of the txt file streamed via the SFTP connector. This was great for our use case.
Cloudhub gave us the ability to launch our integration in minutes with logging and visibility. There was zero time spent figuring out where and how we would host this.
Take a look at more of our MuleSoft at MuleSoft projects.