Course Inventory Retrieval Issue

Previously, when your colleagues helped us set up the system, the availability of spots for a class during a given time slot was determined by the number of people in the group. However, the group-creation feature was barely implemented afterward. In theory, inventory should be available, but today we were told there were no spots for a customer, yet I couldn’t locate where the inventory is controlled. (It was previously stated that registration is allowed if the group size is under 30.)

Setting aside the group-creation feature, can I first manually set the maximum number of registrants for each class, then manually update the inventory, and let the AI respond to customers based on this inventory to indicate whether spots are available?

Hello, the current business logic for this module is as follows:

In the 3Chat conditional workflow, when a user meets the conditions for Step 5:

  • Step 5: Payment to Join Group: When the user has confirmed acceptance of the quote and agreed to register, or has sent a payment screenshot confirming that payment is complete, the system triggers the task to send the payment QR code and automatically add the user to the group.

Triggered Skill: Payment Conversion and Group Entry

Logic steps within the skill:

  1. Query the knowledge base to retrieve the payment code and send it to the customer.
  2. Wait for the customer’s reply; once the payment screenshot is confirmed as valid, initiate the group-adding process.
  3. Before adding to the group, verify the essential information for the assigned class group: child’s name, parent’s contact details, class season, campus, session number, class time, etc. If any required information is missing, the system will ask for each item one by one.
  4. After obtaining all necessary fields, call the tool “Query Class Inventory” to retrieve data from the “Class Groups” table. This retrieves the “roomWxid” (group ID) matching the student’s selected course combination, such as “Xinghao Sports Yucai 2026 Summer Session 1, 10:00–12:00”. Then, call the “create_wework_group” tool to create the group. The 30-person limit for group creation is enforced within the automated “Class Assignment and Group Creation” workflow, which includes a conditional check: only proceed with group creation if the current number of members is less than 30. (See screenshot below for details.)

Note: Click on “Class Assignment and Group Creation” at the bottom of the left sidebar, then view the “Class Groups” and “Class Assignment Entry” sections in the middle column, and the “Conditional Logic” section on the far right.

Regarding your request to know where the number of registered participants is maintained: according to the original workflow, this information is stored in the “Class Groups” table, specifically in the “Group Member Count” field. This data is retrieved via the “Query Class Inventory” tool and used accordingly.

The new execution logic you propose can be designed based on this background information.

The action of adding people to the group hasn’t been executed for a long time; I’m not sure where it’s getting stuck!?

Actually, we’ve already told your implementation team that using the number of people added to the group to determine inventory isn’t suitable for our actual needs, as the maximum number of recruits varies by class. Here’s the logic I’m thinking of implementing now:

I’ve set up a multi-dimensional table with the capacity for each class and updated the current number of registered participants (for now, I’m updating this manually, but later I plan to sync it from our system via webhook) to calculate the available spots. I want the AI, when a customer inquires about a specific class, to inform them if the class is full and suggest they choose another class or speak with a human agent. How can this be implemented?

We may need to investigate the group-creation action by reviewing the untriggered logs for cases where there was a request to create a group, and then get back to you with an answer!

Regarding your new requirement, let me confirm my understanding:

  1. You will use a newly created table to maintain the class capacity information on your side. When the Agent runs, if a student wants to enroll in a particular class, it will fetch the data from this table in real time to check if the class is full. If it is full, the student will be guided to other classes with available spots or transferred to a human agent.

  2. For the enrollment data, you have another business system that maintains the accurate, real-time actual enrollment numbers for each class. You would like to sync this data in real time from that system.

Is this correct?

Additionally, I’d like to understand: under the new logic, once enrollment is confirmed, do we still need the original payment conversion and group-creation skills, including payment confirmation and information collection before creating the group?

Your understanding is correct. In my current business system, which uses WPS Online Sheets, the new logic requires payment conversion or joining a group, payment confirmation, information collection, and then adding users to the group.