aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.39k stars 2.11k forks source link

Unable to create Analytics identifyUser with EMAIL or SMS or Push notification channel #12721

Open pascalito007 opened 6 months ago

pascalito007 commented 6 months ago

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Analytics

Amplify Categories

analytics

Environment information

``` # Put output below this line ```

Describe the bug

When using identifyUser from Analytics, I have no options for channel and optout. This is available in the In-App aws-amplify/in-app-messaging but not in @aws-amplify/analytics. Before migrating to V6 it was working in V5.

Expected behavior

I should be able to specify channelType and optout in order to identify an analytics pinpoint user.

Reproduction steps

  1. import identifyUser from @aws-amplify/analytics
  2. create an EMAIL segment in pinpoint console
  3. create a journey that send email to users created using identifyUser based on an event
  4. The email is never sent and the user never enter the journey

Code Snippet

import { record, identifyUser } from "@aws-amplify/analytics";

await identifyUser({
          userId: user.userId,
          userProfile: {
            email: "xxxxxxxxx@gmail.com",
          },
        });

        record({ name: "TestEvent" });

Log output

``` // Put your logs below this line ```

aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

cwomack commented 6 months ago

@pascalito007, confirmed this is a feature we don't have in v6 out of the box. I'll label this as a feature request and will review it with our team internally! Thank you for creating this issue and just want to confirm the context here. It sounds like you're basically wanting to send an email when an event is recorded, right?

pascalito007 commented 6 months ago

Yes correct @cwomack I have a pinpoint journey which send EMAIL to EMAIL channel type segment and SMS to sms channel type segment. This is triggered previously in v5 when using updateEndpoint+Analytics event record. I want the same behavior with identifyUser from Analytics + Analytics Event record.

soplan commented 1 month ago

Yeah this is stupid that it's not in v6.. I started a new project but am now considering switching back to v5 because this is a very important missing piece of the puzzle. Can we have an estimate?

To give you some context. I use it for Journeys but also for marketing campaigns. I use it to send emails to inactive users or users who are on a specific subscription plan and user subscribed to product update newletters... So pretty much everything in Pinpoint I use to send email to the users in a specific segment (filtered on whether they want to receive newsletters)

mohammedsahl commented 1 month ago

+1 We use email as our channel. It's crucial for us. Can't upgrade to v6 without it :/