Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Iterable Lists] - STRATCONN-4357 - Fixing "Additional traits or identifiers must be a string but it was an object." error in Iterable Lists. #2541

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

seg-leonelsanches
Copy link
Contributor

Changing dataFields to be an object, not a string. Fixes this problem:

image

Testing

Payload for Postman (local):

{
    "settings": {
        "apiKey": "{{iterable-lists-api-key}}"
    },
    "payload": {
        "context": {
            "personas": {
                "computation_key": "the_super_mario_bros_super_audience_2",
                "external_audience_id": "4269566",
                "audience_settings": {
                    "computation_key": "the_super_mario_bros_super_audience_2",
                    "external_audience_id": "4269566"
                }
            }
        },
        "traits": {
            "email": "[email protected]",
            "the_super_mario_bros_super_audience_2": true,
            "firstName": "Leonel",
            "lastName": "Sanches"
        },
        "userId": "[email protected]"
    },
    "mapping": {
        "email": {
            "@path": "$.traits.email"
        },
        "dataFields": {
            "@path": "$.traits"
        }
    }
}
image
  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [If destination is already live] Tested for backward compatibility of destination. Note: New required fields are a breaking change.
  • [Segmenters] Tested in the staging environment
  • [Segmenters] [If applicable for this change] Tested for regression with Hadron.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.40%. Comparing base (76ef79a) to head (11e31ed).
Report is 17 commits behind head on main.

Files with missing lines Patch % Lines
...ons/iterable-lists/syncAudience/iterable-client.ts 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2541      +/-   ##
==========================================
+ Coverage   78.39%   78.40%   +0.01%     
==========================================
  Files        1012     1012              
  Lines       17794    17795       +1     
  Branches     3349     3355       +6     
==========================================
+ Hits        13950    13953       +3     
+ Misses       2720     2719       -1     
+ Partials     1124     1123       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joe-ayoub-segment joe-ayoub-segment self-assigned this Oct 31, 2024
@joe-ayoub-segment
Copy link
Contributor

LGTM @seg-leonelsanches - just that single comment to take care of.

@seg-leonelsanches
Copy link
Contributor Author

LGTM @seg-leonelsanches - just that single comment to take care of.

Thank you, @joe-ayoub-segment. This is done.

@joe-ayoub-segment
Copy link
Contributor

Pushed an updated - generated-types.ts needed updating.

@joe-ayoub-segment
Copy link
Contributor

hi @seg-leonelsanches - qq is this PR for this JIRA ticket?

@seg-leonelsanches
Copy link
Contributor Author

Hi @joe-ayoub-segment. No, this is for https://segment.atlassian.net/browse/STRATCONN-4357. The following ticket, https://segment.atlassian.net/browse/STRATCONN-4358, is another problem, also with this destination.

@joe-ayoub-segment joe-ayoub-segment changed the title Fixing "Additional traits or identifiers must be a string but it was an object." error in Iterable Lists. [Iterable Lists] - STRATCONN-4357 - Fixing "Additional traits or identifiers must be a string but it was an object." error in Iterable Lists. Nov 5, 2024
@joe-ayoub-segment joe-ayoub-segment enabled auto-merge (squash) November 12, 2024 10:57
@joe-ayoub-segment joe-ayoub-segment merged commit 491ae8d into main Nov 12, 2024
14 of 15 checks passed
@joe-ayoub-segment joe-ayoub-segment deleted the iterable-lists-data-fields branch November 12, 2024 11:00
@joe-ayoub-segment
Copy link
Contributor

hi @seg-leonelsanches PR deployed.

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.

2 participants