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

ProfilesApi::bulkSubscribeProfilesRequest not subscribing to a list. #69

Open
vehikl-laumei opened this issue Dec 17, 2024 · 3 comments

Comments

@vehikl-laumei
Copy link

While using the ProfilesApi to send bulkSubscribeProfilesRequest, we never receive "Subscribed to.." events.

Identical payloads work within Postman but oddly don't work through the php-sdk.

Here is an example of the payload we send;

{
    "data": {
        "type": "profile-subscription-bulk-create-job",
        "attributes": {
            "profiles": {
                "data": [
                    {
                        "type": "profile",
                        "attributes": {
                            "email": "[email protected]",
                            "subscriptions": {
                                "email": {
                                    "marketing": {
                                        "consent": "SUBSCRIBED"
                                    }
                                }
                            }
                        }
                    }
                ]
            },
            "historical_import": false
        },
        "relationships": {
            "list": {
                "data": {
                    "type": "list",
                    "id": "LIST_ID"
                }
            }
        }
    }
}
@cpcurtis1218
Copy link

Thank you for reaching out - are you receiving success responses for the bulkSubscribeProfilesRequest sent using the PHP SDK? If you're receiving success responses, but the profiles are not getting the "Subscribed to..." events, then the most likely reasons are:

  1. The list is Double Opt-in and so the user needs to confirm the opt-in email before they're marked as Subscribed in Klaviyo.
  2. The profile is already subscribed to the list and so they will not trigger a second "Subscribed to..." event.

I would recommend using the API Developer Logs to review the API calls that are made to your Klaviyo account using the PHP SDK as there may be additional details about why a profile is not subscribed that described in the logs.

If you'd like, I would recommend opening a Support Ticket so that the Klaviyo Support team can investigate your specific case.

@vehikl-laumei
Copy link
Author

@cpcurtis1218 We are getting successful response and have confirmed that our list is set to Single Opt-in.

This is happening while we're building out this feature, thus we're creating a new user every time.

image

@cpcurtis1218
Copy link

Are the profiles being created in the Klaviyo account by the Subscribe requests, or being created first and then the subscribe request is made after? Were you able to find the PHP SDK requests in the API Developer logs in the account?

I notice from the example earlier that the email domain @example.org and it's possible that the Klaviyo systems are not accepting this email address domain, despite showing a success response. I would recommend trying a different email domain to see if that helps.

In order to troubleshoot further it would be helpful to be able to reference the Klaviyo account. In order to reference the Klaviyo account it would be best to open a Support ticket, as we will not share account specifics in a github thread. If you open a support ticket, please reference this github thread so that the ticket is directed to the correct team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants