Create new Iterable trigger for Duo Pro post-purchase email
What does this MR do and why?
Add an iterable trigger for new Duo Pro post-purchase seat allocation email.
Related to #441506
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Check out the branch
- Create a new top level group
- Setup some seed records
namespace = Group.last
add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
add_on_purchase = GitlabSubscriptions::AddOnPurchase.create!(
add_on: add_on, namespace: namespace, expires_on: 1.month.from_now, quantity: 5, purchase_xid: 'A-S0001'
)
add_on_purchase.to_global_id.to_s # example: "gid://gitlab/GitlabSubscriptions::AddOnPurchase/9"
namespace.users.first.to_global_id.to_s # example: "gid://gitlab/User/85"
# enable the feature flag
Feature.enable(:hamilton_seat_management)
- Go to graphql explorer (logged in as admin): http://gdk.test:3000/-/graphql-explorer, and use following query and variables, update the two Ids as needed
mutation {
userAddOnAssignmentCreate(
input: {
userId: "gid://gitlab/User/85",
addOnPurchaseId: "gid://gitlab/GitlabSubscriptions::AddOnPurchase/9",
}) {
errors
}
}
Edited by Roy Liu