Created on 15 December 2022, almost 2 years ago
Updated 13 December 2023, 11 months ago

So today I decided to configure before going production but notice. The
project didn’t have a guide on how to configure it but just described
available feature.

I’d like to add a program where a user can share their affiliate link to
friends and when one of those friends buy a product, the user get a reward or
point.

Now after reading the project overview page, this is possible but I don’t
know how to proceed.

Yes, you can totally do that using price rewards. But there is no concept of giving 'points', yet. I'll try to collect an overview of this module and how it is supposed to be used, so this information may be moved into the readme file later.

Feel free to edit or leave feedback for any additional information missing.

Basic concept & Usage

  1. Go to /admin/commerce/recruitment/campaigns to create a new campaign. A campaign contains a set of products that can be recommended with optional 'participants' of the campaign and optional date range. No recruiters mean the campaign is open for all and a code will be available for all logged-in users (more about this see 'Available blocks').
  2. Create one or more campaign options in the campaign. A campaign option defines which products can be recommended and how much bonus the recruiter will be rewarded with.
  3. A recommendation URL looks like this: [DOMAIN]/code/[campaignoption]--[user]. The code consists of a campaign option code and a user code or UID. Both the campaign option code and user code can be customized. A campaign option code will be randomly generated on being created, where the user code is not. If there is no custom code set for a user, the UID is used instead.
  4. Calling the recommendation URL, a recruitment info will be saved to the user's session, containing the campaign option and the recruiter. There is only one session info saved. Calling a second recommendation URL will overwrite the first. The user will be redirected to the product page by default, but the redirect destination can also be set in the campaign option.
  5. When a product is being purchased (checkout complete) that matches a product from the session, a recruitment is created for the recruiter containing WHICH code (campaign option) was used, WHO used it and HOW MUCH the bonus of the recruitment is worth. All recruitments are listed here: /admin/commerce/recruitment/recruitings.
  6. Recruitments are created in the state 'Created' meaning 'pending' until they are 'accepted' or 'canceled' for any reason. The state will be set to 'accepted' via cron, if the order is 'completed'. Recruitments are collected by the recruiter and can be redeemed anytime, but only 'accepted' recruitments can be redeemed.
  7. Recruitments are redeemed per campaign. To redeem all accepted recruitments of a campaign, the recruiter goes to /user/rewards/collect/{campaign}. A 'reward' will be created for the recruiter, which contains all affecting recruitments and the sum of their bonus.
  8. The reward as well as its recruitments are marked as 'pending'. After the reward was paid out in any way, the state of the reward can be changed to 'paid'.

Available blocks

All blocks are available for logged-in users only.

  • Product sharing link block (FriendBlock): Will render a recommendation link on product pages, that are part of a campaign without any predefined recruiters. Intended for general 'free for all' campaigns.
  • Recruiter campaigns sharing link block (RecruiterBlock): Will show a list of all campaign codes, that the current user is a part of. Codes are grouped by campaign. Optionally also shows the 'free for all' campaign codes.
  • Recruitment Summary block: Shows a list of existing recruitments for the current user, grouped by campaign and state. Only shows created (pending) and accepted recruitments. Only accepted recruitments can be redeemed to a reward.
  • Recruitment Rewards block: Renders a list of rewards of the current user.
  • Recruitment Session Info: Shows information about the currently set recruitment session. Created for debuggung purposes.
💬 Support request
Status

Fixed

Version

1.0

Component

Documentation

Created by

🇩🇪Germany ktpm

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024