Code-based Integration - Section Control
A feature that controls to maintain the number of concurrent users in a specific section of the application at a constant value. When the start function is called, a key is issued, and until the stop function is called, the user is considered to be in an active section, so the next waiting user is not allowed to enter. When the stop function is called, the key is returned and the next waiting user can enter.
Section control is one of two control types available in code-based integration. To compare with basic control and choose the most suitable approach for your use case, refer to the Integration Methods Overview.
For detailed information about how section control works, optimal use cases, use cases, etc., refer to the "Code-based Integration - Section Control" section in the Common Guide document.
Start Function
Function Name: nfStartSection
Description: Call the function at the point where you want to apply waiting to issue a key and display the waiting room.
Parameters:
| Parameter | Type | Description |
|---|---|---|
projectKey | String | Section control project key from console |
segmentKey | String | Section control segment key from console |
callback | Function | Custom callback function for waiting room event handling |
Example:
import Netfunnel from 'netfunnel-rn-agent';
Netfunnel.nfStartSection("{{PROJECT_KEY}}", "{{SEGMENT_KEY}}", function(response) {
// TODO: Implement callback function according to response.
nfCallback(response);
});
For how to implement the nfCallback function, refer to the Callback Functions section.
Stop Function
Function Name: nfStopSection
Description: Used to return the key after entry is completed.
If the stop function is not executed, the user is considered to remain in the active section, and the next waiting user's entry may be delayed.
Parameters:
| Parameter | Type | Description |
|---|---|---|
projectKey | String | Section control project key from console |
segmentKey | String | Section control segment key from console |
Example:
Netfunnel.nfStopSection("{{PROJECT_KEY}}", "{{SEGMENT_KEY}}");
Related Documentation
- Common Guide: Detailed explanation of section control
- Basic Control: For single-step operations
- API Reference: Complete function specifications
- Troubleshooting: Common issues and solutions