Skip to main content

Deployment Process (WeChat)

This guide provides step-by-step instructions for deploying the SBM CRM Platform WeChat Mini Program to the WeChat Official platform.

Prerequisites

Before beginning the deployment process, ensure you have:

  • WeChat Developer Tools installed and configured
  • Access to the WeChat Official Account Platform (https://mp.weixin.qq.com/)
  • Valid WeChat Official Account credentials
  • Environment variables configured for production

Step 1: Open WeChat Developer Tools

Launch the WeChat Developer Tools application and open your project workspace.

Step 2: Build the Application

  1. Open the terminal within WeChat Developer Tools or your system terminal.

  2. Configure production environment variables:

    • Copy the environment template file:
      cp .env.example .env.production
    • Edit .env.production and set all required secret environment variables for production.
  3. Build the WeChat Mini Program:

    npm run build:weapp

    The build process will generate the compiled application files ready for upload.

Step 3: Upload to WeChat Official Platform

  1. In WeChat Developer Tools, click the Upload button.

  2. Fill in the required information:

    • Version Number: Specify the version identifier (e.g., 1.0.0)
    • Project Notes: Provide a brief description of changes in this version
  3. Click Upload to submit the application to the WeChat Official platform.

tip

Keep detailed notes about each version to track changes and facilitate rollback if needed.

Step 4: Publish to Production

After uploading, you need to publish the version through the WeChat Official Account Platform.

Access Version Management

  1. Navigate to WeChat Official Account Platform and sign in with your WeChat account credentials.

  2. Navigate to Version Management > Version Management in the platform menu.

Trial Version (Optional)

Before releasing to production, you can test the application using a trial version:

  1. Select the uploaded version and click Grant to Trial Version.

  2. Configure the trial version settings:

    • Set the page path for testing
    • Confirm the configuration
  3. A QR code will be generated for the trial version, which can be used for internal testing and validation.

note

Trial versions allow you to test the application with a limited number of users before the official release.

Production Release

To publish the version to production:

  1. Select the uploaded version and click Submit for Review.

  2. Complete the submission form:

    • Fill in all required information
    • Provide any additional details requested by WeChat
  3. Review all settings and click Confirm to submit for review.

warning

WeChat may require 1-7 business days to review your submission. Ensure all information is accurate before submitting.

Post-Deployment

After the review is approved:

  • Monitor the application for any issues
  • Verify all features are working as expected
  • Check analytics and user feedback
  • Document any deployment-specific notes for future reference

Troubleshooting

If you encounter issues during deployment:

  • Build failures: Verify all environment variables are correctly set in .env.production
  • Upload errors: Check your network connection and WeChat Developer Tools version
  • Review rejection: Review WeChat's feedback and address any compliance issues before resubmitting