FINS Marketing Poller Process API - Implementation Template

(0 reviews)

home

This API implementation template is a component of MuleSoft Accelerators, which accelerate the implementation of essential integration use cases.

The solution includes pre-built APIs, connectors, and integration templates that help unlock business-critical data from external systems and guide you in adopting best practices synthesized from thousands of customer implementations. Use these assets as is or extend them to meet your company’s unique needs.


Overview

This integration template implements the FINS Marketing Poller Process API specification. It is used to poll various systems for updates to financial accounts, transactions, web engagements, and external accounts and push them to Salesforce Data Cloud for marketing purposes. It also generates chatter feed messages in Salesforce FSC using segment data published by Data Cloud.

Financial account and transaction updates are pulled from Snowflake using the FINS Snowflake System API. Web Engagement data is pulled from Databricks using the FINS Databricks Engagements System API. External Accounts are retrieved from Amazon S3 using the Accelerator AWS Storage System API. All data is pushed to Salesforce Data Cloud using the FINS Salesforce CDP System API.

This API also receives event notifications Amazon S3 whenever new Cross-Sell or Upsell segement data files are published to the bucket by Salesforce Data Cloud. The data from these files is used to post chatter feed messages to the appropriate accounts in a Salesforce FSC instance using the FINS Salesforce Customers System API.

Getting started

bulb.png The Getting Started with MuleSoft Accelerators guide provides general information on getting started with the accelerator components. This includes instructions on setting up your local workstation for configuring and deploying the applications.

Once your workstation has been set up and the application template imported into Anypoint Studio, proceed with the Prerequisites section.

Prerequisites

This implementation template has the following dependencies:

  • Source System Data Load
  • Amazon S3 and SQS Access

Source system data loads

This Process API interacts with multiple System APIs that retrieve data from different systems. Since the format to load data in to each of the systems is different, a set of sample data files have been provided for reference.

Refer the sample data format files available under samples folder of FINS Common Resources to load data to each of the systems.

Data load to Snowflake

Refer the article Snowflake Data Load Tutorials and the Prerequisites tab in the FINS Snowflake System API, to load sample data from a csv file to Snowflake.

Use the FinancialAccountsSample.csv file to load data to the FINANCIAL_ACCOUNT table and FinancialTransactionsSample.csv to load data to the FINANCIAL_TRANSACTION table.

Data load to Databricks

Refer to the FINS Databricks Engagements System API, before loading the sample data of Web Engagements to Databricks from a csv file.

Use the WebEngagementsSample.csv file to load data to the WEB_ENGAGMENT table in Databricks. Ensure that the csv file does not include a header line, and that the values provided adhere to the WEB_ENGAGEMENT schema.

Data load from Amazon S3

Refer to Prerequisites in the Accelerator AWS Storage System API, before loading any sample data related to External Accounts from a csv file.

Use the ExternalAccountsSample.csv file. Do not make any changes to the header of the file.

Amazon S3 and SQS access

This Process API requires access to Amazon S3 (via the MuleSoft Amazon S3 Connector) to read the Segment Data published to a S3 Bucket by Salesforce Data Cloud Activiation process. It relies upon being able to receive bucket event notifications from S3, so ensure that the appropriate SQS permissions have been assigned to the role used to connect to the bucket. Refer to the Amazon SQS documentation for more information about configuring the connector to receive bucket event notifications. Note that the notification queue name has not been overridden from the default.

Please review the use cases described on the MuleSoft Accelerator for Financial Services solution pages for more information about dependencies on other APIs and services.

Deployment

Each Accelerator implementation template in Exchange includes Bash and Windows scripts for building and deploying the APIs to CloudHub. These scripts depend on repositories, global settings, deployment profiles, and associated properties configured in the Maven settings.xml file.

For additional details, please refer to the Application Deployment section of the Getting Started Guide.

Preparation

Ensure the Maven profile CloudHub-FINS-DEV has been properly configured in your settings.xml file. In particular, make sure the common properties for your environment have been provided (e.g., Anypoint Platform client ID and secret).

Required property overrides

At a minimum, the following properties must be customized to reflect the target deployment environment.

Property NameDescription
api.autodiscoveryIDRequired if using API Manager to secure this API
aws.s3.accessKeyAccess Key of AWS S3 account to access
aws.s3.secretKeySecret Key of AWS S3 account to access
aws.s3.roleArnRole ARN of AWS S3 account to access
aws.s3.regionRegion of the AWS
aws.s3.bucketNameBucket Name configured for Salesforce Data Cloud Activiations, same is used to read Data Cloud Segement Data files for processing
aws.s3.prefixParentFolderPrefix parent folder of Data Cloud Segement Data files for processing

Testing

Use Advanced Rest Client or Postman to send a request over HTTPS. The template includes a Postman collection in the src/test/resources folder. Update the collection variable(s) after successful import.

Implementation notes

  1. Pollers have been configured to run at a specific hour of the day (schedules can be changed in the configuration files).
  2. For each poller process, the API records the current time in Object store to be used for syncing delta records on next run.
  3. The externalAccounts endpoint ignores query parameters even if they are provided. Current implementation is to sync externalAccounts data from a csv file stored as an Amazon S3 object to Salesforce Data Cloud.
  4. Trigger of poller for account sync from Snowflake also syncs transaction data to Salesforce Data Cloud.
  5. The API uses VM Queue to process records spanning multiple pages as returned by the dependent system APIs.
  6. All the API endpoints accepts the request and returns a success response. The request is processed asynchronously if there is any data that matches the specific criteria obtained via query parameters.
  7. By default, the segment data files published by Salesforce Data Cloud to the Amazon S3 Bucket will be deleted from the bucket after they are processed; this can be disabled via a configuration property.
  8. The csv files related to External Accounts will be deleted from the configured Amazon S3 Bucket after they are processed.

Additional resources


Reviews

TypeTemplate
OrganizationMulesoft Inc.
Published by
MuleSoft Solutions
Published onNov 10, 2023
Asset overview

Asset versions for 1.6.x

Asset versions
VersionActions
1.6.4
1.6.3
1.6.2