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

Responsys: Audiences as PETs mapping #2398

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

seg-leonelsanches
Copy link
Contributor

Actions Responsys today tries to work with existing PETs. The problem with this is: there’s no way to automatically modify a PET to include new columns when a corresponding audience is created. The actual endpoints only allow us to create new PETs.

The idea is a new Action that creates a new PET for each new audience before sending records to Responsys, also validating if users are already part of the same Profile List the PET belongs. This approach is already used with our customers successfully, but implemented as a Destination Function.

This implementation also follows the cadence that Responsys expects, with one event at a time, waiting for each API response, instead of parallel Promises.

Testing

Payload suggestion for /refreshAccessToken:

{
    "baseUrl": "https://cj01qwy-api.responsys.ocs.oraclecloud.com",
    "username": "my responsys username",
    "userPassword": "my password",
    "profileListName": "PROFILE_LIST_NAME",
    "insertOnNoMatch": true,
    "matchColumnName1": "EMAIL_ADDRESS",
    "updateOnMatch": "REPLACE_ALL",
    "defaultPermissionStatus": "OPTOUT"
}

Payload suggestion for /sendAudienceAsPet:

{
    "auth": {
        "accessToken": "Responsys token returned by /refreshAccessToken"
    },
    "settings": {
        "baseUrl": "https://cj01qwy-api.responsys.ocs.oraclecloud.com",
        "profileListName": "PROFILE_LIST_NAME",
        "matchColumnName1": "EMAIL_ADDRESS"
    },
    "payload": {
        "context": {
            "personas": {
                "computation_key": "my_audience_key"
            }
        },
        "traits": {
            "email": "[email protected]"
        },
        "userId": "1234567890"
    },
    "mapping": {
        "folder_name": "POC",
        "pet_name": {
            "@path": "$.context.personas.computation_key"
        },
        "computation_key": {
            "@path": "$.context.personas.computation_key"
        },
        "userData": {
            "EMAIL_ADDRESS_": {
                "@path": "$.traits.email"
            },
            "CUSTOMER_ID_": {
                "@path": "$.userId"
            }
        }
    }
}
  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [Segmenters] Tested in the staging environment

@joe-ayoub-segment
Copy link
Contributor

hi @seg-leonelsanches - thanks for raising this PR.

Looks like this is for a new Action. Could you complete the form on this page please so that we can properly evaluate if a new Action is the right way to go please?

https://segment.atlassian.net/wiki/spaces/~62b2d761d337d0b7d09d6455/pages/2873032746/Professional+Services+PRs+on+the+Action+Destinations+repo

I'm not a Responsys SME so I'd like to loop in @mayur-pitale and @longstoryshort as they were involved with writing the Integration.

@seg-leonelsanches
Copy link
Contributor Author

hi @seg-leonelsanches - thanks for raising this PR.

Looks like this is for a new Action. Could you complete the form on this page please so that we can properly evaluate if a new Action is the right way to go please?

https://segment.atlassian.net/wiki/spaces/~62b2d761d337d0b7d09d6455/pages/2873032746/Professional+Services+PRs+on+the+Action+Destinations+repo

Hi @joe-ayoub-segment. You're welcome.

Here's the supporting document: https://segment.atlassian.net/wiki/spaces/~62b2d761d337d0b7d09d6455/pages/2874376194/Responsys+PET+per+Audience+review+form

@seg-leonelsanches seg-leonelsanches marked this pull request as ready for review October 2, 2024 21:55
@seg-leonelsanches seg-leonelsanches requested a review from a team as a code owner October 2, 2024 21:55
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.

4 participants