Skip to content

yeagerai/yWorkflows-NikeITPersonasToSalesforce-by-jmlago-0277-ae7e60f6

Repository files navigation

markdown

Component Name: NikeITPersonasToSalesforce

Description

The NikeITPersonasToSalesforce component is a building block of a Yeager Workflow designed to import Nike IT personas data to Salesforce. This component processes the data provided by the input model, performs data transformation, and returns the number of successful imports and the total number of records imported.

Input and Output Models

Input Model: NikeITPersonasToSalesforceIn

This input model has the following fields:

  • organization_name (str): Name of the organization.
  • department_name (str): Name of the department.
  • salesforce_credentials (Dict[str, Any]): Dictionary containing the Salesforce credentials.

Output Model: NikeITPersonasToSalesforceOut

This output model has the following fields:

  • successful_imports (int): Number of successful imports.
  • total_imported (int): Total number of records imported.

Parameters

The transform function of the NikeITPersonasToSalesforce component has the following parameters:

  • args (NikeITPersonasToSalesforceIn): The input model provided by the user.
  • callbacks (typing.Any): Optional callbacks. Defaults to None.

Transform Function

The transform() method performs the following steps:

  1. Calls the transform() method of the superclass (AbstractWorkflow) with the provided input model and callbacks.
  2. Extracts the outputs from the results_dict returned by the superclass method.
  3. Creates an output model with the extracted data successful_imports and total_imported.
  4. Returns the output model.

External Dependencies

This component has the following external dependencies:

  • typing: For type hints and type annotations.
  • dotenv: To load environment variables from the .env file.
  • pydantic: For input and output model validation and serialization.
  • fastapi: To create FastAPI application for handling API requests.

API Calls

There are no external API calls made by this component.

Error Handling

Error handling is not explicitly performed in this component. Errors are propagated from the superclass and handled by the Yeager Workflow Engine.

Examples

Here's an example of how to use the NikeITPersonasToSalesforce component in a Yeager Workflow.

  1. Create the input with the necessary data, such as organization name, department name, and Salesforce credentials.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published