== Salesforce Source Kamelet Description

=== Authentication

This Kamelet requires Salesforce OAuth2 authentication using client credentials. You need to create a connected app in Salesforce and obtain the client ID, client secret, and other authentication details.

=== Configuration

The Salesforce Source Kamelet supports the following configurations:

- **Client ID**: Salesforce connected app client ID (required)
- **Client Secret**: Salesforce connected app client secret (required)
- **Username**: Salesforce username (required)
- **Password**: Salesforce password + security token (required)
- **Login URL**: Salesforce login URL (default: https://login.salesforce.com)
- **API Version**: Salesforce API version (default: latest)
- **SObject Name**: Salesforce object to query (required)
- **SObject Query**: SOQL query to execute

=== Output Format

The Kamelet outputs Salesforce records as JSON objects following the Salesforce REST API response format, including record metadata and field values.

=== Setup Requirements

1. Create a Connected App in Salesforce Setup
2. Configure OAuth settings and permissions
3. Obtain Client ID and Client Secret
4. Generate or obtain security token for the user
5. Ensure proper API permissions are granted

=== Usage Example

[source,yaml,subs='+attributes,macros']
----
- route:
    from:
      uri: "kamelet:salesforce-source"
      parameters:
        clientId: "your-client-id"
        clientSecret: "your-client-secret"
        username: "salesforce-user@example.com"
        password: "password-with-security-token"
        sObjectName: "Account"
        sObjectQuery: "SELECT Id, Name, Industry FROM Account WHERE Industry = 'Technology'"
      steps:
        - to:
            uri: "kamelet:log-sink"
----

=== Example with Custom Login URL

[source,yaml,subs='+attributes,macros']
----
- route:
    from:
      uri: "kamelet:salesforce-source"
      parameters:
        clientId: "your-client-id"
        clientSecret: "your-client-secret"
        username: "salesforce-user@example.com"
        password: "password-with-security-token"
        loginUrl: "https://test.salesforce.com"
        sObjectName: "Contact"
        sObjectQuery: "SELECT Id, FirstName, LastName, Email FROM Contact WHERE CreatedDate = TODAY"
      steps:
        - to:
            uri: "kamelet:log-sink"
----

=== SOQL Query Examples

- Simple selection: `SELECT Id, Name FROM Account`
- With conditions: `SELECT Id, Name FROM Account WHERE Industry = 'Technology'`
- With date filters: `SELECT Id, Name FROM Account WHERE CreatedDate >= YESTERDAY`
- With relationships: `SELECT Id, Name, (SELECT Id, FirstName FROM Contacts) FROM Account`

=== Security Considerations

- Store credentials securely using secrets management
- Use IP restrictions in Connected App settings
- Rotate client secrets periodically
- Monitor API usage to stay within limits