Dynamic campaign audience - #2695
Open
adelowo wants to merge 6 commits into
Open
Conversation
| @@ -26,6 +26,17 @@ extend type organization | |||
| define asset_creator: [group#member] | |||
Member
There was a problem hiding this comment.
in roles, add audience to the campaign_manager role
Comment on lines
+70
to
+73
| field.String("email"). | ||
| Comment("the email address for this audience member"). | ||
| NotEmpty(). | ||
| Annotations( |
Member
There was a problem hiding this comment.
Why doe this have to be not empty? Can't it be from one of the edges?
| func HookAudienceValidateFilters() ent.Hook { | ||
| return hook.On(func(next ent.Mutator) ent.Mutator { | ||
| return hook.AudienceFunc(func(ctx context.Context, m *generated.AudienceMutation) (generated.Value, error) { | ||
| audienceTyp, err := getAudienceType(ctx, m) |
Member
There was a problem hiding this comment.
You need to make sure this isn't a soft delete first and if so, skip the hook
| filters map[string]any | ||
| } | ||
|
|
||
| func snapshotCampaignAudiences(ctx context.Context, db *generated.Client, camp *generated.Campaign) error { |
Member
There was a problem hiding this comment.
Would it work to combine the trust center subscribers to use this code so we can follow the same pattern?
Co-authored-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> Signed-off-by: Lanre Adelowo <adelowomailbox@gmail.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Dynamic audience
Manual audience where they are defined upfront