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

Campaign Creation: Add minimum budget limit #2503

Open
4 tasks
Tracked by #2459
joemcgill opened this issue Aug 6, 2024 · 16 comments · May be fixed by #2583
Open
4 tasks
Tracked by #2459

Campaign Creation: Add minimum budget limit #2503

joemcgill opened this issue Aug 6, 2024 · 16 comments · May be fixed by #2583
Assignees

Comments

@joemcgill
Copy link
Collaborator

joemcgill commented Aug 6, 2024

Part of #2459

As a follow-up to #2502, even when we initialize the BudgetSection component with the recommended daily budget amount, merchants can edit the value to a lower value. For example, a merchant could set a campaign for 1 cent per day.

We already have budget recommendations for each country, so we could take a % of that recommendation and set it up as a minimum. For example, if the budget recommendation for US is $15/day, the minimum possible budget should be $5/day (~30% of recommended budget).

If a user tries to input a number lower than the minimum, we should display a validation error with an explanation of what needs to change.

Example mockup

image

Acceptance Criteria

  • A minimum possible value for the Daily Average Cost will be 30% of the recommended daily budget
  • If the Daily Average Cost input is set to a value lower than the minimum possible budget, a validation warning is shown reading "Please make sure daily average cost is greater than %d." where %d is replaced with the minimum.
  • If the Daily Average Cost input is set to a value lower than the minimum possible budget, the validation error is shown
  • If the Daily Average Cost input is set to a value lower than the minimum possible budget, the "Complete setup" button is disabled.

Implementation Brief

The component where this is displayed is the BudgetSection component, but the validation logic will need to be applied in the CampaignAssetsForm component by updating the validation logic of the validateCampaign function (ref).

Test Coverage

E2E tests for step 4 of the setup process is updated to cover examples where the minimum value is set and when a value less than the minimum is set.

@joemcgill joemcgill changed the title Add minimum budget limit Campaign Creation: Add minimum budget limit Aug 6, 2024
@joemcgill joemcgill self-assigned this Aug 6, 2024
@joemcgill
Copy link
Collaborator Author

Consolidating into #2502.

@joemcgill joemcgill closed this as not planned Won't fix, can't repro, duplicate, stale Aug 8, 2024
@joemcgill joemcgill reopened this Aug 8, 2024
@joemcgill
Copy link
Collaborator Author

Actually, no, setting a minimum budget limit will be a separate task from setting the initial value, which is what will be handled in #2502. Reopening this to define requirements for setting the minimum limit.

@eclarke1
Copy link
Collaborator

eclarke1 commented Aug 8, 2024

Adding back the custom labels as this was not appearing in our 'Detailed Epic View'

@eclarke1
Copy link
Collaborator

eclarke1 commented Aug 8, 2024

@joemcgill please could you re-add the size and Eng Focus labels (once the AC/IB has been added of course)

@joemcgill joemcgill added the needs design The issue requires design input/work from a designer. label Aug 8, 2024
@joemcgill
Copy link
Collaborator Author

@fblascogarma and @MatthiasReinholz, we'll need to confirm how we want to calculate the minimum value and better define the UX for when a merchant enters a value lower than the minimum.

@joemcgill
Copy link
Collaborator Author

@fblascogarma confirmed in Slack that we should use 30% of the recommended budget as the minimum for now. I think we can try to show a similar validation logic when the field value changes to an empty or zero value...

Image

Instead of "Please make sure daily average cost is greater than 0." the text can be "Please make sure daily average cost is greater than %d." where %d is replaced with the minimum. When the value is less than the minimum the "Complete setup" button will remain disabled.

@fblascogarma
Copy link
Collaborator

Correct, let's use 30%, see how it goes with that, and adjust if needed.

The default value should be the recommended budget. If users set up a budget below the recommended, we show them the message we have today in production. If users set up budget below the %d (minimum budget allowed) we can use with red font saying that the minimum is %d to avoid poor performance for very low budgets.

What do you think?

@fblascogarma
Copy link
Collaborator

30% and rounding up for a nicer number. For example, $28,000 instead of $27,547

@joemcgill
Copy link
Collaborator Author

@eason9487 I'm going to go ahead and take a swing at implementing this, but would appreciate any feedback you have about the approach to applying the validation logic/styles when you have a chance.

@joemcgill joemcgill removed needs design The issue requires design input/work from a designer. needs discussion labels Aug 28, 2024
@dsawardekar dsawardekar assigned dsawardekar and unassigned eason9487 Aug 29, 2024
@eason9487
Copy link
Member

Will this change be applied to campaign editing? If so, I would suggest adjusting the issue title and describing how it change campaign editing, e.g. whether to apply this limit to campaigns that already exist and are below the minimum budget.

@dsawardekar dsawardekar linked a pull request Sep 5, 2024 that will close this issue
@dsawardekar
Copy link
Collaborator

@asvinb Assigning this to you for the styling updates, please send back to me once complete, as I need to implement the e2e tests.

@eason9487 eason9487 assigned asvinb and dsawardekar and unassigned eason9487 Sep 23, 2024
@eason9487
Copy link
Member

Assigned to @dsawardekar and @asvinb because I'm not sure who is working on this ticket for now.

@asvinb asvinb assigned eason9487 and unassigned asvinb Sep 23, 2024
@eason9487 eason9487 assigned asvinb and unassigned eason9487 Sep 24, 2024
@asvinb asvinb assigned ankitguptaindia and unassigned asvinb Sep 24, 2024
@asvinb asvinb assigned ankitguptaindia and joemcgill and unassigned asvinb Sep 26, 2024
@macka61 macka61 assigned asvinb and unassigned ankitguptaindia Sep 30, 2024
@asvinb asvinb removed their assignment Sep 30, 2024
@asvinb asvinb assigned ankitguptaindia and unassigned asvinb and joemcgill Oct 1, 2024
@asvinb asvinb assigned asvinb and eason9487 and unassigned eason9487 and asvinb Oct 4, 2024
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

Successfully merging a pull request may close this issue.

8 participants