Skip to content

Manual Posting Flow

Overview

The Manual Posting Flow (also known as "Copy & Post") allows users to manually publish content to social platforms and then record that action in TendSocial. This is essential for platforms that do not support automatic API publishing or for users who prefer manual control.

Architecture

Frontend Components

  • Promote.tsx: The main campaign/post management interface. It handles the "Copy & Post" action which triggers the PostingHubModal.
  • *PostingHubModal: Displays the content to be posted, including text and media assets. It provides "Copy" buttons for easy transfer to social platforms and a "Mark Posted" button to record the action.

API Endpoint

POST /api/social-posts/:id/manual-record

This endpoint is responsible for recording the manual action.

  • URL Parameters: id (UUID of the CompanyPost)
  • Body:
    json
    {
      "platform": "linkedin", // string, e.g., 'linkedin', 'twitter'
      "status": "POSTED"      // string
    }
  • Response: The created ManualPostRecord.

Backend Service

ManualPostService (apps/backend/src/services/social/manualPost.service.ts) handles the business logic:

  1. Create Record: Creates a ManualPostRecord entry linked to the post and user.
  2. Update Post Status: Automatically updates the parent CompanyPost status to PUBLISHED and sets publishedAt to the current time.

Data Model

ManualPostRecord

Tracks the individual manual posting events.

FieldTypeDescription
idUUIDUnique identifier
companyIdUUIDTenant ID
postIdUUIDID of the parent CompanyPost
platformStringPlatform name (e.g., 'linkedin')
postedByUUIDID of the user who performed the action
statusStringStatus of the action (e.g., 'POSTED')
postedAtDateTimeTimestamp of the action (default: now)

Relationship

  • One CompanyPost can have multiple ManualPostRecord entries (though typically one per platform).
  • The CompanyPost status reflects the overall state (e.g., PUBLISHED).

Adding New Platforms

To add a new platform to the manual posting flow:

  1. Frontend:
    • Update PostingHubModal to render the platform icon and specific requirements (e.g., character limits differ).
    • Ensure the platform key matches the backend enum/string.
  2. Backend:
    • Update platform-mapping.ts if the platform string needs validation.
    • No strict schema changes are usually required if using string keys, but consistency is key.

User Guide

  1. Select Post: In the "Promote" view (/social-posts), select a post that is ready to be published.
  2. Click "Copy & Post": This button opens the Posting Hub.
  3. Copy Content: Use the "Copy" buttons to copy text and download media.
  4. Post to Platform: Open the target social network (e.g., LinkedIn) and paste the content.
  5. Mark as Posted: Return to TendSocial and click "Mark Posted" for that platform.
  6. Verification: The post status will update to "Posted" in the dashboard.

TendSocial Documentation