Amazon AppFlow Integration Adapter
Use Case
To demonstrate the adapter framework and how it is integrated with the Lazsa Platform the following use case is considered of integrating AppFlow with the platform.
About AppFlow
Amazon AppFlow is a fully managed integration service that helps to securely transfer data between SaaS applications such as Salesforce, SAP, Google Analytics, Facebook Ads, and ServiceNow, and AWS services such as Amazon Simple Storage Service (S3). For example one can ingest contact records from Salesforce to an Amazon S3 bucket or pull support tickets from Zendesk to an Amazon S3 bucket.
For more details, refer to the following URL: https://aws.amazon.com/appflow/
Control Flow
The following diagram provides an end-to-end flow from source to target and demonstrates how the different services in Lazsa are involved and how the processing is done.
Interface and Classes
The adapter development team must provide implementation for the following methods for the AppFlowService
interface:
Interface | Method | Description |
---|---|---|
AppFlowService | Set<String> listConnectors(String connectorType);
|
Method to return all available connectors such as Salesforce etc. |
Map<String, String> getConnectorProfileProperties(final String connectorType,final String profileName);
|
Returns the list of all properties of the connector. Inside Map, key indicates name of the property and value is actual value of the property. | |
String createConnectors(AppFlowConnectorRequestBean request);
|
Bean used to create a new connector. | |
Map<String, Set<AppFlowConnectorEntity>> getConnectorEntities(String profileName, String connectorType);
|
Map contains the list of source tables or entities. Insane map, key has the value “Objects” and value is set of instances of AppFlowConnectorEntity object. | |
List<AppFlowConnectorEntityField> getConnectorEntityFields(String profileName, String entityName);
|
Returns the list of AppFlowConnectorEntityField objects. Refer the class description AppFlowConnectorEntityField below. | |
AppFlowDescribeFlowResponse getAppFlowDetails(String flowName);
|
Return the details of any particular Appflow. Refer the AppFlowDescribeFlowResponse class below. | |
String createAppFlow(AppFlowCreationBean request);
|
Used to create an AppFlow. | |
String runAppFlow(String flowName);
|
Used to execute any particular AppFlow. | |
void stopAppFlow(String flowName);
|
Used to stop any particular AppFlow. | |
List<AppFlowExecutionRecord> runAppFlowStatus(String flowName);
|
Used to get the status of the AppFlow. | |
void deleteConnectorProfile(String profileName);
|
Used to delete any connector profile created earlier. | |
void deleteAppFlow(String flowName);
|
Deletes a particular AppFlow. | |
String updateAppFlow(AppFlowCreationBean request);
|
Update and existing Appflow. | |
String updateConnectorProfile(AppFlowConnectorRequestBean request);
|
Update any existing connector profile. | |
boolean profileTokenExpired(String profileName, String connectorType);
|
To check if given token expired. | |
void tagAppFlow(AppFlowCreationBean request);
|
To assign tags to any given AppFlow. | |
void untagAppFlow(@NotNull String flowName, @NotNull String... tagKeys);
|
Remove the associated tags of the AppFlow |
AppFlowConnectorRequestBean - This is the request bean which contains values required to connect to the underlying tool such as Salesforce.
Class | Attribute | Description |
---|---|---|
AppFlowConnectorRequestBean
|
String profileName
|
This is the name of the connection. While creating connection to tools such as Salesforce use this attribute for naming the connection. |
String type;
|
This indicates type of the connector. SALESFORCE - This constant indicates it's a salesforce connection. AWS uses this to identify the connection type. Refer to the following URL for all connection types supported by AWS: https://docs.aws.amazon.com/appflow/1.0/APIReference/API_CreateConnectorProfile.html#appflow-CreateConnectorProfile-request-connectorType |
|
String url;
|
Connector URL for the source instance. | |
String username;
|
Username for the connection. | |
String password;
|
Password for the connection. | |
String clientId;
|
Client ID for the underlying connector such as Salesforce. | |
String ClientSecret
|
Secret for the underlying connector such as Salesforce. |
AppFlowCreationBean - This bean is used to create the flow for AppFlow.
Class | Attribute | Description |
---|---|---|
AppFlowCreationBean | String flowName
|
This is the name of the AppFlow which uniquely identifies the flow. |
String description;
|
Description of the flow. | |
AppFlowDataBean source;
|
This contains all information related to the source. For example, if Salesforce is selected, all the related information is contained in this object. | |
AppFlowDataBean target;
|
This contains the information about the target. If S3 is selected it will contain the information such as destination folder etc. | |
List<AppFlowSourceEntityMapping> fieldMap
|
Arraylist of AppFlowSourceEntityMapping objects. Refer to the class for details. AppFlowSourceEntityMapping contains mapping for source to target fields. |
|
Map<String, String> tags;
|
This map contains the list of AWS resource tags used while creating AppFlow. |
AppFlowExecutionRecord - This bean is used to hold the result values of any AppFlow execution results. Please refer to the URL: https://docs.aws.amazon.com/appflow/1.0/APIReference/API_DescribeFlowExecutionRecords.html to understand the values in detail.
Class | Attribute | Description |
---|---|---|
AppFlowExecutionRecord | String executionId;
|
This represents unique id of the execution. |
String executionStatus;
|
Status of the execution. | |
AppFlowExecutionResult executionResult;
|
Process details such as record count, error info other details. | |
Instant startedAt;
|
Start time of the execution. | |
Instant lastUpdatedAt;
|
Last updated time. | |
Instant dataPullStartTime;
|
The timestamp that determines the first new or updated record to be transferred in the flow run. | |
Instant dataPullEndTime;
|
The timestamp that indicates the last new or updated record to be transferred in the flow run. |
AppFlowConnectorEntity
Class | Attribute | Description |
---|---|---|
AppFlowConnectorEntity | String name;
|
This specifies the name of the connector. |
String label;
|
Label related the connector. |
AppFlowDescribeFlowResponse
Class | Attribute | Description |
---|---|---|
AppFlowDescribeFlowResponse | String flowName;
|
Flow name |
String description;
|
Flow description | |
String kmsArn;
|
KMS ARN of the encryption key (managed key) | |
String flowStatus;
|
Status flow | |
String errorMessage;
|
Error message if any error occurs | |
String errorCode;
|
Errorcode if any error occurs | |
Instant createdAt;
|
Timestamp of flow creation | |
Instant lastUpdatedAt;
|
Last updated timestamp | |
String createdBy;
|
Created by name | |
String lastUpdatedBy;
|
Last updated by time stamp |
AppFlowConnectorEntityField
Class | Attribute | Description |
---|---|---|
AppFlowConnectorEntityField | String identifier; | Identifier of each column of the source table |
String label; | Name of the column | |
String description; | Description of column | |
String fieldType; | Indicates the data type of the column |
What's next? Technical Artifacts |