Skip to content

Conversation

alex-birch
Copy link
Contributor

What

Fixes the primary key configuration for the product_availability stream in the CIN7 connector to support multi-location inventory tracking.

Problem

The current primary key configuration uses only [ID] (product ID), which prevents the same product from being tracked across multiple locations. This causes data loss during deduplication when a product exists in multiple warehouses/locations.

Solution

Changed primary key from [ID] to [ID, Location] to create a composite key that uniquely identifies each product-location combination.

Why

  • CIN7 supports multi-location inventory management
  • The Location field is required per CIN7 API documentation
  • This enables proper incremental sync with deduplication for multi-location scenarios
  • Prevents data loss when products exist across multiple locations

Testing

  • Verified Location field is marked as required in CIN7 API docs
  • Confirmed both ID and Location are non-nullable fields suitable for primary key

https://help.core.cin7.com/hc/en-us/articles/9034523140879-ProductAvailability
image

Files Changed

  • airbyte-integrations/connectors/source-cin7/manifest.yaml

…support

- Change primary key from [ID] to [ID, Location]
- Fixes bug where same product in multiple locations caused data loss
- Location is required field per CIN7 API docs
- Enables proper deduplication for multi-location inventory
Copy link

vercel bot commented Jul 30, 2025

@alexbirch-xy is attempting to deploy a commit to the Airbyte Growth Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLAassistant commented Jul 30, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

👋 Welcome to Airbyte!

Thank you for your contribution from alex-birch/airbyte! We're excited to have you in the Airbyte community.

Helpful Resources

PR Slash Commands

As needed or by request, Airbyte Maintainers can execute the following slash commands on your PR:

  • /format-fix - Fixes most formatting issues.
  • /bump-version - Bumps connector versions.
  • /run-connector-tests - Runs connector tests.
  • /run-cat-tests - Runs CAT tests.
  • /build-connector-images - Builds and publishes a pre-release docker image for the modified connector(s).

If you have any questions, feel free to ask in the PR comments or join our Slack community.

Tips for Working with CI

  1. "Vercel" CI failures. You can always ignore these. These are our docs builds but they can only be run by approval. A maintainer will approve the workflow upon request, but this failure should not be of concern.
  2. Pre-Release Checks. Please pay attention to these, as they contain standard checks on the metadata.yaml file, docs requirements, etc. If you need help resolving a pre-release check, please ask a maintainer.
    • Note: If you are creating a new connector, please be sure to replace the default logo.svg file with a suitable icon.
  3. Connector CI Tests. Some failures here may be expected if your tests require credentials. Please review these results to ensure (1) unit tests are passing, if applicable, and (2) integration tests pass to the degree possible and expected.
  4. (Optional.) BYO Connector Credentials for tests in your fork. You can optionally set up your fork with BYO credentials for your connector. This can significantly speed up your review, ensuring your changes are fully tested before the maintainers begin their review.

alexbirch-xy and others added 5 commits July 30, 2025 17:13
- Increment version from 0.3.10 to 0.3.11 for primary key fix
- Enable acceptance tests as required for medium/high use connectors
- Added test secrets configuration for acceptance tests in metadata.yaml
- Updated changelog in cin7.md to reflect version 0.3.11 release and acceptance tests enablement
…hangelog formatting

- Added 'connectorSubtype: api' to metadata.yaml
- Corrected link formatting in changelog for version 0.3.11 in cin7.md
@alex-birch alex-birch changed the title Source CIN7: fix product_availability primary key for multi-location … 🐛 Source CIN7: fix product_availability primary key for multi-location … Aug 4, 2025
Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Please fix the merge conflicts and then we can get this merged.

@alex-birch
Copy link
Contributor Author

Thanks! Conflicts resolved and latest master merged, ready for review.

@alex-birch
Copy link
Contributor Author

Hi there - I've updated the branch again to be inline with the latest master.

@cgardens Is there anything else I need to do to get this merged?

@alex-birch
Copy link
Contributor Author

Hi there - I've updated the branch again to resolve the conflicts.

@cgardens Is there anything else I need to do to get this merged? I'd really like to get it in so I can start using Airbyte's connector.

@cgardens
Copy link
Contributor

cgardens commented Aug 12, 2025

/run-connector-tests

Connector CI Tests Started

These tests will leverage Airbyte's integration test credentials.

Check job output.
✅ Connector CI Tests job completed successfully. See logs for details.

@alex-birch alex-birch requested a review from cgardens August 12, 2025 23:02
@cgardens
Copy link
Contributor

cgardens commented Aug 14, 2025

/run-connector-tests

Connector CI Tests Started

These tests will leverage Airbyte's integration test credentials.

Check job output.
✅ Connector CI Tests job completed successfully. See logs for details.

@cgardens
Copy link
Contributor

Thank you for your contribution!

@cgardens cgardens merged commit b803721 into airbytehq:master Aug 14, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants