# Invoices Source: https://docs.play2sell.com/admin/billing/invoices View invoice history, manage payment methods, and download receipts for your SalesOS subscription. # Invoices Access your complete billing history, download invoices, and manage your payment methods from the Billing section. ## Viewing Invoices Go to **Admin > Billing > Invoices** to see your complete invoice history. Each invoice entry shows: | Column | Description | | - | - | | **Invoice Number** | Unique identifier for the invoice | | **Date** | When the invoice was generated | | **Period** | The billing period covered | | **Plan** | The subscription plan for that period | | **Amount** | Total charged | | **Status** | Paid, Pending, or Failed | | **Actions** | Download PDF, view details | ### Invoice Statuses > [accordion] Paid > > Payment was successfully processed. The invoice PDF is available for download. > [accordion] Pending > > The invoice has been generated but payment has not been processed yet. This typically resolves within 24 hours. > [accordion] Failed > > The payment attempt failed. Check your payment method and retry. SalesOS will attempt to charge the card again automatically over the next few days. ### Downloading Invoices Click **Download PDF** next to any invoice to get a PDF receipt. The PDF includes: * Your company name and billing address * Invoice number and date * Plan details and period * Line items and amounts * Tax information (if applicable) * Payment method used > [!TIP] > > Need to download multiple invoices at once? Use the checkbox selection and click **Download Selected** to get a ZIP file with all selected invoice PDFs. ## Payment Methods ### Adding a Payment Method **1. Go to Admin > Billing > Payment Methods** Open the payment methods section. **2. Click Add Payment Method** Click the **+ Add** button. **3. Enter card details** Enter your credit or debit card number, expiration date, CVV, and billing address. All payment data is processed securely and never stored on SalesOS servers. **4. Save** Click **Save**. The new card is available for future charges. ### Supported Payment Methods * Credit cards (Visa, Mastercard, American Express) * Debit cards * Corporate cards > [!NOTE] > > SalesOS uses industry-standard encryption for all payment processing. Card details are handled by our payment processor and never stored on SalesOS infrastructure. ### Managing Payment Methods * **Set as default** — Choose which card is charged for recurring payments * **Remove** — Delete a payment method (you must have at least one active method) * **Update** — Edit expiration date or billing address ## Billing Address Your billing address appears on invoices and is used for tax calculations. Update it at **Admin > Billing > Billing Address**. Required fields: * Company legal name * Street address * City, State/Province * ZIP/Postal code * Country * Tax ID (CNPJ for Brazilian companies) ## Failed Payments If a payment fails: 1. SalesOS sends an email notification to all workspace admins 2. The system retries the charge after 3 days, then again after 7 days 3. If all retries fail, the subscription enters a grace period (14 days) 4. During the grace period, the platform remains accessible but a payment banner is displayed 5. After the grace period, the workspace is suspended until payment is resolved > [!WARNING] > > Keep your payment method up to date to avoid service interruptions. Update your card before it expires. ### Resolving Failed Payments 1. Go to **Admin > Billing > Payment Methods** 2. Update your card information or add a new card 3. Click **Retry Payment** on the failed invoice 4. Once the payment succeeds, the warning banner disappears ## Next Steps > [card] [Plans](/admin/billing/plans) > > Compare subscription plans > [card] [NFS-e](/admin/billing/nfse) > > Electronic invoicing for Brazilian companies # NFS-e (Electronic Invoices) Source: https://docs.play2sell.com/admin/billing/nfse Issue and manage Brazilian NFS-e electronic invoices through SalesOS Pay. # NFS-e (Electronic Invoices) SalesOS Pay issues NFS-e (Nota Fiscal de Serviço Eletrônica) for Brazilian companies directly from the platform, with no separate ERP login required. ## What is NFS-e? NFS-e is the Brazilian electronic invoice for services, mandated by municipal tax authorities. When your company provides services to clients, you must issue an NFS-e for each transaction. SalesOS automates this end to end. ## How It Works **1. Client registration** When a new client needs an invoice, SalesOS registers them with their CNPJ/CPF, address and contact details. **2. Invoice issuance** When a deal is closed or a billing event occurs, SalesOS generates the NFS-e — service description, value and applicable tax rates. **3. Processing** The NFS-e is submitted to the municipal tax authority (Prefeitura) for authorization. This typically takes a few seconds to a few minutes. **4. Confirmation** Once authorized, the NFS-e number and verification code are stored in SalesOS. The invoice PDF is available for download. ## Managing Invoices Go to **Admin > Billing > NFS-e** to access the invoice management panel. ### Invoice List The list shows all issued NFS-e documents with: | Column | Description | | - | - | | **Number** | NFS-e number assigned by the Prefeitura | | **Date** | Issue date | | **Client** | Client name and CNPJ/CPF | | **Service** | Service description | | **Value** | Invoice amount | | **Status** | Issued, Processing, Cancelled, Error | | **Actions** | View, download PDF, cancel | ### Invoice Statuses > [accordion] Processing > > The NFS-e has been submitted to the tax authority and is awaiting authorization. This usually completes within minutes. > [accordion] Issued > > The NFS-e was authorized by the tax authority. The official NFS-e number and verification code are available. > [accordion] Cancelled > > The NFS-e was cancelled. Cancellation is only possible within the timeframe allowed by the municipal tax authority (varies by city). > [accordion] Error > > An error occurred during submission. Check the error details and retry, or contact support if the issue persists. ## Issuing an NFS-e ### Automatic issuance When configured, SalesOS can automatically issue NFS-e invoices when: * A deal is marked as Closed Won * A recurring billing cycle triggers * A charge created via the [Payments API](/api/integrations/payments) is paid with `tax_document.auto_issue: true` ### Manual issuance To issue an NFS-e manually: 1. Go to **Admin > Billing > NFS-e** 2. Click **Issue NFS-e** 3. Select the client (or register a new one) 4. Enter the service description and value 5. Review the tax information 6. Click **Issue** ## Cancelling an NFS-e To cancel an issued NFS-e: 1. Find the invoice in the list 2. Click **Cancel** 3. Enter the cancellation reason 4. Confirm > [!WARNING] > > NFS-e cancellation is subject to municipal regulations. Most cities allow cancellation within 30 days of issuance, but this varies. Contact your accountant if you need to cancel an older invoice. ## Tax Rates The applicable tax rates depend on: * Your company's municipal registration * The type of service provided (CNAE code) * ISS rate defined by the municipality * Federal taxes (PIS, COFINS, IR, CSLL) based on your tax regime > [!NOTE] > > Tax configuration is set up during initial onboarding. Consult your accountant to ensure tax rates are correctly configured before issuing invoices through SalesOS. ## Service Codes When issuing an NFS-e, you need to select the correct municipal service code. Common codes include: * Software as a Service (SaaS) * Consulting services * Training and education * Technical support Your administrator can configure default service codes in **Admin > Billing > NFS-e Settings**. ## Setup Requirements To use NFS-e in SalesOS, you need: 1. Your company registered with the municipal tax authority 2. A valid digital certificate (if required by your municipality) 3. The NFS-e module enabled in your SalesOS plan Setup is handled during initial SalesOS configuration. Contact support if you need to enable or reconfigure NFS-e issuance for your tenant. ## Next Steps > [card] [Payments API](/api/integrations/payments) > > Issue charges and attach NFS-e via the API > [card] [Plans](/admin/billing/plans) > > See which plans include NFS-e # Subscription Plans Source: https://docs.play2sell.com/admin/billing/plans Compare SalesOS subscription plans — features, user limits, and pricing for each tier. # Subscription Plans SalesOS offers tiered plans to fit organizations of all sizes. Each plan includes progressively more features, users, and storage. ## Plan Comparison | Feature | Starter | Professional | Enterprise | | - | :-: | :-: | :-: | | **Users** | Up to 10 | Up to 50 | Unlimited | | **Deals** | Unlimited | Unlimited | Unlimited | | **Leads** | Unlimited | Unlimited | Unlimited | | **Pipeline stages** | 6 (default) | Unlimited custom | Unlimited custom | | **Custom fields** | 5 | 25 | Unlimited | | **Storage** | 5 GB | 25 GB | 100 GB | | **Chat** | Yes | Yes | Yes | | **Gamification** | Basic (rankings) | Full (rankings + badges + challenges) | Full + custom badges | | **Reports** | Personal stats | Team dashboards | Advanced analytics | | **Workflows** | 3 active | 25 active | Unlimited | | **API access** | Read-only | Full CRUD | Full + webhooks | | **Integrations** | - | API + ERP | All + custom | | **Branding** | Logo only | Logo + colors | Full white-label | | **Support** | Email | Email + chat | Priority + dedicated CSM | | **SSO** | - | - | Yes | | **Data export** | CSV | CSV + PDF | CSV + PDF + scheduled | | **NFS-e (invoicing)** | - | Yes | Yes | ## Plan Details > [tab] Starter > > The Starter plan is designed for small teams getting started with sales management. > > **Best for:** Teams of 1-10 people who need a simple, effective CRM with gamification basics. > > **Includes:** > > * Full sales pipeline with 6 default stages > * Lead management with up to 5 custom fields > * Team rankings and leaderboard > * Built-in chat > * Personal performance statistics > * 5 GB file storage > * Email support > [tab] Professional > > The Professional plan is for growing teams that need more customization and deeper analytics. > > **Best for:** Teams of 10-50 people who want advanced gamification, automation workflows, and team management tools. > > **Includes everything in Starter, plus:** > > * Unlimited custom pipeline stages > * Up to 25 custom fields > * Full gamification: badges, challenges, tier system > * 25 active automation workflows > * Team performance dashboards > * Full API access (CRUD) > * API and ERP integrations > * Brand colors customization > * NFS-e invoice generation > * 25 GB file storage > * Email and chat support > [tab] Enterprise > > The Enterprise plan is for large organizations that need unlimited scale, full customization, and premium support. > > **Best for:** Organizations with 50+ users who need advanced security, white-label branding, and dedicated support. > > **Includes everything in Professional, plus:** > > * Unlimited users > * Unlimited custom fields and workflows > * Custom badge creation > * Advanced analytics and scheduled reports > * Full white-label branding (custom domain, remove SalesOS branding) > * SSO / SAML authentication > * Webhook integrations > * Custom integrations support > * 100 GB file storage > * Priority support with dedicated Customer Success Manager ## Changing Plans **1. Go to Admin > Billing > Plans** Open the billing section. **2. Select a new plan** Click **Change Plan** and select the desired tier. **3. Review changes** See what features you gain or lose, and the price difference. **4. Confirm** Click **Confirm Change**. Upgrades take effect immediately; downgrades take effect at the end of the current billing period. > [!NOTE] > > When upgrading, you are charged a prorated amount for the remainder of the current billing period. When downgrading, your current plan stays active until the end of the paid period. ### Downgrade Considerations If you downgrade and exceed the lower plan's limits: * **Extra users** — You will need to deactivate users to meet the new limit before the downgrade takes effect * **Extra custom fields** — Existing fields remain but you cannot create new ones until you are under the limit * **Extra workflows** — Excess workflows are paused (not deleted); reactivate them if you upgrade again ## Billing Cycles Plans are available in two billing cycles: * **Monthly** — Pay month-to-month with flexibility to cancel anytime * **Annual** — Pay upfront for the year and save (typically 15-20% discount) > [!TIP] > > Annual billing offers significant savings. If you are committed to SalesOS, switching to annual billing reduces your per-month cost. ## Next Steps > [card] [Invoices](/admin/billing/invoices) > > View your invoice history > [card] [NFS-e](/admin/billing/nfse) > > Learn about electronic invoicing # Branding Source: https://docs.play2sell.com/admin/customization/branding Customize SalesOS with your company branding — logo, colors, and white-label options. # Branding SalesOS supports white-label branding so the platform looks and feels like your own product. Customize the logo, colors, email templates, and more. ## Logo Upload your company logo to replace the SalesOS branding: 1. Go to **Admin > Branding** 2. Click **Upload Logo** under the Logo section 3. Upload your logo file ### Logo Requirements | Property | Requirement | | - | - | | **Format** | PNG or SVG (transparent background recommended) | | **Size** | Maximum 2MB | | **Dimensions** | Recommended 200x60px (horizontal layout) | | **Variants** | Upload both light and dark versions for proper display | The logo appears in: * Sidebar navigation * Login page * Email notifications * Exported reports (PDF) * Browser favicon (square version auto-cropped) ## Colors Customize the color scheme to match your brand: **1. Go to Admin > Branding > Colors** Open the color configuration panel. **2. Set primary color** Your primary brand color. Used for buttons, links, active states, and highlights. Enter a hex code or use the color picker. **3. Set secondary color** A complementary color for accents and secondary elements. **4. Preview** The preview panel shows how your colors look across different elements (buttons, sidebar, cards). **5. Save** Click **Apply Colors**. Changes take effect immediately for all users. ### Customizable Color Elements | Element | Description | | - | - | | **Primary color** | Buttons, links, active states | | **Sidebar background** | Navigation sidebar background | | **Sidebar text** | Text color in the sidebar | | **Header background** | Top bar background color | | **Accent color** | Highlights, badges, notifications | > [!NOTE] > > SalesOS automatically adjusts text contrast based on your background colors to maintain readability. If a combination has poor contrast, you will see a warning. ## Login Page Customize the login experience: * **Background image** — Upload a custom background for the login page * **Welcome message** — Custom text displayed on the login page * **Custom URL** — Available on Enterprise plans, use your own domain (e.g., `sales.yourcompany.com`) ## Email Templates Customize the appearance of system emails: * **Header** — Your logo and brand colors * **Footer** — Custom footer text (company name, address, links) * **Invitation email** — Customize the text of user invitation emails * **Notification emails** — Adjust the template for notification emails > [!TIP] > > Keep email customization professional and consistent with your other company communications. Include your company name and support contact in the footer. ## White-Label Options On Enterprise plans, additional white-label options are available: * **Remove "Powered by SalesOS"** from the footer * **Custom domain** — Access the platform at your own URL * **Custom email sender** — Emails sent from your domain (e.g., `noreply@yourcompany.com`) * **Custom favicon** — Your own browser tab icon ## Resetting to Defaults To reset all branding to the SalesOS defaults: 1. Go to **Admin > Branding** 2. Click **Reset to Defaults** 3. Confirm the action > [!WARNING] > > Resetting branding affects all users immediately. The change is visible on the next page load. ## Next Steps > [card] [Custom Fields](/admin/customization/custom-fields) > > Customize your data model > [card] [Plans](/admin/billing/plans) > > See which branding features are on your plan # Custom Fields Source: https://docs.play2sell.com/admin/customization/custom-fields Add custom fields to leads and deals to capture data specific to your business. # Custom Fields Custom fields let you extend the default SalesOS data model with fields specific to your business. Add them to leads, deals, or both to capture the information your team needs. ## Creating a Custom Field **1. Go to Admin > Custom Fields** Open the Admin panel and click **Custom Fields**. **2. Select the entity** Choose whether the field applies to **Leads**, **Deals**, or **Both**. **3. Click Add Field** Click the **+ Add Field** button. **4. Configure the field** Set the field properties: * **Label** — The display name shown to users * **Field key** — A unique identifier (auto-generated from the label, used in the API) * **Type** — The data type (see field types below) * **Required** — Whether the field must be filled in * **Default value** — An optional pre-filled value * **Description** — Help text shown below the field **5. Save** Click **Create Field**. The field is immediately available on all new and existing records. ## Field Types | Type | Description | Example | | - | - | - | | **Text** | Single-line text input | Company website, reference number | | **Long Text** | Multi-line text area | Detailed notes, requirements | | **Number** | Numeric input (integers or decimals) | Employee count, budget amount | | **Currency** | Formatted currency value | Expected annual revenue | | **Date** | Date picker | Contract start date, renewal date | | **Dropdown** | Single selection from a list of options | Industry, lead source, deal type | | **Multi-Select** | Multiple selections from a list | Product interests, pain points | | **Checkbox** | Boolean true/false | Has NDA signed, is key account | | **Email** | Email address with validation | Secondary contact email | | **Phone** | Phone number with formatting | Alternative phone number | | **URL** | Web address with validation | Company LinkedIn profile | ## Managing Field Options For **Dropdown** and **Multi-Select** fields, you need to define the available options: 1. Open the field settings 2. Click **Manage Options** 3. Add options one at a time, or paste a list 4. Drag to reorder options 5. Set a default selection (optional) 6. Save > [!TIP] > > Keep dropdown options concise and consistent. Use "Information Technology" instead of mixing "IT", "Info Tech", and "Information Technology" as separate options. ## Field Ordering and Grouping Control how custom fields appear on the record form: * **Drag and drop** fields to reorder them * **Create sections** to group related fields together * **Set column layout** — Display fields in 1 or 2 columns ### Field Sections Group related fields under named sections: 1. Click **Add Section** above the field list 2. Name the section (e.g., "Company Details", "Technical Requirements") 3. Drag fields into the section ## Required Fields by Stage You can make fields required only when a deal reaches a specific pipeline stage: 1. Edit the custom field 2. Under **Conditional Requirements**, click **Add Rule** 3. Select the stage where this field becomes required 4. Save Example: Make "Contract Value" required when a deal enters the "Proposal" stage, and "Loss Reason" required when moving to "Closed Lost". > [!NOTE] > > Stage-conditional required fields prevent deals from moving to the next stage until the field is filled. This ensures data quality at critical points in the sales process. ## Using Custom Fields in Filters and Reports Custom fields are available in: * **Pipeline filters** — Filter deals by any custom field value * **Lead list filters** — Filter leads by custom field values * **Reports** — Group and aggregate data by custom field values * **Export** — Custom fields are included in CSV exports * **API** — Custom fields are accessible via the API ## Editing and Deleting Fields ### Editing You can edit a field's label, description, required status, and default value at any time. Changing the field type after creation is not supported — create a new field if you need a different type. ### Deleting > [!WARNING] > > Deleting a custom field permanently removes it and all its data from every record. This action cannot be undone. Export your data before deleting if you need to preserve the information. To delete a field: 1. Go to **Admin > Custom Fields** 2. Click the field you want to remove 3. Click **Delete Field** 4. Type the field name to confirm 5. Click **Permanently Delete** ## Next Steps > [card] [Workflows](/admin/customization/workflows) > > Automate actions based on field values > [card] [Pipeline](/user-guide/sales/pipeline) > > See custom fields in action on deals # Automation Workflows Source: https://docs.play2sell.com/admin/customization/workflows Set up automation workflows with triggers, conditions, and actions to eliminate repetitive tasks. # Automation Workflows Workflows let you automate repetitive tasks in SalesOS. Define a trigger (what starts the workflow), optional conditions (when it should run), and actions (what happens). ## How Workflows Work A workflow consists of three parts: 1. **Trigger** — An event that starts the workflow (e.g., deal moves to a stage) 2. **Conditions** — Optional filters that must be true for the workflow to proceed 3. **Actions** — What happens when the trigger fires and conditions are met ## Creating a Workflow **1. Go to Admin > Workflows** Open the Admin panel and click **Workflows**. **2. Click Create Workflow** Click **+ Create Workflow** and give it a descriptive name. **3. Select a trigger** Choose what event starts this workflow (see trigger types below). **4. Add conditions (optional)** Add filters to narrow when the workflow runs. For example: "Only if deal value is greater than \$10,000." **5. Add actions** Define what happens when the workflow triggers. You can chain multiple actions. **6. Activate** Toggle the workflow to **Active**. It will start running immediately for new events. ## Trigger Types | Trigger | Fires When | | - | - | | **Deal stage changed** | A deal moves from one stage to another | | **Deal created** | A new deal is added to the pipeline | | **Deal value changed** | The monetary value of a deal is updated | | **Deal owner changed** | A deal is reassigned to a different rep | | **Lead created** | A new lead is added | | **Lead status changed** | A lead's status changes (e.g., New to Qualified) | | **Lead converted** | A lead is converted to a deal | | **Task due** | A task reaches its due date | | **Task overdue** | A task passes its due date without completion | | **Field updated** | A specific field value changes | ## Condition Types Conditions let you control when a workflow should actually execute: * **Field equals / not equals** — Check a specific field value * **Field contains** — Check if a text field contains a substring * **Field greater than / less than** — Numeric comparisons * **Field is empty / is not empty** — Check if a field has a value * **Owner is** — Check the assigned user * **Team is** — Check the team membership * **Stage is** — Check the current pipeline stage Combine multiple conditions with AND / OR logic. ## Action Types > [accordion] Update Field > > Automatically set a field value. Examples: set priority to "High" when deal value exceeds \$50K, or update a status field when a stage changes. > [accordion] Move Stage > > Automatically move a deal to a different pipeline stage. Example: move to "Closed Lost" if a deal has been in "Proposal" for 30+ days with no activity. > [accordion] Assign Owner > > Change the deal or lead owner. Example: reassign leads from a departing rep to a round-robin pool. > [accordion] Send Notification > > Send an in-app or email notification to a specific user, the deal owner, the team leader, or a custom recipient. Example: notify the manager when a deal over \$100K is created. > [accordion] Create Task > > Automatically create a task assigned to the deal or lead owner. Example: create a "Send follow-up email" task 3 days after a deal enters "Proposal" stage. > [accordion] Send Webhook > > Send an HTTP POST request to an external URL with the event data. Example: notify your ERP system when a deal is closed. > [accordion] Add Tag > > Apply a tag to the deal or lead. Example: add "High Value" tag when deal value exceeds \$50K. > [accordion] Send Chat Message > > Post a message to a chat channel. Example: post to #wins when a deal is closed as won. ## Workflow Examples ### Auto-Notify Manager on Big Deals * **Trigger**: Deal created * **Condition**: Deal value > \$50,000 * **Actions**: 1. Send notification to team leader: "New high-value deal: worth " 2. Add tag: "High Value" 3. Set priority to "High" ### Follow-Up Reminder * **Trigger**: Deal stage changed to "Proposal" * **Condition**: None * **Actions**: 1. Create task: "Follow up on proposal" due in 3 days, assigned to deal owner ### Stale Deal Alert * **Trigger**: Field updated (last\_activity\_date) * **Condition**: Days since last activity > 14 AND stage is not "Closed Won" or "Closed Lost" * **Actions**: 1. Send notification to deal owner: "Deal has had no activity for 14 days" 2. Send notification to team leader > [!TIP] > > Start with a few simple workflows and expand over time. Too many workflows at once can create confusion. Monitor the workflow log to ensure they behave as expected. ## Workflow Log Every workflow execution is logged. Go to **Admin > Workflows > Log** to see: * When each workflow ran * What triggered it * Whether it succeeded or failed * What actions were executed * Any error messages > [!WARNING] > > Review the workflow log regularly, especially after creating new workflows. Misconfigured workflows can cause unintended changes to your data. ## Enabling and Disabling Workflows Toggle any workflow on or off from the workflow list. Disabled workflows do not run but their configuration is preserved. ## Next Steps > [card] [Branding](/admin/customization/branding) > > Customize the look of your workspace # Initial Setup Source: https://docs.play2sell.com/admin/initial-setup First-time company setup in SalesOS — configure your workspace, add your logo, and prepare for your team. # Initial Setup This guide walks administrators through the first-time configuration of a SalesOS workspace. Complete these steps before inviting your team. ## Setup Checklist **1. Company Profile** Set your company name, logo, and basic information. Go to **Admin > Company Settings** and fill in: * **Company name** — Displayed throughout the platform * **Logo** — Appears in the sidebar and emails (recommended: 200x60px PNG with transparent background) * **Industry** — Helps SalesOS suggest relevant templates * **Timezone** — Used for reports, deadlines, and scheduled tasks * **Currency** — Default currency for deal values **2. Sales Pipeline Configuration** Customize your pipeline stages to match your sales process. Go to **Admin > Pipeline Settings**: * Rename existing stages or add new ones * Set probability percentages for each stage * Define stage colors for visual distinction * Set optional stage requirements (fields that must be filled before entering a stage) > [!TIP] > > Start with the default stages and adjust after your team has used the platform for a few weeks. Over-customizing too early can create confusion. **3. Custom Fields** Add fields specific to your business. Go to **Admin > Custom Fields**: * Add fields for leads (e.g., company size, industry segment) * Add fields for deals (e.g., contract type, renewal date) * Choose field types: text, number, date, dropdown, checkbox, multi-select See the [Custom Fields guide](/admin/customization/custom-fields) for details. **4. Teams and Hierarchy** Create your team structure. Go to **Admin > Teams**: * Create teams (e.g., "Enterprise Sales", "SMB Team", "Inside Sales") * Assign team leaders * Set up hierarchy if you have multiple levels See the [Teams guide](/admin/users/teams) for details. **5. Roles and Permissions** Configure who can do what. Go to **Admin > Roles**: * Review the default roles (Admin, Manager, Sales Rep) * Create custom roles if needed * Adjust permissions per role See the [Permissions guide](/admin/users/permissions) for details. **6. Invite Your Team** Add team members. Go to **Admin > Users > Invite**: * Send individual or bulk invitations * Assign roles and teams during the invite process * Set up round-robin lead distribution if desired See the [Invites guide](/admin/users/invites) for details. **7. Configure Gamification** Set up the gamification system. Go to **Admin > Gamification**: * Adjust point values for activities (or keep the defaults) * Enable or disable specific badge categories * Create your first challenge to welcome the team **8. Integrations (Optional)** Connect SalesOS to your other tools. Go to **Admin > Integrations**: * Set up email integration for tracking * Configure webhook endpoints See the [Integrations guides](/api/integrations/custom) for details. ## First-Day Recommendations > [!WARNING] > > Complete at least steps 1 through 6 before inviting your team. Having the pipeline, fields, and teams configured before onboarding prevents confusion. ### Before Inviting the Team * Upload your company logo and set brand colors * Configure at least the pipeline stages * Create the team structure * Set up the key custom fields * Prepare a short onboarding message ### On Launch Day * Send invitations to all team members * Post a welcome message in the #general channel * Create a "Welcome Challenge" (e.g., "Complete your profile and create your first lead") * Be available to answer questions in chat ### First Week * Monitor team adoption and help anyone who is stuck * Adjust pipeline stages if the team finds issues * Review the initial dashboard data * Collect feedback and iterate on the configuration ## Configuration Reference | Setting | Location | When to Configure | | - | - | - | | Company profile | Admin > Company Settings | Before inviting team | | Pipeline stages | Admin > Pipeline Settings | Before inviting team | | Custom fields | Admin > Custom Fields | Before inviting team | | Teams | Admin > Teams | Before inviting team | | Roles | Admin > Roles | Before inviting team | | Gamification | Admin > Gamification | Before or during launch | | Branding | Admin > Branding | Optional, anytime | | Integrations | Admin > Integrations | After team is onboarded | | Billing | Admin > Billing | Anytime | ## Next Steps > [card] [Invite Users](/admin/users/invites) > > Add your team members > [card] [Custom Fields](/admin/customization/custom-fields) > > Configure fields for your business # Dashboards and Reports Source: https://docs.play2sell.com/admin/reports/dashboards Track KPIs, monitor team performance, and visualize sales data with SalesOS dashboards. # Dashboards and Reports SalesOS provides visual dashboards and detailed reports that help managers and administrators track performance, identify trends, and make data-driven decisions. ## Dashboard Overview Go to **Reports > Dashboards** to access the reporting center. The default dashboard displays key performance indicators for the selected time period. ### KPI Cards The top row shows summary metrics: | KPI | Description | | - | - | | **Total Revenue** | Sum of all Closed Won deal values | | **Pipeline Value** | Sum of all open deal values | | **Deals Won** | Number of deals closed as won | | **Deals Lost** | Number of deals closed as lost | | **Conversion Rate** | Won deals / (Won + Lost deals) | | **Average Deal Size** | Mean value of won deals | | **Sales Cycle** | Average days from deal creation to close | | **New Leads** | Number of leads created in the period | ### Charts > [accordion] Revenue Over Time > > A line chart showing closed revenue by week or month. Compare against targets and previous periods. > [accordion] Pipeline Funnel > > A funnel chart showing the number of deals and their combined value at each pipeline stage. Identifies where deals get stuck or fall off. > [accordion] Win/Loss Analysis > > A bar chart comparing won vs lost deals. Includes loss reason breakdown when deals are marked with loss reasons. > [accordion] Lead Source Performance > > Shows which lead sources generate the most deals and revenue. Helps optimize marketing spend. > [accordion] Team Performance Comparison > > Side-by-side comparison of teams by revenue, deal count, conversion rate, and average deal size. > [accordion] Individual Rep Performance > > Detailed metrics for each sales rep: deals, revenue, activities, and ranking position. > [accordion] Forecast vs Actual > > Compares weighted pipeline forecast against actual closed revenue. Shows forecast accuracy over time. ## Filtering Reports All dashboards support filtering by: * **Time period** — Today, this week, this month, this quarter, this year, custom range * **Team** — All teams or a specific team * **User** — All users or a specific sales rep * **Pipeline stage** — Filter by specific stages * **Lead source** — Filter by how leads were acquired * **Custom fields** — Filter by any custom field value > [!TIP] > > Save frequently used filter combinations as named views. Click **Save View** after applying your filters to create a reusable preset. ## Custom Dashboards On Professional and Enterprise plans, you can create custom dashboards: **1. Go to Reports > Dashboards** Open the reporting section. **2. Click Create Dashboard** Click **+ New Dashboard** and give it a name. **3. Add widgets** Drag widgets from the widget library onto the dashboard canvas. Available widgets include KPI cards, charts, tables, and activity feeds. **4. Configure each widget** Click a widget to configure its data source, filters, and display options. **5. Arrange the layout** Drag and resize widgets to create your preferred layout. **6. Save and share** Save the dashboard. Optionally share it with specific users or teams. ## Scheduled Reports Set up automated email reports that are delivered on a schedule: 1. Go to **Reports > Scheduled** 2. Click **+ Create Schedule** 3. Select the dashboard or report to send 4. Choose recipients (individual users or teams) 5. Set the frequency (daily, weekly, monthly) 6. Choose the delivery time 7. Save > [!NOTE] > > Scheduled reports are delivered as PDF attachments. They capture the dashboard state at the time of generation with the filters you configured. ## Report Types Beyond the main dashboard, SalesOS offers specialized reports: | Report | Description | Access | | - | - | - | | **Pipeline Report** | Detailed view of all deals by stage, value, and age | Manager, Admin | | **Activity Report** | Logs of all sales activities (calls, emails, notes) | Manager, Admin | | **Lead Report** | Lead conversion funnel and source analysis | Manager, Admin | | **Forecast Report** | Revenue projections based on weighted pipeline | Manager, Admin | | **Gamification Report** | Points, rankings, badges earned, challenge results | Manager, Admin | | **Personal Stats** | Individual performance summary | All users (own data) | ## Next Steps > [card] [Exporting Data](/admin/reports/export) > > Export report data in various formats > [card] [Pipeline](/user-guide/sales/pipeline) > > Return to pipeline management # Exporting Data Source: https://docs.play2sell.com/admin/reports/export Export deals, leads, and reports from SalesOS in CSV, PDF, or via scheduled deliveries. # Exporting Data SalesOS allows you to export your data for use in external tools, accounting systems, presentations, or backups. ## Export Formats | Format | Best For | Available On | | - | - | - | | **CSV** | Spreadsheet analysis, importing into other tools | All plans | | **PDF** | Presentations, sharing with stakeholders | Professional, Enterprise | | **XLSX** | Excel-specific formatting and formulas | Professional, Enterprise | ## What You Can Export ### Deals Export your deal data from the Pipeline or Deals list view: 1. Go to **Pipeline** or **Deals** 2. Apply any filters you want (the export respects current filters) 3. Click **Export** 4. Select the format (CSV, PDF, or XLSX) 5. Choose which fields to include 6. Click **Download** Exported deal data includes: * Deal name, value, stage, and probability * Contact and company information * Owner and team * Creation and close dates * All custom field values * Deal notes (optional) ### Leads Export leads from the Leads list view: 1. Go to **Leads** 2. Apply filters as needed 3. Click **Export** 4. Configure fields and format 5. Download ### Reports Export any dashboard or report: 1. Open the report or dashboard 2. Set the desired time period and filters 3. Click the **Export** button in the top-right 4. Choose PDF for a visual report or CSV for raw data 5. Download > [!TIP] > > When exporting reports as PDF, the export captures exactly what you see on screen, including charts and visualizations. CSV exports provide the underlying data without charts. ## Scheduled Exports On Enterprise plans, you can schedule automatic exports: **1. Go to Admin > Reports > Scheduled Exports** Open the scheduled exports section. **2. Click Create Schedule** Click **+ New Scheduled Export**. **3. Configure the export** * Select the data type (deals, leads, or report) * Choose the format (CSV, PDF, XLSX) * Set filters and field selection * Choose delivery frequency (daily, weekly, monthly) * Add email recipients **4. Activate** Toggle the schedule to active. The first export is sent at the next scheduled time. > [!NOTE] > > Scheduled exports are delivered as email attachments. The maximum file size for email delivery is 25MB. For larger exports, a download link is provided instead of an attachment. ## Bulk Export For complete data exports (backup or migration purposes): 1. Go to **Admin > Data Management > Export All** 2. Select which entities to include (deals, leads, users, activities) 3. Click **Generate Export** 4. The system prepares the export in the background 5. You receive an email with a download link when ready > [!WARNING] > > Full data exports can take several minutes for large datasets. The download link expires after 24 hours. ## Field Selection When exporting, you can choose exactly which fields to include: * **Standard fields** — All built-in SalesOS fields * **Custom fields** — Any custom fields configured by your admin * **Related data** — Include associated contact, company, or team information * **Activity log** — Include the history of changes (can significantly increase file size) ## Data Privacy Exports contain potentially sensitive business data. Keep in mind: * Only Admins and Managers can export data (controlled by role permissions) * All export actions are logged in the audit trail * Export files should be stored securely and shared only with authorized personnel * Exported files are not encrypted — handle them according to your company's data policy ## Next Steps > [card] [Dashboards](/admin/reports/dashboards) > > Build visual dashboards > [card] [API](/api/conventions) > > Access data programmatically via the API # Inviting Users Source: https://docs.play2sell.com/admin/users/invites Invite team members to SalesOS — individual invites, bulk imports, and managing pending invitations. # Inviting Users Add team members to your SalesOS workspace by sending email invitations. You can invite users one at a time or in bulk. ## Individual Invites **1. Go to Admin > Users** Open the Admin panel and click **Users** in the sidebar. **2. Click Invite User** Click the **Invite User** button in the top-right corner. **3. Fill in the invitation form** Enter the following: * **Email** — The user's email address (they will receive an invitation link here) * **Name** — The user's full name * **Role** — Select a role: Admin, Manager, or Sales Rep * **Team** — Assign to a team (optional, can be done later) **4. Send the invitation** Click **Send Invite**. The user receives an email with a link to create their account and set a password. > [!NOTE] > > Invitation links expire after 7 days. If a user does not accept in time, you can resend the invitation from the Users list. ## Bulk Invites To invite multiple users at once: 1. Go to **Admin > Users** 2. Click **Bulk Invite** 3. Download the CSV template 4. Fill in the template with user details: ```csv theme={null} email,name,role,team john@company.com,John Smith,sales_rep,Enterprise sarah@company.com,Sarah Jones,manager,SMB mike@company.com,Mike Brown,sales_rep,Enterprise ``` 5. Upload the completed CSV 6. Review the preview — SalesOS highlights any issues (duplicate emails, invalid roles) 7. Click **Send All Invitations** ### CSV Field Reference | Column | Required | Values | | - | - | - | | `email` | Yes | Valid email address | | `name` | Yes | User's full name | | `role` | Yes | `admin`, `manager`, or `sales_rep` | | `team` | No | Team name (must match an existing team) | > [!WARNING] > > Each invitation counts toward your plan's user limit. Check your current plan in **Admin > Billing** before sending bulk invites. ## Managing Pending Invitations The Users list shows all invitations and their status: | Status | Meaning | | - | - | | **Pending** | Invitation sent but not yet accepted | | **Accepted** | User created their account and is active | | **Expired** | Invitation expired after 7 days without acceptance | ### Actions on Pending Invitations * **Resend** — Send the invitation email again (resets the 7-day timer) * **Revoke** — Cancel the invitation before it is accepted * **Edit** — Change the role or team assignment before the user accepts ## Managing Active Users Once users accept their invitation, you can manage their accounts: * **Change role** — Promote or adjust a user's role * **Change team** — Reassign to a different team * **Deactivate** — Temporarily disable access without deleting the account * **Delete** — Permanently remove the user (their deals and leads can be reassigned) > [!TIP] > > Deactivating is safer than deleting. A deactivated user's data is preserved and the account can be reactivated later. Deletion is permanent. ## Onboarding New Users When a new user accepts their invitation, they go through: 1. **Password creation** — Set their login password (or SSO if configured) 2. **Profile setup** — Add their name, photo, and phone 3. **Platform tour** — An optional guided tour of the main features 4. **Dashboard** — Land on their home dashboard ### Tips for Smooth Onboarding * Send invitations in batches so you can support each group * Prepare a welcome message in the #general chat channel * Create a "Getting Started" challenge to motivate first actions * Share the [Getting Started guide](/user-guide/getting-started) with new users * Assign a buddy from the team to help new members ## Next Steps > [card] [Permissions](/admin/users/permissions) > > Configure what each role can do > [card] [Teams](/admin/users/teams) > > Organize users into teams # Roles and Permissions Source: https://docs.play2sell.com/admin/users/permissions Configure roles and access control — define what each user role can see and do in SalesOS. # Roles and Permissions SalesOS uses a role-based access control (RBAC) system to manage what users can see and do. Each user is assigned a role, and each role has a set of permissions. ## Default Roles SalesOS comes with three built-in roles: > [tab] Admin > > Full access to the entire platform. Admins can: > > * Access the Admin panel and all settings > * Manage users, teams, and roles > * Configure pipeline stages, custom fields, and workflows > * View all deals, leads, and reports across the company > * Manage billing and subscriptions > * Create and manage gamification settings > * Access API keys and integration settings > [tab] Manager > > Access to team management and reporting. Managers can: > > * View and manage deals and leads for their team > * Access team performance reports and dashboards > * Create and manage challenges > * Reassign deals and leads within their team > * View team chat channels > * Export team data > > Managers **cannot**: > > * Access the Admin panel > * Manage billing or subscriptions > * Change pipeline stages or custom fields > * Manage users outside their team > [tab] Sales Rep > > Access to individual sales tools. Sales reps can: > > * Create, view, and manage their own deals and leads > * View the pipeline (own deals highlighted) > * Access chat and participate in channels > * View rankings and earn badges > * Participate in challenges > * Update their own profile > > Sales reps **cannot**: > > * View other reps' deal details (unless shared) > * Access reports beyond personal stats > * Manage other users > * Access admin settings ## Permission Matrix | Permission | Admin | Manager | Sales Rep | | - | :-: | :-: | :-: | | View own deals | Yes | Yes | Yes | | View team deals | Yes | Yes | No | | View all deals | Yes | No | No | | Create deals | Yes | Yes | Yes | | Edit own deals | Yes | Yes | Yes | | Edit team deals | Yes | Yes | No | | Delete deals | Yes | No | No | | View all reports | Yes | No | No | | View team reports | Yes | Yes | No | | View personal stats | Yes | Yes | Yes | | Manage users | Yes | No | No | | Manage teams | Yes | Limited | No | | Configure pipeline | Yes | No | No | | Manage custom fields | Yes | No | No | | Manage workflows | Yes | No | No | | Access billing | Yes | No | No | | Create challenges | Yes | Yes | No | | Manage integrations | Yes | No | No | | Export data | Yes | Yes | No | ## Custom Roles Administrators can create custom roles for specific needs: **1. Go to Admin > Roles** Open the Admin panel and click **Roles**. **2. Click Create Role** Click the **+ Create Role** button. **3. Name the role** Give the role a descriptive name (e.g., "Senior Rep", "Regional Manager", "Read-Only Viewer"). **4. Set permissions** Toggle individual permissions on or off. Start from the closest default role and adjust as needed. **5. Save** Click **Save Role**. You can now assign this role to users. ### Common Custom Roles > [accordion] Senior Sales Rep > > Like Sales Rep but with ability to view team deals and access team-level reports. Useful for experienced reps who mentor others. > [accordion] Read-Only Viewer > > Can view dashboards and reports but cannot create, edit, or delete anything. Useful for executives who only need visibility. > [accordion] Team Lead > > Like Manager but limited to a single team. Can view and reassign deals within their team but not access other teams. ## Data Visibility Rules Beyond role permissions, SalesOS enforces data visibility rules: * **Own data** — Users always see their own deals, leads, and activities * **Team data** — Managers see data for users in their team * **All data** — Admins see everything across the organization * **Shared data** — Any user can share a specific deal with another user, regardless of role > [!NOTE] > > Sharing a deal with another user gives them read access to that deal only. It does not change their role or general permissions. ## Changing a User's Role 1. Go to **Admin > Users** 2. Find the user and click their name 3. Select the new role from the **Role** dropdown 4. Click **Save** The change takes effect immediately. If the user is currently logged in, they may need to refresh their browser to see the updated permissions. > [!WARNING] > > Be careful when changing an Admin to a lower role. Ensure at least one other Admin exists, as every workspace needs at least one administrator. ## Next Steps > [card] [Teams](/admin/users/teams) > > Set up team structure > [card] [Invites](/admin/users/invites) > > Invite users with the right roles # Teams Source: https://docs.play2sell.com/admin/users/teams Create and manage teams — organize your sales force into groups with hierarchy and dedicated management. # Teams Teams in SalesOS let you organize your sales force into logical groups. Teams drive data visibility, reporting, gamification rankings, and lead distribution. ## Creating a Team **1. Go to Admin > Teams** Open the Admin panel and click **Teams**. **2. Click Create Team** Click the **+ Create Team** button. **3. Configure the team** Fill in the team details: * **Name** — A descriptive name (e.g., "Enterprise Sales", "LATAM Region", "Inside Sales") * **Description** — Optional description of the team's focus * **Team Leader** — Assign a manager as the team leader * **Parent Team** — For hierarchical structures, select a parent team **4. Add members** Select users to add to the team. Users can belong to only one team at a time. **5. Save** Click **Create Team**. ## Team Hierarchy SalesOS supports multi-level team hierarchies for larger organizations: ``` Company ├── North Region │ ├── Enterprise Sales │ └── SMB Sales ├── South Region │ ├── Enterprise Sales │ └── SMB Sales └── Inside Sales ├── Inbound Team └── Outbound Team ``` ### Hierarchy Rules * A parent team leader can see data from all child teams * Child team leaders can only see their own team's data * There is no limit to the number of hierarchy levels * Moving a team in the hierarchy updates visibility rules automatically ## Managing Team Members ### Adding Members 1. Go to the team detail page 2. Click **Add Members** 3. Search for and select users 4. Click **Add** ### Removing Members 1. Go to the team detail page 2. Find the member in the list 3. Click the **Remove** button next to their name 4. Confirm the removal > [!NOTE] > > When a user is removed from a team, their deals and leads remain assigned to them. You may want to reassign their pipeline before removing them if they are leaving the team permanently. ### Transferring Members To move a user from one team to another: 1. Go to **Admin > Users** 2. Find the user 3. Change their **Team** assignment 4. Save the changes ## Lead Distribution Teams can have automatic lead distribution enabled: > [accordion] Round Robin > > New leads are distributed evenly across team members in rotation. Each member receives roughly the same number of leads over time. > [accordion] Weighted Distribution > > Leads are distributed based on weights assigned to each member. Senior reps or those with lighter pipelines can receive more leads. > [accordion] Manual Assignment > > All new leads go to a pool. The team leader or individual reps claim leads manually. This gives the most control but requires active management. Configure distribution rules in **Admin > Teams > \[Team Name] > Lead Distribution**. ## Team Performance Each team has a performance dashboard showing: * Total pipeline value for the team * Number of open deals * Deals won and lost this period * Revenue generated * Team ranking position vs other teams * Individual member performance breakdown Managers and admins can access team performance from **Reports > Team Performance** or from the team detail page. > [!TIP] > > Use team rankings in the gamification system to foster healthy competition between teams. Team challenges are especially effective for building camaraderie. ## Best Practices * **Keep teams focused** — Each team should have a clear purpose (region, segment, or function) * **Assign team leaders** — Every team needs a leader who can manage day-to-day operations * **Review team composition quarterly** — Adjust as your organization grows or changes * **Use hierarchy wisely** — Do not create too many levels; 2-3 is usually sufficient * **Balance team sizes** — Very unequal team sizes make inter-team competition unfair ## Next Steps > [card] [Invites](/admin/users/invites) > > Add new members to your teams > [card] [Permissions](/admin/users/permissions) > > Set team-level permissions # Authentication Source: https://docs.play2sell.com/api/authentication Authenticate with the SalesOS Integration API using tenant-scoped API Keys. # Authentication > [!TIP] > > Try signed requests in your browser at the [API Sandbox](https://play2sellsa.github.io/api-sandbox/) — paste your API key and secret, and the playground signs requests automatically. The SalesOS Integration API uses the **P2S-SIGN-V1** signed-request scheme in the `Authorization` header. API Keys are scoped to a single tenant, hashed with bcrypt, and support rate limiting and IP allowlists. | Scheme | When to use | Format | | - | - | - | | **P2S-SIGN-V1** | Server-to-server API calls — signed with the API key secret | `P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > > **Dashboard:** `https://dashboard.play2sell.com` > > **App:** `https://app.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` > > **Dashboard:** `https://dashboard-staging.play2sell.com` > > **App:** `https://app-staging.play2sell.com` ## Quick Start ### 1. Create an API Key Go to **Integrations > API Keys** in the SalesOS Dashboard: 1. Click **Create API Key** 2. Name your key (e.g., "CRM Nightly Sync", "Website Form Integration") 3. Select the scope: `default:sync` 4. Click **Create** 5. **Copy both values immediately** — they are only shown once: * **API Key** — public identifier, e.g. `sk_live_a1b2c3d4...` * **API Key Secret** — used to sign requests, never sent over the wire ### 2. Sign and Send a Request For server-to-server calls, build the `Authorization` header as `P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE`. The signature is hex HMAC-SHA256 of a 5-step derived-key chain: 1. `k1 = HMAC_SHA256(key=API_KEY_SECRET, msg=API_KEY)` 2. `k2 = HMAC_SHA256(key=k1, msg=TIMESTAMP)` 3. `k3 = HMAC_SHA256(key=k2, msg=METHOD)` 4. `k4 = HMAC_SHA256(key=k3, msg=PATH)` 5. `SIG = HMAC_SHA256_HEX(key=k4, msg=PAYLOAD_SHA256_HEX)` `TIMESTAMP` is Unix epoch seconds, valid for 30 seconds. `PAYLOAD_SHA256_HEX` is the lowercase hex SHA-256 of the raw request body (use the empty-string digest `e3b0c4...b855` if there is no body). > [tab] Node.js > > ```js theme={null} > import crypto from 'node:crypto'; > > const API_KEY = process.env.SALESOS_API_KEY; > const SECRET = process.env.SALESOS_API_SECRET; > > const hmac = (key, msg) => > crypto.createHmac('sha256', key).update(msg).digest(); > > async function signedRequest(method, path, body) { > const ts = Math.floor(Date.now() / 1000).toString(); > const bodyStr = body ? JSON.stringify(body) : ''; > const payloadHash = crypto.createHash('sha256').update(bodyStr).digest('hex'); > > const k1 = hmac(SECRET, API_KEY); > const k2 = hmac(k1, ts); > const k3 = hmac(k2, method); > const k4 = hmac(k3, path); > const sig = hmac(k4, payloadHash).toString('hex'); > > const res = await fetch(`https://api.play2sell.com${path}`, { > method, > headers: { > Authorization: `P2S-SIGN-V1 ${API_KEY}:${ts}:${sig}`, > 'Content-Type': 'application/json', > }, > body: bodyStr || undefined, > }); > return res.json(); > } > ``` > [tab] Python > > ```python theme={null} > import hashlib, hmac, json, os, time, requests > > API_KEY = os.environ['SALESOS_API_KEY'] > SECRET = os.environ['SALESOS_API_SECRET'] > > def hmac_raw(key: bytes, msg: str) -> bytes: > return hmac.new(key, msg.encode(), hashlib.sha256).digest() > > def signed_request(method: str, path: str, body=None): > ts = str(int(time.time())) > body_str = json.dumps(body) if body else '' > payload_hash = hashlib.sha256(body_str.encode()).hexdigest() > > k1 = hmac_raw(SECRET.encode(), API_KEY) > k2 = hmac_raw(k1, ts) > k3 = hmac_raw(k2, method) > k4 = hmac_raw(k3, path) > sig = hmac_raw(k4, payload_hash).hex() > > return requests.request( > method, f'https://api.play2sell.com{path}', > headers={ > 'Authorization': f'P2S-SIGN-V1 {API_KEY}:{ts}:{sig}', > 'Content-Type': 'application/json', > }, > data=body_str or None, > ).json() > ``` > [tab] Bash > > ```bash theme={null} > API_KEY="sk_live_..." > SECRET="..." > METHOD="POST" > PATH_="/functions/v1/default-integration/sync_collaborators" > BODY='{"action":"sync_collaborators","collaborators":[{"external_id":"emp-101","name":"Maria Santos","email":"maria@yourcompany.com"}]}' > TS=$(date +%s) > > PAYLOAD=$(printf '%s' "$BODY" | openssl dgst -sha256 -hex | awk '{print $2}') > K1=$(printf '%s' "$API_KEY" | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}') > K2=$(printf '%s' "$TS" | openssl dgst -sha256 -mac HMAC -macopt "hexkey:$K1" -hex | awk '{print $2}') > K3=$(printf '%s' "$METHOD" | openssl dgst -sha256 -mac HMAC -macopt "hexkey:$K2" -hex | awk '{print $2}') > K4=$(printf '%s' "$PATH_" | openssl dgst -sha256 -mac HMAC -macopt "hexkey:$K3" -hex | awk '{print $2}') > SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -mac HMAC -macopt "hexkey:$K4" -hex | awk '{print $2}') > > curl -X "$METHOD" "https://api.play2sell.com$PATH_" \ > -H "Authorization: P2S-SIGN-V1 $API_KEY:$TS:$SIG" \ > -H "Content-Type: application/json" \ > -d "$BODY" > ``` > [!TIP] > > Don't want to write the signing code yet? The [API Sandbox](https://play2sellsa.github.io/api-sandbox/) signs requests for you in the browser — paste your API key and secret, then click *Try it out*. ### 3. Check the Response **Success (200):** ```json theme={null} { "data": { "created": 1, "existing": 0, "errors": [], "total": 1 }, "meta": { "request_id": "f47ac10b-...", "timestamp": "2026-03-17T10:30:00.000Z" } } ``` **Invalid signature or timestamp outside the window (401):** ```json theme={null} { "error": "Signature does not match", "code": "signature_invalid" } ``` *** ## API Key Properties | Property | Details | | - | - | | **Prefix** | `sk_live_` (production) or `sk_test_` (testing) | | **Scope** | `default:sync` — enables `sync_collaborators` and `sync_activities` | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Expiration** | Optional — set an expiry date or leave as never-expires | | **IP allowlist** | Optional — restrict to specific IP addresses | | **Storage** | Hashed with bcrypt — the plaintext key is never stored | *** ## Key Formats SalesOS uses two key prefixes to distinguish environments: | Prefix | Environment | Use case | | - | - | - | | `sk_live_` | Production | Real data, real missions, real points | | `sk_test_` | Testing | Safe to use during development — no impact on production | > [!TIP] > > Use `sk_test_` keys during development and integration testing. Switch to `sk_live_` when you go to production. *** ## Authentication Errors Every rejection from the authentication layer has the **same shape**: `error` is a human-readable **string** and `code` is stable — branch on `code`, never on the text. ```json theme={null} { "error": "Signature does not match", "code": "signature_invalid" } ``` | HTTP Status | `code` | Meaning | What to do | | - | - | - | - | | 401 | `header_missing` | No `Authorization` header | Send `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | 401 | `header_malformed` | Header not in the `P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` format | Check the scheme, the colons and that the timestamp is an integer | | 401 | `api_key_not_found` | Unknown **or revoked** key | Confirm the key in the Dashboard; a revoked key does not come back — request a new one | | 401 | `key_expired` | Key is past its expiration date | Request a new key | | 401 | `signature_invalid` | Signature does not match | Sign the raw body bytes and the exact path, with the right secret | | 401 | `timestamp_too_old` | Timestamp older than 30 seconds | Re-sign every attempt; sync your clock (NTP) | | 401 | `timestamp_in_future` | Timestamp ahead of the server clock | Sync your clock (NTP) — any second in the future is rejected | | 403 | `scope_insufficient` | Valid key without the required scope | Read `missing_scopes` and request the scope on the key | ### Example: Key without required scope ```json theme={null} { "error": "API key missing required scopes: checkin:write", "code": "scope_insufficient", "missing_scopes": ["checkin:write"] } ``` `missing_scopes` only appears in this case. *** ## Rate Limits Each API key has an independent rate limit counter that resets hourly: | Setting | Default | Range | | - | - | - | | Requests per hour | 1000 | 10 — 100,000 | **How it works:** 1. Every authenticated and authorized request counts in the key's window (authentication rejections do not count) 2. The window is one hour from the first request 3. **Today the limit is measured but not enforced.** Once enforcement is on, excess requests will get `429` with `code: "rate_limited"` and a `Retry-After` header in seconds — handle it now **Handling rate limits in code:** ```javascript theme={null} // signedRequest() is the helper from the Quick Start above. async function callWithRetry(method, path, body) { const response = await signedRequest(method, path, body); if (response.status === 429) { const waitSeconds = Number(response.headers.get("Retry-After")) || 60; console.log(`Rate limited. Retrying in ${waitSeconds}s...`); await new Promise(r => setTimeout(r, waitSeconds * 1000)); return callWithRetry(method, path, body); // re-signs: the timestamp is valid for 30 s } return response.json(); } ``` *** ## Security Best Practices > [!WARNING] > > **Never expose API keys in client-side code.** Browser JavaScript, mobile apps, and public repositories can all leak your key. Always call the SalesOS API from your backend server. * **Use environment variables** — Store `SALESOS_API_KEY` in env vars or a secrets manager, never in source code * **Rotate keys periodically** — Create a new key, update your integration, then revoke the old one * **Use IP allowlists** — If your integration runs from fixed IPs, restrict the key to those IPs only * **Monitor usage** — Check the API usage logs in the Dashboard for unexpected patterns * **Use `sk_test_` for development** — Test keys isolate your dev environment from production * **Revoke compromised keys immediately** — Go to Dashboard > Admin > API Keys > Revoke ### Key rotation example ```bash theme={null} # 1. Create new key in Dashboard → copy both values: # - SALESOS_API_KEY=sk_live_NEW_KEY # - SALESOS_API_SECRET=NEW_SECRET # 2. Update both env vars in your deployment. # 3. Verify it works using the signed request helper from the Quick Start # (Node, Python, or Bash). Example payload: # { "action": "sync_collaborators", # "collaborators": [{"external_id":"test","name":"Test","email":"test@co.com"}] } # 4. Revoke the old key in Dashboard. ``` *** ## Next Steps > [card] [Default Integration](/api/integrations/default) > > Start sending activities to SalesOS > [card] [API Keys](/api/integrations/api-keys) > > Manage keys programmatically # API Conventions Source: https://docs.play2sell.com/api/conventions The rules every SalesOS API page follows — authentication, error shapes, batching, identity resolution and versioning — so you can learn one contract instead of one per endpoint. # API Conventions Every SalesOS API follows the rules on this page. Read it once and the individual endpoint pages become short: they only tell you what is specific to them. > [!NOTE] > > This page is the contract we hold ourselves to. Where an endpoint departs from it, that endpoint's page says so **explicitly** — a silent exception is a bug, and we want to hear about it. *** ## Base URLs > [tab] Production > > `https://api.play2sell.com` > [tab] Staging > > `https://api-staging.play2sell.com` Every endpoint lives under `/functions/v1/`. There is no `/v1/...` REST surface — if you find a page describing one, it is out of date; please tell us. *** ## Authentication Two schemes, and they are **disjoint** — an endpoint accepts one or the other, never both for the same caller. ### Partner (server-to-server) ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` The signature is an HMAC-SHA256 chain over the method, the path, the timestamp and the SHA-256 of the body. The step-by-step and the `signedRequest` helper are in [Authentication](/api/authentication). * The timestamp is valid for **30 seconds** and cannot be in the future (replay protection) — keep your clock in sync (NTP) and re-sign every attempt * Sign the **raw body bytes**, before any re-serialization * Each key is scoped to a single company; a document from another company answers `found: false` ### Self mode (SSO user token) ``` Authorization: Bearer ``` Used when your app already has the end user signed in. The response covers **only that user**. > [!WARNING] > > Sending a `collaborators` list together with a user token is rejected with `SELF_MODE_NO_COLLABORATORS`. Batch lookups require a partner API key — otherwise any signed-in user could read other people's data by CPF. *** ## Error shapes Requests fail in two different layers, and **they answer differently**. Handle both — this is the single most common integration bug we see. ### Authentication layer Before your request reaches the endpoint's own logic: ```json theme={null} { "error": "Missing Authorization header", "code": "header_missing" } ``` `error` is a **string**. Codes (401): `header_missing`, `header_malformed`, `api_key_not_found` (includes revoked keys), `key_expired`, `signature_invalid`, `timestamp_too_old`, `timestamp_in_future`. Missing scope: `403` `scope_insufficient`, with `missing_scopes`. Full table in [Authentication](/api/authentication). ### Endpoint layer Once authentication passed: ```json theme={null} { "error": { "code": "VALIDATION_ERROR", "message": "Human-readable description", "details": [] } } ``` `error` is an **object**. `details` points at the offending item by `index` when the request carried a list. > [!WARNING] > > **`error` is a string in one case and an object in the other.** Code that assumes `error.code` will read `undefined` on every authentication failure — and code that assumes `error` is a string will print `[object Object]` on validation failures. Branch on the type: > > ```js theme={null} > const code = typeof body.error === "string" ? body.code : body.error?.code; > ``` > > We know this is not ideal. It is documented rather than hidden because the two layers ship separately, and a partner discovering it in production is worse than a partner reading it here. ### Payments The Payments API answers with [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) `problem+json` instead: ```json theme={null} { "type": "https://docs.play2sell.com/errors/unauthorized", "title": "Unauthorized", "status": 401, "detail": "Missing Authorization header", "instance": "099d23e0-5d6e-4882-9208-9e8038419c3c", "code": "unauthorized" } ``` It is a separate service with its own conventions. `instance` is the request id — quote it when opening a ticket. *** ## Status codes | Code | Meaning | What to do | | - | - | - | | `200` | Success. **Includes "found nothing"** | Read the payload — an empty list is a valid answer, not an error | | `400` | The request is malformed or exceeds a limit | Fix the request; retrying unchanged will fail again | | `401` | Key missing, invalid, expired, or signature mismatch | Check the key and clock skew | | `403` | Valid key, missing scope | Ask for the scope on the key | | `405` | Wrong method | Every partner endpoint is `POST` | | `429` | Rate limit reached | Wait the seconds in the `Retry-After` header | | `5xx` | Our fault | Retry with backoff (2s, 4s, 8s) | > [!TIP] > > **Absence is not an error.** No campaign running, nobody checked in, no missions today — all answer `200` with an empty structure. An endpoint that returned `404` for "nothing today" would make your screen say something is broken when the day simply started. *** ## Batching and identity Partner endpoints take a `collaborators` array and answer in **the same order**, one entry per request item. ### Identity resolution Precedence is `user_id` > `cpf` > `email`. When more than one is sent, the first present wins — the others are ignored, not used as a fallback. * **CPF** is accepted in any format; digits are normalized. It must contain exactly 11 digits. * Unknown person answers `"found": false`. That is **not** an error, and it keeps the array aligned with your request. * `"ambiguous": true` appears when more than one person matched — treat it as unresolved. ### Limits Batch limits are per action and stated on each page, because they follow the payload each action produces. As a rule: a status action allows **500**, an action that expands a list per person allows **100 or fewer**. > [!NOTE] > > Shared data — campaign metadata, the tenant's shifts — comes back **once at the top of the response**, not repeated per person. On a 500-person batch that is the difference between a lean response and a multi-megabyte one. *** ## Configuration belongs to the company, never to your code This is the rule that most often breaks integrations months after they ship. Names, labels, counts, thresholds and currencies are **configured per company** and returned in the response. They are not constants. | What you might hardcode | Why it breaks | | - | - | | The currency name | Each company names its own; the API returns the configured label | | Three shifts, at fixed hours | Quantity, labels and hours come from the company's schedule | | A fixed number of daily missions | It varies by day and by role | | Level names and colors | The ladder is configuration, not an enum | > [!WARNING] > > Render what the response gives you. A screen that hardcodes a label works until the day the customer renames it — and then it lies, quietly, with no error anywhere. *** ## Timezones and dates Every "today" is computed in **the company's timezone**, never UTC. The response states which one it used: ```json theme={null} { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-13" } ``` Timestamps are ISO 8601 in UTC. Convert for display using the `timezone` from the same response — not the device's. *** ## Rate limits Configurable per key, defaulting to **1000 requests/hour**. Today the per-key limit is measured but not enforced; once it is, the excess gets `429` `rate_limited` with the `Retry-After` header in seconds. Back off; do not spin. *** ## Versioning Contracts are extended, not broken. We may **add** fields to a response at any time, so parse permissively and ignore what you do not know. New behavior that changes an existing payload ships **opt-in**, behind a request flag (for example `include_day`). Omitting the flag keeps the response you already handle. *** ## Security * Partner APIs are **read-only** unless the page says otherwise — they never redeem, never change balances, never accept terms * Requests are HMAC-signed and logged for audit; documents and emails are **never written to logs** * Never call these APIs from client-side code: the key would be exposed *** ## Next steps > [card] [Authentication](/api/authentication) > > Create keys and sign requests > [card] [Check-in API](/api/integrations/checkin) > > Duty presence and the day's shift track > [card] [Missions API](/api/integrations/missions) > > Progress, points earned and points available > [card] [Campaigns API](/api/integrations/campaigns) > > Reward catalog and spendable balance # Activities Integration Source: https://docs.play2sell.com/api/integrations/activities Send numbered activities (001-999) from any CRM or external system to SalesOS using the Activities integration and API Keys. # Activities Integration > [!TIP] > > Try signed requests in your browser at the [API Sandbox](https://play2sellsa.github.io/api-sandbox/) — paste your API key and secret, and the playground signs requests automatically. > [!NOTE] > > Examples below show the wire-format `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` header. To compute the signature in your code, use the `signedRequest` helper in [Authentication](/api/authentication). The Activities integration allows you to connect **any CRM or external system** to SalesOS — even if there is no dedicated integration available. You send numbered activities (001-999) via API, and map them to SalesOS missions in the Dashboard. ## How It Works 1. **You get an API Key** from the SalesOS Dashboard (Admin > Integrations > API Keys) 2. **You sync your team** — register collaborators (salespeople) so SalesOS knows who they are 3. **You send activities** numbered 001-999 via a single REST endpoint 4. **Your admin maps** each activity number to a SalesOS mission in the Dashboard 5. **SalesOS processes** the activities as mission completions, awarding points and tracking progress > [!NOTE] > > Activity codes are just numbers (001 through 999). The meaning of each code is defined by your team when mapping them to missions in the Dashboard. For example, "001" could mean "Phone call" and "002" could mean "Meeting scheduled". *** ## Quick Start **1. Get your API Key** Go to **Admin > Integrations > API Keys** in the SalesOS Dashboard. Create a new key with the `default:sync` scope. Copy the key — it will only be shown once. Your key looks like: `sk_live_a1b2c3d4e5f6g7h8i9j0...` **2. Register your sales team** Before sending activities, tell SalesOS who your salespeople are: ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_collaborators", "collaborators": [ { "external_id": "emp-101", "name": "Maria Santos", "email": "maria@yourcompany.com", "team": "Sales Team A", "role": "sales_rep" }, { "external_id": "emp-102", "name": "Joao Silva", "email": "joao@yourcompany.com", "team": "Sales Team A", "role": "sales_rep" }, { "external_id": "emp-103", "name": "Ana Oliveira", "email": "ana@yourcompany.com", "team": "Sales Team B", "role": "team_lead" } ] }' ``` **Response:** ```json theme={null} { "data": { "created": 3, "existing": 0, "errors": [], "total": 3 }, "meta": { "request_id": "a1b2c3d4-...", "timestamp": "2026-03-17T10:00:00.000Z" } } ``` **3. Send activities from your CRM** Now send the activities your salespeople performed today: ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_activities", "activities": [ { "activity_code": "001", "external_id": "crm-evt-10001", "collaborator_email": "maria@yourcompany.com", "data": { "client": "Acme Corp", "duration_min": 12 }, "occurred_at": "2026-03-17T09:15:00Z" }, { "activity_code": "002", "external_id": "crm-evt-10002", "collaborator_email": "joao@yourcompany.com", "data": { "client": "Beta Inc", "type": "video_call" }, "occurred_at": "2026-03-17T10:30:00Z" }, { "activity_code": "001", "external_id": "crm-evt-10003", "collaborator_email": "maria@yourcompany.com", "data": { "client": "Gamma Ltd" }, "occurred_at": "2026-03-17T11:00:00Z" } ] }' ``` **Response:** ```json theme={null} { "data": { "processed": 3, "skipped": 0, "duplicates": 0, "errors": [], "total": 3 }, "meta": { "request_id": "d4e5f6g7-...", "timestamp": "2026-03-17T11:05:00.000Z" } } ``` Maria got 2 activities (two phone calls) and Joao got 1 (a meeting). **4. Map codes to missions in the Dashboard** In the Dashboard, go to **Missions > Configure**. Select **"Activities"** from the CRM dropdown. You will see activities 001 through 999. Map the ones you use: | Activity | Map to Mission | | - | - | | Atividade 001 | Ligacoes Realizadas | | Atividade 002 | Reunioes Agendadas | | Atividade 003 | Propostas Enviadas | Click **Save**. From now on, every activity "001" sent via API will count toward the "Ligacoes Realizadas" mission. *** ## Authentication All requests require an API Key in the `Authorization` header: ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` See the [Authentication page](/api/authentication) for details on creating and managing API Keys. | Property | Details | | - | - | | **Header** | `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | **Scope required** | `default:sync` | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Key format** | `sk_live_` (production) or `sk_test_` (testing) | *** ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > > **Dashboard:** `https://dashboard.play2sell.com` > > **App:** `https://app.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` > > **Dashboard:** `https://dashboard-staging.play2sell.com` > > **App:** `https://app-staging.play2sell.com` *** ## Endpoint Reference **Base URL:** ``` POST https://api.play2sell.com/functions/v1/default-integration ``` The endpoint accepts two actions via the `action` field: `sync_collaborators` and `sync_activities`. *** ### Action: sync\_collaborators Register or update collaborators (salespeople) in SalesOS. Collaborators must exist before you can attribute activities to them. #### Request Schema **action** `string` *required* Must be `"sync_collaborators"` **collaborators** `array` *required* Array of collaborator objects (max 500) **collaborators\[].external\_id** `string` *required* Unique ID in your system (max 255 chars) **collaborators\[].name** `string` *required* Full name (max 255 chars) **collaborators\[].email** `string` *required* Valid email — used to match activities later **collaborators\[].phone** `string` Phone number (any format) **collaborators\[].document** `string` ID document like CPF (max 20 chars) **collaborators\[].team** `string` Team name (max 100 chars) **collaborators\[].role** `string` Role in your org (max 50 chars) **collaborators\[].metadata** `object` Any extra key-value data #### Example: Sync a full team ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_collaborators", "collaborators": [ { "external_id": "emp-101", "name": "Maria Santos", "email": "maria@yourcompany.com", "phone": "+5511999001001", "document": "12345678901", "team": "Equipe Vendas SP", "role": "vendedor", "metadata": { "crm_id": "CRM-2001", "hire_date": "2024-06-15" } }, { "external_id": "emp-102", "name": "Joao Silva", "email": "joao@yourcompany.com", "phone": "+5511999002002", "team": "Equipe Vendas SP", "role": "vendedor" }, { "external_id": "emp-103", "name": "Ana Oliveira", "email": "ana@yourcompany.com", "team": "Equipe Vendas RJ", "role": "gerente", "metadata": { "crm_id": "CRM-2003", "is_manager": true } } ] }' ``` #### Response (200 — Success) ```json theme={null} { "data": { "created": 2, "existing": 1, "errors": [], "total": 3 }, "meta": { "request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "timestamp": "2026-03-17T14:30:00.000Z" } } ``` * `created: 2` — Maria and Joao were new, so they were created * `existing: 1` — Ana already existed (matched by email), so she was updated * `errors: []` — no failures in this batch #### Example: Partial failures in a batch If some collaborators have invalid data, they fail individually without blocking the rest: ```json theme={null} { "data": { "created": 8, "existing": 1, "errors": [ "Collaborator emp-110 (invalid-email): Invalid email format" ], "total": 10 }, "meta": { "request_id": "b2c3d4e5-...", "timestamp": "2026-03-17T14:30:00.000Z" } } ``` > [!TIP] > > **Re-syncing is safe.** You can send the same collaborators multiple times. Existing ones are updated (not duplicated) based on their email. This makes it easy to run a nightly full sync from your CRM. *** ### Action: sync\_activities Send activity events attributed to collaborators. Each activity uses a 3-digit code (001-999) that you map to missions in the Dashboard. #### Request Schema **action** `string` *required* Must be `"sync_activities"` **activities** `array` *required* Array of activity objects (max 1000) **activities\[].activity\_code** `string` *required* 3-digit code: `"001"` through `"999"` **activities\[].external\_id** `string` *required* Unique ID for deduplication (max 255 chars) **activities\[].collaborator\_email** `string` *required* Email of the salesperson who did the activity **activities\[].data** `object` Any additional context (free-form) **activities\[].occurred\_at** `string` When it happened (ISO 8601). Defaults to now. #### Example: Send a day's worth of activities ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_activities", "activities": [ { "activity_code": "001", "external_id": "crm-20260317-001", "collaborator_email": "maria@yourcompany.com", "data": { "client_name": "Acme Corp", "client_phone": "+5511988887777", "duration_minutes": 12, "outcome": "interested" }, "occurred_at": "2026-03-17T09:15:00-03:00" }, { "activity_code": "001", "external_id": "crm-20260317-002", "collaborator_email": "maria@yourcompany.com", "data": { "client_name": "Beta Inc", "duration_minutes": 8, "outcome": "no_answer" }, "occurred_at": "2026-03-17T09:30:00-03:00" }, { "activity_code": "002", "external_id": "crm-20260317-003", "collaborator_email": "joao@yourcompany.com", "data": { "client_name": "Gamma Ltd", "meeting_type": "video_call", "duration_minutes": 45 }, "occurred_at": "2026-03-17T10:00:00-03:00" }, { "activity_code": "003", "external_id": "crm-20260317-004", "collaborator_email": "joao@yourcompany.com", "data": { "client_name": "Gamma Ltd", "proposal_value": 25000.00, "currency": "BRL" }, "occurred_at": "2026-03-17T14:00:00-03:00" }, { "activity_code": "001", "external_id": "crm-20260317-005", "collaborator_email": "ana@yourcompany.com", "data": { "client_name": "Delta SA", "duration_minutes": 20, "outcome": "scheduled_meeting" }, "occurred_at": "2026-03-17T15:30:00-03:00" } ] }' ``` #### Response (200 — Success) ```json theme={null} { "data": { "processed": 5, "skipped": 0, "duplicates": 0, "errors": [], "total": 5 }, "meta": { "request_id": "c3d4e5f6-7890-abcd-ef01-234567890abc", "timestamp": "2026-03-17T16:00:00.000Z" } } ``` #### Response fields explained **processed** `integer` Activities successfully recorded **skipped** `integer` Activities where the collaborator email was not found in SalesOS **duplicates** `integer` Activities with an `external_id` that was already sent before **errors** `array` Array of error messages for items that failed **total** `integer` Total items received in the request #### Example: Mixed results (some skipped, some duplicates) If you re-send the same batch or include unknown emails: ```json theme={null} { "data": { "processed": 2, "skipped": 1, "duplicates": 2, "errors": [], "total": 5 }, "meta": { "request_id": "d4e5f6g7-...", "timestamp": "2026-03-17T16:05:00.000Z" } } ``` * `skipped: 1` — one email was not registered via `sync_collaborators` * `duplicates: 2` — two activities had `external_id` values already in the system *** ## Activity Codes (001-999) Activity codes are abstract identifiers. Their meaning is entirely up to you. **Example mapping for a real estate company:** | Code | CRM Activity | SalesOS Mission | Points | | - | - | - | - | | 001 | Phone call to prospect | Ligacoes Realizadas | 5 pts | | 002 | Meeting (in-person or video) | Reunioes Agendadas | 15 pts | | 003 | Proposal sent | Propostas Enviadas | 20 pts | | 004 | Contract signed | Contratos Fechados | 50 pts | | 005 | Property visit with client | Visitas Realizadas | 25 pts | | 006 | Follow-up email sent | Follow-ups Enviados | 3 pts | | 007 | Lead qualification completed | Leads Qualificados | 10 pts | **Example mapping for a SaaS company:** | Code | CRM Activity | SalesOS Mission | Points | | - | - | - | - | | 001 | Discovery call | Ligacoes de Descoberta | 10 pts | | 002 | Product demo scheduled | Demos Agendadas | 20 pts | | 003 | Trial started | Trials Iniciados | 15 pts | | 004 | Proposal sent | Propostas Enviadas | 25 pts | | 005 | Deal closed | Deals Fechados | 100 pts | > [!TIP] > > You don't need to use all 999 codes. Most teams use 5-20 codes. Start small and add more as needed. *** ## Idempotency The `external_id` field guarantees idempotency. If you send the same activity twice with the same `external_id`, the second request reports it as a duplicate — it is **not** processed again. **First call** — activity is processed: ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_activities", "activities": [{ "activity_code": "001", "external_id": "crm-call-5001", "collaborator_email": "maria@yourcompany.com" }] }' ``` ```json theme={null} { "data": { "processed": 1, "skipped": 0, "duplicates": 0, "errors": [], "total": 1 } } ``` **Second call** (same `external_id`) — safely deduplicated: ```json theme={null} { "data": { "processed": 0, "skipped": 0, "duplicates": 1, "errors": [], "total": 1 } } ``` > [!TIP] > > **Use your CRM's event ID as the `external_id`.** This ensures that even if your sync job runs twice (e.g., after a crash and retry), activities are never double-counted. *** ## Error Handling ### Error Response Format All errors follow a consistent structure: ```json theme={null} { "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": [] } } ``` ### Error Codes Reference > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, missing fields, or bad activity code. Fix the request payload — check the `details` array for field-level specifics. > [accordion] 401 — UNAUTHORIZED > > API key is missing, invalid, or expired. Check your `Authorization` header and verify the key in the Dashboard. Generate a new one if expired. > [accordion] 403 — FORBIDDEN > > API key is valid but lacks the `default:sync` scope. Edit the key in Dashboard and add the required scope. > [accordion] 405 — METHOD\_NOT\_ALLOWED > > Used GET, PUT, etc. instead of POST. Change to `POST`. > [accordion] 429 — RATE\_LIMITED > > Too many requests this hour. Wait `retry_after` seconds, then retry. Consider reducing your sync frequency. > [accordion] 500 — SERVER\_ERROR > > Internal server error. Retry with exponential backoff (2s, 4s, 8s). Contact support if persistent. ### Example: Validation error with details ```bash theme={null} # Sending an invalid activity_code and a bad email curl -X POST https://api.play2sell.com/functions/v1/default-integration \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_activities", "activities": [ { "activity_code": "abc", "external_id": "e1", "collaborator_email": "maria@co.com" }, { "activity_code": "001", "external_id": "e2", "collaborator_email": "not-an-email" }, { "activity_code": "001", "external_id": "e3", "collaborator_email": "joao@co.com" } ] }' ``` **Response (400):** ```json theme={null} { "error": { "code": "VALIDATION_ERROR", "message": "Invalid activities payload", "details": [ { "index": 0, "field": "activity_code", "message": "Required 3-digit string (001-999), e.g. \"001\"" }, { "index": 1, "field": "collaborator_email", "message": "Required valid email" } ] } } ``` The `index` field tells you which item in the array has the problem. Item at index 2 (joao) was valid — only the invalid items are listed. ### Example: Rate limit exceeded ```json theme={null} { "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded", "retry_after": 1847 } } ``` Wait 1847 seconds (\~31 minutes) before retrying. The rate limit resets every hour. ### Example: Invalid API key ```json theme={null} { "error": { "code": "UNAUTHORIZED", "message": "Invalid or expired API key" } } ``` *** ## Complete Code Examples ```bash cURL theme={null} # Step 1: Set your credentials (see /api/authentication for the signing helper) export SALESOS_API_KEY="sk_live_YOUR_API_KEY" export SALESOS_API_SECRET="YOUR_API_KEY_SECRET" export SALESOS_URL="https://api.play2sell.com/functions/v1/default-integration" # Step 2: Register your team (run once, or nightly to keep in sync) curl -s -X POST "$SALESOS_URL" \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_collaborators", "collaborators": [ { "external_id": "emp-101", "name": "Maria Santos", "email": "maria@co.com", "team": "SP" }, { "external_id": "emp-102", "name": "Joao Silva", "email": "joao@co.com", "team": "SP" }, { "external_id": "emp-103", "name": "Ana Oliveira", "email": "ana@co.com", "team": "RJ" } ] }' | jq . # Step 3: Send today's activities curl -s -X POST "$SALESOS_URL" \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "sync_activities", "activities": [ { "activity_code": "001", "external_id": "call-1001", "collaborator_email": "maria@co.com", "data": {"client": "Acme"} }, { "activity_code": "001", "external_id": "call-1002", "collaborator_email": "maria@co.com", "data": {"client": "Beta"} }, { "activity_code": "002", "external_id": "meet-2001", "collaborator_email": "joao@co.com", "data": {"client": "Gamma", "type": "video"} }, { "activity_code": "003", "external_id": "prop-3001", "collaborator_email": "joao@co.com", "data": {"value": 50000} }, { "activity_code": "001", "external_id": "call-1003", "collaborator_email": "ana@co.com", "data": {"client": "Delta"} } ] }' | jq . ``` ```javascript Node.js theme={null} const API_URL = 'https://api.play2sell.com/functions/v1/default-integration'; const API_KEY = process.env.SALESOS_API_KEY; async function callSalesOS(payload, retries = 3) { for (let attempt = 1; attempt <= retries; attempt++) { const response = await fetch(API_URL, { method: 'POST', headers: { // P2S-SIGN-V1 — see signedRequest() in /api/authentication 'Authorization': await signedHeader('POST', '/functions/v1/default-integration', payload), 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }); // Success if (response.ok) { return await response.json(); } const error = await response.json(); // Rate limited — wait and retry if (response.status === 429) { const waitSeconds = error.error?.retry_after || 60; console.log(`Rate limited. Waiting ${waitSeconds}s before retry...`); await new Promise(r => setTimeout(r, waitSeconds * 1000)); continue; } // Server error — retry with backoff if (response.status >= 500) { const backoff = Math.pow(2, attempt) * 1000; console.log(`Server error (${response.status}). Retrying in ${backoff}ms...`); await new Promise(r => setTimeout(r, backoff)); continue; } // Client error (400, 401, 403) — don't retry throw new Error(`SalesOS API error ${response.status}: ${error.error?.message}`); } throw new Error('Max retries exceeded'); } // ---- Usage ---- // Sync your team const teamResult = await callSalesOS({ action: 'sync_collaborators', collaborators: [ { external_id: 'emp-101', name: 'Maria Santos', email: 'maria@co.com', team: 'SP' }, { external_id: 'emp-102', name: 'Joao Silva', email: 'joao@co.com', team: 'SP' }, ], }); console.log(`Team sync: ${teamResult.data.created} created, ${teamResult.data.existing} existing`); // Send activities in batches of 1000 const allActivities = getActivitiesFromYourCRM(); // your function for (let i = 0; i < allActivities.length; i += 1000) { const batch = allActivities.slice(i, i + 1000); const result = await callSalesOS({ action: 'sync_activities', activities: batch.map(a => ({ activity_code: a.type_code, // "001", "002", etc. external_id: a.crm_event_id, // unique ID from your CRM collaborator_email: a.agent_email, data: { client: a.client_name, notes: a.notes }, occurred_at: a.timestamp, })), }); console.log(`Batch ${i/1000 + 1}: ${result.data.processed} processed, ${result.data.duplicates} duplicates`); } ``` ```python Python theme={null} import requests import os import logging from datetime import datetime, timedelta import time logging.basicConfig(level=logging.INFO) logger = logging.getLogger('salesos_sync') API_URL = 'https://api.play2sell.com/functions/v1/default-integration' API_KEY = os.environ['SALESOS_API_KEY'] HEADERS = { 'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json', } def call_salesos(payload: dict, max_retries: int = 3) -> dict: """Call SalesOS API with retry logic for rate limits and server errors.""" for attempt in range(1, max_retries + 1): response = requests.post(API_URL, json=payload, headers=HEADERS) if response.ok: return response.json() error = response.json() error_code = error.get('error', {}).get('code', 'UNKNOWN') if response.status_code == 429: wait = error.get('error', {}).get('retry_after', 60) logger.warning(f'Rate limited. Waiting {wait}s...') time.sleep(wait) continue if response.status_code >= 500: backoff = 2 ** attempt logger.warning(f'Server error ({response.status_code}). Retry in {backoff}s...') time.sleep(backoff) continue raise Exception(f'SalesOS API error {response.status_code}: {error_code} - {error.get("error", {}).get("message")}') raise Exception('Max retries exceeded') def sync_team(collaborators: list[dict]): """Sync collaborators to SalesOS. Safe to run multiple times.""" result = call_salesos({ 'action': 'sync_collaborators', 'collaborators': collaborators, }) data = result['data'] logger.info(f'Team sync: {data["created"]} created, {data["existing"]} existing, {len(data["errors"])} errors') if data['errors']: for err in data['errors']: logger.error(f' - {err}') return data def sync_activities(activities: list[dict]): """Send activities in batches of 1000.""" total_processed = 0 total_duplicates = 0 total_skipped = 0 for i in range(0, len(activities), 1000): batch = activities[i:i+1000] result = call_salesos({ 'action': 'sync_activities', 'activities': batch, }) data = result['data'] total_processed += data['processed'] total_duplicates += data['duplicates'] total_skipped += data['skipped'] logger.info(f'Batch {i//1000 + 1}: {data["processed"]} ok, {data["duplicates"]} dup, {data["skipped"]} skip') logger.info(f'Total: {total_processed} processed, {total_duplicates} duplicates, {total_skipped} skipped') return {'processed': total_processed, 'duplicates': total_duplicates, 'skipped': total_skipped} # ---- Example: nightly sync job ---- if __name__ == '__main__': # 1. Sync team (idempotent) sync_team([ {'external_id': 'emp-101', 'name': 'Maria Santos', 'email': 'maria@co.com', 'team': 'SP'}, {'external_id': 'emp-102', 'name': 'Joao Silva', 'email': 'joao@co.com', 'team': 'SP'}, {'external_id': 'emp-103', 'name': 'Ana Oliveira', 'email': 'ana@co.com', 'team': 'RJ'}, ]) # 2. Sync today's activities from your CRM today = datetime.now().strftime('%Y-%m-%d') crm_events = fetch_crm_events_for_date(today) # your function activities = [{ 'activity_code': evt['type_code'], 'external_id': evt['crm_id'], 'collaborator_email': evt['agent_email'], 'data': {'client': evt['client'], 'notes': evt.get('notes', '')}, 'occurred_at': evt['timestamp'], } for evt in crm_events] sync_activities(activities) ``` ```php PHP theme={null} true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Authorization: ' . p2sSignedHeader('POST', $path, $body), 'Content-Type: application/json', ], CURLOPT_POSTFIELDS => $body, CURLOPT_TIMEOUT => 30, ]); $response = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $result = json_decode($response, true); if ($httpCode !== 200) { $errorMsg = $result['error']['message'] ?? 'Unknown error'; throw new Exception("SalesOS API error ({$httpCode}): {$errorMsg}"); } return $result; } // Sync a collaborator $result = callSalesOS([ 'action' => 'sync_collaborators', 'collaborators' => [[ 'external_id' => 'wp-user-42', 'name' => 'Carlos Lima', 'email' => 'carlos@company.com', 'team' => 'Inside Sales', ]], ]); echo "Created: {$result['data']['created']}\n"; // Send an activity $result = callSalesOS([ 'action' => 'sync_activities', 'activities' => [[ 'activity_code' => '001', 'external_id' => 'wp-form-' . uniqid(), 'collaborator_email' => 'carlos@company.com', 'data' => ['source' => 'wordpress_form', 'page' => '/contact'], 'occurred_at' => date('c'), ]], ]); echo "Processed: {$result['data']['processed']}\n"; ``` *** ## Best Practices ### Sync Strategy * **Collaborators:** Sync your full team nightly. The API is idempotent — existing users are updated, not duplicated. * **Activities:** Sync every 5-15 minutes, or in real-time via webhooks from your CRM. Always use your CRM's event ID as `external_id`. * **Batch size:** Send up to 1000 activities per request. For large volumes, split into sequential batches. ### Choosing external\_id The `external_id` is your deduplication key. Pick something **stable and unique** from your source system: | Source | Good `external_id` | Bad `external_id` | | - | - | - | | CRM | `crm-event-12345` | `random-uuid-each-time` | | Database | `db-row-id-789` | `timestamp-only` | | Webhook | `webhook-delivery-abc` | `user-email` (not unique) | ### Handling failures * **400 errors:** Fix the data and resend. Check the `details` array for field-level errors. * **429 errors:** Wait `retry_after` seconds, then retry. Consider reducing your sync frequency. * **500 errors:** Retry with exponential backoff (2s, 4s, 8s). Contact support if it persists. * **Network errors:** Retry safely — idempotency via `external_id` prevents duplicates. *** ## Rate Limits Each API key has a configurable rate limit (default: 1000 requests per hour). The counter resets every hour. | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per request | 500 | | Max activities per request | 1000 | | Timeout per request | 120 seconds | *** ## Security * API keys are hashed with bcrypt — never stored in plaintext * Each key is scoped to a single tenant — no cross-tenant access * IP allowlists can be configured per key * All requests are logged for audit purposes * Keys can be revoked instantly from the Dashboard > [!WARNING] > > Never expose your API key in client-side code (JavaScript running in the browser). The API should only be called from your backend server. *** ## Next Steps > [card] [Authentication](/api/authentication) > > Learn how to create and manage API Keys > [card] [Support](mailto:suporte@play2sell.com) > > Need help? Contact our support team # API Keys Source: https://docs.play2sell.com/api/integrations/api-keys Create and manage API keys from the SalesOS Dashboard. # API Key Management > [!TIP] > > Once you have a key, try signed requests in your browser at the [API Sandbox](https://play2sellsa.github.io/api-sandbox/) — paste the API key and secret, and the playground signs requests automatically. API keys let your integrations authenticate with SalesOS using the [P2S-SIGN-V1](/api/authentication) signed-request scheme. Keys are created and managed exclusively through the SalesOS Dashboard. > [!NOTE] > > API key management requires the **admin.integrations** capability. Tenant owners and admins have this by default. *** ## Create a key **1. Open the Dashboard** Go to [dashboard.play2sell.com](https://dashboard.play2sell.com) (or [staging](https://dashboard-staging.play2sell.com)) and log in with your admin account. **2. Navigate to API Keys** Go to **Integrations > API Keys** in the sidebar menu. **3. Create a new key** Click **Create API Key** and fill in: * **Name** — A descriptive name (e.g., "CRM Nightly Sync", "Website Forms") * **Scope** — Tick what the integration will call. For a super-app home screen: `checkin:read`, `missions:read`, `campaigns:read`, `progress:read` and `earnings:read`. For the standard integration: `default:sync` * **Rate limit** — Requests per hour (default: 1,000) * **Expiration** — Optional expiry date **4. Copy both values** After creation, the Dashboard displays **two values, only once**: * **API Key** — the public identifier, e.g. `sk_live_a1b2c3d4...`. Sent in the `Authorization` header on every signed request. * **API Key Secret** — used to compute the request signature. Never sent over the wire. Copy both immediately and store them securely (environment variables, secrets manager). > [!WARNING] > > The **API Key Secret** is shown **only once** at creation time. If you lose it, revoke the key and create a new one — there is no way to recover the secret. *** ## Manage existing keys The same **Integrations > API Keys** screen lets you: * **View** all active, revoked, and expired keys (the secret is never displayed again) * **Revoke** a key — immediately stops it from working, preserving audit history * **Delete** a key — permanently removes it (prefer revoking) * **Monitor usage** — see request count and last-used date *** ## Available scopes A scope only does something if an endpoint requires it. The **Endpoint** column says which — a scope no endpoint requires grants nothing today. | Scope | Endpoint that requires it | Grants access to | | - | - | - | | `default:sync` | `default-integration` | The `sync_collaborators` and `sync_activities` actions | | `checkin:read` | `checkin-partner-api` | [Duty presence](/api/integrations/checkin) and the day's shift track | | `missions:read` | `missions-partner-api` | [Missions](/api/integrations/missions), progress and points | | `campaigns:read` | `campaigns-partner-api` | [Campaigns](/api/integrations/campaigns), catalog and balance | | `progress:read` | `progress-partner-api` | [Level, XP, coins and ranking](/api/integrations/progress) | | `earnings:read` | `earnings-partner-api` | [Paid, in transit and receivable](/api/integrations/earnings) | > [!WARNING] > > The scopes `default:sync_collaborators`, `default:sync_activities`, `leads:read`, `leads:write`, `go:read`, `payments:read` and `payments:write` **appear in the creation list, but no endpoint requires them today**. A key created with only those is accepted at creation and gets **403 on every call**. If you need leads or payments, talk to us before creating the key. > [!WARNING] > > **An empty scope set is not full access — it is access to nothing.** The check compares what the endpoint requires against what the key has: a key with no scopes is missing all of them, and gets `403 scope_insufficient` on every endpoint that requires one. Always tick the scopes your integration will use. > [!TIP] > > **Composing a super-app home screen?** Tick all five at once — `checkin:read`, `missions:read`, `campaigns:read`, `progress:read` and `earnings:read`. There is one consumer, and one key is simpler to revoke than five. > > If you do want to split, the cut that makes sense is giving `earnings:read` its own key: it is the only one that exposes money. *** ## Best practices > [accordion] Use multiple keys for different integrations > > Create separate keys for each integration (CRM sync, website forms, partner API). This way, if one key is compromised, you only need to rotate that one. > [accordion] Set expiration dates > > Keys without expiration live forever. Set an expiry to enforce regular rotation — 90 days is a good default. > [accordion] Use minimal scopes > > Tick only what the integration will use. Leaving it empty does not grant full access — it returns `403` on everything. > [accordion] Monitor usage > > Check the request count and last-used date on the Dashboard list. Keys that haven't been used in months may be candidates for revocation. > [accordion] Rotate keys without downtime > > 1. Create a new key in the Dashboard > 2. Update your integration to use the new key + secret > 3. Verify the new key works > 4. Revoke the old key *** ## Next steps > [card] [Authentication](/api/authentication) > > Learn the P2S-SIGN-V1 signing scheme with code samples > [card] [Activities Integration](/api/integrations/activities) > > Start sending activities with your new key # Campaigns API Source: https://docs.play2sell.com/api/integrations/campaigns Read your company's incentive campaigns from your own backend — reward catalog, collaborator balance and what they already qualify for, built for super-app home screens and partner dashboards. # Campaigns API > [!NOTE] > > Examples below show the wire-format `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` header. To compute the signature in your code, use the `signedRequest` helper in [Authentication](/api/authentication). The Campaigns API lets your backend read your company's **incentive campaigns** in SalesOS — which ones are running, what the reward catalog offers, how much each collaborator has to spend, and how many rewards they already qualify for. It was built for **composing your own screens** before the user ever opens the SalesOS module. It is a **read-only, server-to-server** API: you look collaborators up by CPF or email, in batch, and SalesOS answers with the running campaigns and each person's state in them. > [!NOTE] > > A campaign is **configured by your company**: name, catalog, prices in points, categories, level rules and even the currency name. This API returns whatever is configured — it knows no specific campaign. ## How It Works 1. **You get an API Key** with the `campaigns:read` scope (Admin > Integrations > API Keys) 2. **Your backend asks** for the state of one or many collaborators (by CPF or email) 3. **SalesOS answers** with the running campaigns — campaign data **once**, then each collaborator's state > [!NOTE] > > Campaign metadata comes back **once at the top**, not repeated per person. On a 500-collaborator batch that is the difference between a lean response and a multi-megabyte one. > [!WARNING] > > This endpoint does **not** redeem rewards or accept terms. It is read-only — pair it with the campaign page (`access.url`) for the action itself — see [Opening the campaign page](#opening-the-campaign-page). *** ## Authentication ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` See the [Authentication page](/api/authentication) to create and manage API Keys. | Property | Details | | - | - | | **Header** | `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | **Scope required** | `campaigns:read` | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Key format** | `sk_live_` (production) or `sk_test_` (testing) | *** ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` *** ## Endpoint Reference ``` POST https://api.play2sell.com/functions/v1/campaigns-partner-api ``` Two actions via the `action` field: `campaign_status` and `campaign_catalog`. Each collaborator is identified by **CPF** (any format — digits are normalized) or **email**. When both are sent, CPF wins. *** ### Action: campaign\_status Your company's running campaigns and each collaborator's state in them. #### Request Schema **action** `string` *required* Must be `"campaign_status"` **collaborators** `array` *required* Array of collaborator references (max 500) **collaborators\[].cpf** `string` CPF, any format (`52998224725` or `529.982.247-25`). Must contain exactly 11 digits. **collaborators\[].email** `string` Email — used only when `cpf` is absent **campaign\_slug** `string` Filter to a single campaign. Absent = every running campaign. **locale** `string` Language for the configurable texts. Absent = the campaign's default. #### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/campaigns-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "campaign_status", "collaborators": [{ "cpf": "529.982.247-25" }] }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-12", "campaigns": [ { "id": "aaaaaaaa-0000-0000-0000-000000000001", "slug": "your-campaign", "name": "Your Campaign", "tagline": "Your reward catalog", "status": "active", "default_locale": "pt", "locales": ["pt"], "currency": { "label": "Moedas", "label_singular": "Moeda", "icon": "🪙" }, "access": { "url": "https://app.play2sell.com/campanha", "path": "/campanha", "requires_session": true, "return_param": "next", "login_url": "https://app.play2sell.com/login/sso?connection=your-company-connection&next=%2Fcampanha" }, "catalog": { "rewards": 22, "awarded_only": 2, "categories": 6, "cheapest_points": 200, "priciest_points": 22000 } } ], "collaborators": [ { "cpf": "52998224725", "found": true, "user_id": "8f14e45f-0000-0000-0000-000000000001", "name": "Maria Santos", "membership_status": "active", "balance": { "spendable": 1500, "source": "playcoin", "wallet_enabled": true }, "score": { "xp": 1800, "level": 3, "level_detail": { "order": 3, "key": "level_03", "name": "Avançado", "description": "Você já pegou o ritmo.", "appearance": { "color": "#7B2D8E", "image_url": "https://api.play2sell.com/storage/v1/object/public/level-assets/…/….png", "image_alt": "Avançado" } }, "note": "diverges_from_balance" }, "campaigns": [ { "campaign_id": "aaaaaaaa-0000-0000-0000-000000000001", "slug": "your-campaign", "eligible_rewards": 18, "affordable_rewards": 7, "next_reachable_points": 2000, "redemptions": { "open": 1, "fulfilled": 3 } } ] } ], "total": 1, "found": 1 }, "meta": { "request_id": "1f6c1b2e-0000-4a1b-8c2d-000000000001", "timestamp": "2026-08-12T13:45:00.000Z" } } ``` #### Campaign fields | Field | Meaning | | - | - | | `slug` · `name` · `tagline` | Identification and texts configured by your company | | `currency.label` | **The currency name, as your company configured it.** Render this value — never hardcode a name in your app | | `currency.label_singular` · `currency.icon` | Singular form and icon of the currency, when your company configured them. **Absent** otherwise | | `access.url` | **Where the campaign page opens** in the SalesOS app of this environment — see [Opening the campaign page](#opening-the-campaign-page) | | `access.path` · `access.return_param` | The page path and the name of the return parameter (`next`) of SalesOS entry links | | `access.login_url` | **Link to sign in through your company's identity provider** and land on the campaign page. `null` when sign-in through your provider is not set up in this environment — see [Signing in again through your company's provider](#signing-in-again-through-your-company’s-provider) | | `catalog.rewards` | Rewards that can be **redeemed with balance** | | `catalog.awarded_only` | Rewards that are **granted** (by ranking or trigger) and are not for sale | | `catalog.categories` | Distinct categories in the catalog | | `catalog.cheapest_points` / `priciest_points` | Price range of the catalog | | `terms` | Present only when the campaign requires acceptance, with the current version | > [!NOTE] > > The currency name is resolved in this order: the label configured **on the campaign**, then the currency registered **for your company** (with singular form and icon), then `pontos`. It is the same name the campaign page shows. #### Collaborator fields | Field | Meaning | | - | - | | `balance.spendable` | **The balance available to spend right now** | | `balance.wallet_enabled` | Whether the wallet is enabled for your company — **read this before showing a zero** | | `score.xp` · `score.level` | Score and level. The level is the current rung on the ladder, the **same one the app shows** | | `score.level_detail` | The level as your company configured it: `name`, `description`, and `appearance` (color and badge). **Absent** when the company has no ladder configured | | `score.note` | `diverges_from_balance` when score and balance do not match | | `campaigns[].eligible_rewards` | Rewards they **qualify for**, by the same level rule that unlocks redemption | | `campaigns[].affordable_rewards` | Rewards they **can pay for** with the current balance | | `campaigns[].next_reachable_points` | What the next out-of-reach reward costs — the "X to go" | | `campaigns[].terms_accepted` | Present only when the campaign requires acceptance | | `campaigns[].redemptions` | Open and fulfilled redemptions | > [!WARNING] > > **`spendable: 0` does not mean "no points".** The wallet is enabled per company; until it is, the balance comes back as zero even for people who have a score. Always read `wallet_enabled` before writing "no balance" on the screen — otherwise it states an absence that isn't true. > [!TIP] > > **Qualifying and affording are different counts.** A reward can be unlocked by level and still cost more than the collaborator has. That is why `eligible_rewards` and `affordable_rewards` are separate fields. *** ### Action: campaign\_catalog The same content with the catalog cut. Because the catalog grows per collaborator, the **batch limit drops to 100**. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/campaigns-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "campaign_catalog", "collaborators": [{ "cpf": "529.982.247-25" }], "campaign_slug": "your-campaign" }' ``` *** ## Opening the campaign page Every campaign comes with an `access` block: where its page lives in the SalesOS app and how to get the user there. The page is where the user browses the catalog and redeems rewards, and it **requires a signed-in user**. There are two ways in: | Way | How | | - | - | | **Sign-in and password** | Open `access.url`. A user without a session goes through the SalesOS sign-in and comes back to the page | | **Your company's identity provider** | Open `access.login_url` when it is filled in. The user signs in through your company's provider, with no SalesOS password, and lands on the campaign page | > [!NOTE] > > Read `access.url` and `access.login_url` from the response — do not hardcode them. The URL changes per environment (production and staging have different apps). > [!WARNING] > > The return parameter only accepts a **path inside the SalesOS app**. A full URL, another host or anything else is ignored and the user lands on the home screen. ### Signing in again through your company's provider The full guide to this sign-in (both ways, what to send and the refusals) is in [SSO (Single Sign-On)](/api/integrations/sso). When your company signs users in with its **own identity provider** (OAuth 2.0 / OpenID Connect) and Play2sell connects that provider to SalesOS, the response includes `access.login_url`. Use it as the default link to the campaign page. It covers the case where the user **has to sign in again**: | User's situation | What happens when opening `access.login_url` | | - | - | | Already has a SalesOS session | Opens the campaign page directly | | SalesOS session expired, still signed in to your provider | Goes through your provider without typing anything and comes back to the page | | No session anywhere | Signs in to **your** provider and comes back to the page | ``` https://app.play2sell.com/login/sso?connection=&next=%2Fcampanha ``` A user who came in this way and whose session expires **inside** the app is also sent back through your provider, to the same page, instead of the SalesOS password screen. > [!NOTE] > > Read `access.login_url` from the response — do not build the URL in your code. It changes per environment and is only filled in when the link to your provider is active in that environment. With `null`, use one of the other ways in. > [!NOTE] > > **To turn it on:** your company registers Play2sell as an OAuth 2.0 client in your provider, one client per environment, with the callback address we send (`https://auth.play2sell.com/login/callback` in production). We need the authorization and token endpoints, the client ID and secret (over a secure channel) and each user's **stable identifier**: your provider's internal id, the **CPF or CNPJ**, or the email. With CPF or CNPJ, the user stays the same person in SalesOS even after changing email. > [!WARNING] > > Signing in through your provider does not open the account of someone outside your company: a SalesOS account tied to another company, a Play2sell staff account or an access your manager deactivated is refused with a message that says what to do. *** ## Self mode (SSO user token) With the token of a user who signed in through [SSO](/api/integrations/sso), send `Authorization: Bearer ` and **omit** `collaborators`. The answer covers only the token's own user. > [!WARNING] > > Sending `collaborators` with a user token is rejected with `SELF_MODE_NO_COLLABORATORS`. Batch lookups require a partner API key — otherwise any signed-in user could read other people's balance by CPF. *** ## Error Handling ```json theme={null} { "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": [] } } ``` > [!WARNING] > > **Two shapes, not one.** The block above is the *endpoint* error. Failures in the **authentication layer** answer before the endpoint runs, with `error` as a **string**: > > ```json theme={null} > { "error": "Missing Authorization header", "code": "header_missing" } > ``` > > Code that assumes `error.code` reads `undefined` on every auth failure. Branch on the type — see [API Conventions](/api/conventions#error-shapes). > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, batch over the limit, CPF without 11 digits, an item with neither `cpf` nor `email`, or a malformed `campaign_slug`. The `details` array points to the item `index`. > [accordion] 400 — SELF\_MODE\_NO\_COLLABORATORS > > A `collaborators` list was sent together with a user token. > [accordion] 401 — UNAUTHORIZED > > API key is missing, invalid, or expired, or the signature does not match. > [accordion] 403 — FORBIDDEN > > API key is valid but lacks the `campaigns:read` scope. > [accordion] 405 — METHOD\_NOT\_ALLOWED > > Only `POST` is accepted. > [accordion] 429 — RATE\_LIMITED > > Too many requests this hour. Wait `retry_after` seconds. > [accordion] 500 — SERVER\_ERROR > > Internal server error. Retry with exponential backoff (2s, 4s, 8s). > [!TIP] > > **No running campaign is not an error.** The response comes back with `campaigns: []` and status 200 — the company may simply have nothing live. *** ## Rate Limits | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per `campaign_status` | 500 | | Max collaborators per `campaign_catalog` | 100 | *** ## Security * Read-only: this API never creates redemptions, accepts terms, or changes balances * Each key is scoped to a single company — a CPF from another company answers `found: false`, and other companies' campaigns never appear * Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs > [!WARNING] > > Never expose your API key in client-side code. This API must only be called from your backend server. *** ## Next Steps > [card] [Missions API](/api/integrations/missions) > > The progress that generates the points spent here > [card] [Authentication](/api/authentication) > > How to create and manage API Keys # Check-in API Source: https://docs.play2sell.com/api/integrations/checkin Read your team's SalesOS check-in (duty presence) state and check collaborators in and out from your own backend — built for super-app home screens and partner dashboards. # Check-in API > [!NOTE] > > Examples below show the wire-format `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` header. To compute the signature in your code, use the `signedRequest` helper in [Authentication](/api/authentication). The Check-in API lets your backend read the **duty presence state** of your salespeople in SalesOS — did they check in today, where, on which shift, and until when it is valid. It was built for **composing your own app screens** (for example, a super-app home widget) before the user ever opens the SalesOS module. It is a **server-to-server** API: you look collaborators up by CPF or email, in batch, and SalesOS answers with today's state computed in your company's timezone. With the `checkin:write` scope it can also [check a collaborator in and out](#writing-check-ins). ## How It Works 1. **You get an API Key** with the `checkin:read` scope (Admin > Integrations > API Keys) 2. **Your backend asks** for the check-in state of one or many collaborators (by CPF or email) 3. **SalesOS answers** with today's latest check-in per collaborator — plus optional week/month engagement counts 4. **Optionally, your backend checks people in and out** with a key that also has `checkin:write`, relaying the GPS reading from the collaborator's phone *** ## Authentication All requests require an API Key in the `Authorization` header: ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` See the [Authentication page](/api/authentication) for details on creating and managing API Keys. | Property | Details | | - | - | | **Header** | `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | **Scope required** | `checkin:read` for reading and `checkin_options`; `checkin:write` for `checkin_create` and `checkin_checkout` | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Key format** | `sk_live_` (production) or `sk_test_` (testing) | *** ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` *** ## Endpoint Reference ``` POST https://api.play2sell.com/functions/v1/checkin-partner-api ``` The endpoint accepts these actions via the `action` field: | Action | Scope | What it does | | - | - | - | | `checkin_status` | `checkin:read` | Today's state, in batch | | `checkin_engagement` | `checkin:read` | State plus week/month counts, in batch | | `checkin_options` | `checkin:read` | What one collaborator can do right now | | `checkin_create` | `checkin:write` | Check one collaborator in | | `checkin_checkout` | `checkin:write` | Check one collaborator out | Each collaborator is identified by **CPF** (any format — digits are normalized) or **email**. When both are sent, CPF wins. *** ### Action: checkin\_status Today's latest check-in per collaborator. "Today" is computed in your company's timezone (returned as `timezone` / `reference_date` in the response) — never UTC. #### Request Schema **action** `string` *required* Must be `"checkin_status"` **collaborators** `array` *required* Array of collaborator references (max 500) **collaborators\[].cpf** `string` CPF, any format (`52998224725` or `529.982.247-25`). Must contain exactly 11 digits. **collaborators\[].email** `string` Email — used only when `cpf` is absent #### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "checkin_status", "collaborators": [ { "cpf": "529.982.247-25" }, { "email": "joao@yourcompany.com" } ] }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-07-19", "collaborators": [ { "cpf": "52998224725", "found": true, "user_id": "8f14e45f-...", "name": "Maria Santos", "membership_status": "active", "checked_in_today": true, "on_duty_now": true, "latest_checkin": { "status": "active", "mode": "geo", "shift": "afternoon", "checked_in_at": "2026-07-19T16:03:21+00:00", "shift_expires_at": "2026-07-19T21:00:00+00:00", "location_id": "c81e728d-...", "location_name": "Plantão Morumbi", "location": { "lat": -23.6012, "lng": -46.7003, "accuracy": 14 } }, "org_unit_id": "a87ff679-..." }, { "email": "joao@yourcompany.com", "found": true, "user_id": "45c48cce-...", "name": "Joao Silva", "membership_status": "active", "checked_in_today": false, "on_duty_now": false } ], "total": 2, "found": 2 }, "meta": { "request_id": "a1b2c3d4-...", "timestamp": "2026-07-19T18:00:00.000Z" } } ``` #### Response fields explained **found** `boolean` Whether the CPF/email matched a collaborator **in your company**. An unknown collaborator is `found: false` — it is not an error, and the array keeps the same order as your request. **checked\_in\_today** `boolean` Whether the collaborator has at least one non-rejected check-in today (company timezone). **on\_duty\_now** `boolean` `true` when the latest check-in is active/approved and its shift has not expired — i.e. the collaborator is on duty right now. **latest\_checkin** `object` Today's most recent check-in. Omitted when there is none. `mode` is `geo` (in-person with GPS), `home` (home office) or `offline`. `status` may be `active`, `approved`, `pending` (awaiting leader approval), `expired` (shift ended normally) or `checkout`. `location` has the GPS reading stored with the check-in: `lat`, `lng`, `accuracy` (meters) and, for check-ins made through this API, `captured_at` (when the phone read the GPS). Absent when the check-in had no GPS (home office, checkout). **membership\_status** `string` The collaborator's membership in your company (`active`, `inactive`, ...). A collaborator can be found and inactive. *** ### Day track (`include_day`) Send `"include_day": true` on `checkin_status` to get, beyond the current state, **how the day is going shift by shift** and **when the button unlocks again**. This is what a home screen needs to render the check-in block without opening the SalesOS module. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "checkin_status", "collaborators": [{ "cpf": "52998224725" }], "include_day": true }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-13", "shifts": [ { "key": "morning", "label": "Manha", "start": "09:00", "end": "13:59" }, { "key": "afternoon", "label": "Tarde", "start": "14:00", "end": "18:59" } ], "collaborators": [ { "cpf": "52998224725", "found": true, "day": { "shifts": [ { "key": "morning", "label": "Manha", "start": "09:00", "end": "13:59", "state": "completed", "checked_in_at": "2026-08-13T12:04:00.000Z" }, { "key": "afternoon", "label": "Tarde", "start": "14:00", "end": "18:59", "state": "upcoming" } ], "shifts_source": "tenant_default", "action": { "state": "waiting", "opens_at": "2026-08-13T17:00:00.000Z" } } } ] } } ``` > [!NOTE] > > **Shifts come back once at the top**, not repeated per person. On a 500-collaborator batch that is the difference between a lean response and a multi-megabyte one. #### Fields | Field | Meaning | | - | - | | `shifts[]` (top level) | Your company's **enabled** shifts, ordered by start time | | `shifts[].label` | The shift name **as your company configured it** — render this value | | `day.shifts[].state` | `completed` · `open` · `upcoming` · `missed` | | `day.shifts[].checked_in_at` | When that shift's check-in happened. **Absent** when there was none — test for presence, not for `null` | | `day.action.state` | `available` when a shift is open without a check-in; otherwise `waiting` | | `day.action.opens_at` | When the next shift opens. **Absent** while `state` is `available` (a shift is open now) and once the day is over | | `day.shifts_source` | Which schedule was used: `location` or `tenant_default` | | `day.location_id` | The unit whose schedule was used, when `shifts_source` is `location` | > [!WARNING] > > **A unit can have its own hours, and they win.** The top-level `shifts` array is your company's **default**. When someone checks in at a unit that has its own schedule, `day.shifts` follows that unit and `day.shifts_source` says so. Read the person's track, not the top-level array, when drawing their screen. > > Before the first check-in of the day there is no unit to resolve, so the company default is used. > [!WARNING] > > **The number of shifts belongs to your company — it is not fixed.** It may be two, three, or none, with its own labels and hours. Build the screen from the array; never assume three slots or specific times. > [!TIP] > > **Read `opens_at` together with `state`.** With `state: "available"` it is absent because a shift is open right now. With `state: "waiting"` and no `opens_at`, the day is over and there is no further opening today — the screen must not show a countdown crossing midnight. *** ### Action: checkin\_engagement Everything `checkin_status` returns, plus week/month engagement counts per collaborator. Batches are capped at 100. **action** `string` *required* Must be `"checkin_engagement"` **collaborators** `array` *required* Array of collaborator references (max 100) #### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "checkin_engagement", "collaborators": [{ "cpf": "52998224725" }] }' ``` Each found collaborator gains an `engagement` object: ```json theme={null} { "engagement": { "week": { "checkins": 9, "presence_days": 5 }, "month": { "checkins": 34, "presence_days": 17 }, "all_time": { "checkins": 412, "presence_days": 163, "since": "2026-01-29" } } } ``` * `checkins` — check-ins in the current week/month (company timezone; `expired` counts — it is the normal end of a shift) * `presence_days` — distinct days with at least one check-in * `all_time` — the same since the beginning, with `since`: the day (in the company timezone) of the first check-in. `since` is **absent** when the person never checked in, and the counters are then `0` *** ## Writing check-ins With the `checkin:write` scope, your backend can **check a collaborator in and out** — for example from a "Check in" button on your own home screen. The effect is the same as a check-in made in the SalesOS app: the collaborator enters the lead queue, gets the shift and its end time, earns points, and the `checkin.confirmed` / `checkin.checked_out` [webhooks](/api/integrations/webhooks) fire. > [!WARNING] > > **This API writes.** Unlike the read actions above, `checkin_create` and `checkin_checkout` change who receives leads. They require a key with `checkin:write`; a key with only `checkin:read` answers `403` with `code: "scope_insufficient"`. Write actions handle **one collaborator per request**, sent as `collaborator` (an object, not a list). In a write, "not found" is an error — there is no partial write: | Situation | HTTP | `code` | | - | - | - | | CPF/email not in your company | 404 | `COLLABORATOR_NOT_FOUND` | | Collaborator found but inactive | 409 | `COLLABORATOR_INACTIVE` | | More than one person matched | 409 | `COLLABORATOR_AMBIGUOUS` | ### Action: checkin\_options What your screen can offer **right now**, so it only shows the button that will work. Read-only — requires `checkin:read`. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "checkin_options", "collaborator": { "cpf": "52998224725" }, "location": { "lat": -23.6, "lng": -46.7, "accuracy": 15, "captured_at": "2026-09-21T14:03:00Z" } }' ``` `location` is optional. When sent, `locations` come back sorted by distance and `duty` says whether any is within reach. ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "current_shift": { "key": "afternoon", "label": "Tarde", "ends_at": "2026-09-21T20:59:00.000Z" }, "on_duty_now": false, "modes": [ { "key": "duty", "label": "Com Geolocalização", "requires_geo": true, "available": true }, { "key": "home", "label": "Sem Geolocalização", "requires_geo": false, "available": false, "unavailable_reason": "HOME_SHIFT_NOT_ALLOWED" } ], "locations": [ { "id": "c81e728d-...", "name": "Plantão Morumbi", "distance_meters": 42, "radius_meters": 100, "within_radius": true } ] } } ``` `unavailable_reason` uses the same codes a `checkin_create` would return (`MODE_DISABLED`, `TOO_FAR`, `HOME_OUTSIDE_SHIFT`, `HOME_SHIFT_NOT_ALLOWED`, `PRIOR_GEO_REQUIRED`, `LOCATION_NOT_FOUND`). Mode and shift **labels are your company's configuration** — render them as they come. ### Action: checkin\_create ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 3f2b8c1e-5d4a-4b7e-9f10-2a6c8d9e0f11" \ -d '{ "action": "checkin_create", "collaborator": { "cpf": "52998224725" }, "mode": "duty", "location": { "lat": -23.6, "lng": -46.7, "accuracy": 15, "captured_at": "2026-09-21T14:03:00Z" }, "location_id": "c81e728d-...", "client": { "app": "your-home", "version": "1.0.0" } }' ``` **mode** `string` *required* `duty` (on-site, requires `location`) or `home` (home office). **location** `object` The device's GPS reading, captured on the collaborator's phone and relayed by your backend. Required for `duty`: `lat`, `lng`, `accuracy` (meters) and `captured_at` (ISO 8601 — when the phone read the GPS). **location\_id** `string` The on-site location the collaborator chose. Optional — without it, SalesOS picks the nearest location **within its radius**. **client** `object` Your app and version (`app`, `version`). Stored with the check-in for audit. **Response (201):** ```json theme={null} { "data": { "checkin_id": "5f0c...", "status": "active", "mode": "duty", "on_duty_now": true, "queue_eligible": true, "shift": "afternoon", "shift_label": "Tarde", "shift_expires_at": "2026-09-21T20:59:00.000Z", "checked_in_at": "2026-09-21T14:03:05.000Z", "location_id": "c81e728d-...", "location_name": "Plantão Morumbi", "distance_meters": 42, "location": { "lat": -23.6, "lng": -46.7, "accuracy": 15, "captured_at": "2026-09-21T14:03:00Z" } }, "meta": { "request_id": "a1b2c3d4-...", "timestamp": "2026-09-21T14:03:05.120Z" } } ``` `location` echoes the GPS reading that was stored — same shape as `latest_checkin.location` in `checkin_status`. Absent when no GPS was sent. A new check-in closes the collaborator's previous active one, exactly as in the app. It stays valid until `shift_expires_at` — your app does **not** need to keep pinging. #### Location requirements The GPS reading comes from your backend, so SalesOS checks that it is recent and precise before trusting it: | Rule | Limit | Refusal | | - | - | - | | Freshness | `captured_at` at most **60 s** old (and at most 10 s in the future, for phone clock drift) | `400 STALE_LOCATION` | | Precision | `accuracy` no larger than the chosen location's **radius** (your company can set its own limit) | `422 LOW_ACCURACY` | | Distance | Inside the radius of the chosen location — or of some location, when `location_id` is omitted | `422 TOO_FAR` | > [!TIP] > > Read the GPS **when the user taps the button**, not when the screen opens. A reading taken on screen load is often stale by the time it arrives, and an indoor reading is often imprecise — both are refused, and asking the user to step outside and try again fixes them. A refused check-in writes **nothing**: the collaborator stays exactly as before. ### Action: checkin\_checkout Ends the active check-in before the shift ends. The collaborator leaves the lead queue immediately and `checkin.checked_out` fires. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 7a1c2e3f-0b4d-4e5f-8a6b-9c0d1e2f3a4b" \ -d '{ "action": "checkin_checkout", "collaborator": { "cpf": "52998224725" }, "reason": "user_requested", "client": { "app": "your-home", "version": "1.0.0" } }' ``` **Response (200):** ```json theme={null} { "data": { "status": "checkout", "on_duty_now": false, "already_checked_out": false, "checked_out_at": "2026-09-21T17:10:00.000Z", "previous_checkin_id": "5f0c..." } } ``` With no active check-in, the answer is still `200` with `"already_checked_out": true` and nothing is written — a double tap never breaks your screen. ### Retries and `Idempotency-Key` Send an `Idempotency-Key` header (8–128 characters; a UUID works) on `checkin_create` and `checkin_checkout`. Repeating the request with the same key within **24 hours**: * returns the **same response**, with the header `Idempotency-Replayed: true`, and creates nothing new; * with a different body, answers `409 IDEMPOTENCY_KEY_REUSED`; * while the first request is still running, answers `409 IDEMPOTENCY_IN_PROGRESS` — retry in a few seconds. A refused request (`4xx`) does not consume the key: after fixing the cause (a fresh GPS reading, for example) you can retry with the same key. > [!NOTE] > > The signature timestamp is valid for 30 seconds, so a retry must be **signed again** — the `Idempotency-Key` is what ties the attempts together. ### Messages for the collaborator Write errors carry a `message` in Brazilian Portuguese, written to be shown **directly** to the collaborator (for example: *"Você está a 180 m de Plantão Morumbi. Chegue a até 100 m para fazer o check-in."*). Branch your logic on `code`, never on the text. | HTTP | `code` | When | | - | - | - | | 400 | `VALIDATION_ERROR` | Invalid body; `details` names the field | | 400 | `GEO_REQUIRED` | `duty` without `location` | | 400 | `STALE_LOCATION` | GPS reading older than 60 s | | 404 | `COLLABORATOR_NOT_FOUND` | CPF/email not in your company | | 404 | `LOCATION_NOT_FOUND` | `location_id` unknown or inactive, or no active location | | 409 | `COLLABORATOR_INACTIVE` / `COLLABORATOR_AMBIGUOUS` | See above | | 409 | `IDEMPOTENCY_KEY_REUSED` / `IDEMPOTENCY_IN_PROGRESS` | See retries | | 422 | `TOO_FAR` | Outside the radius; `details` has distance, radius and location | | 422 | `LOW_ACCURACY` | GPS too imprecise; `details` has both values | | 422 | `MODE_DISABLED` | The mode is turned off in your company | | 422 | `HOME_OUTSIDE_SHIFT` / `HOME_SHIFT_NOT_ALLOWED` | Home office outside the shifts your company allows | | 422 | `PRIOR_GEO_REQUIRED` | Your company requires an on-site check-in earlier the same day before home office | | 429 | `RATE_LIMITED` | More than 10 writes for the same collaborator in 10 minutes; see `Retry-After` | | 503 | `PRIOR_GEO_CHECK_UNAVAILABLE` | Temporary failure checking the rule above — retry | *** ## Self mode (SSO user token) If your app already holds the **token of a user who signed in through [SSO](/api/integrations/sso)**, the same endpoint answers for the token's own user, with no API key: ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/checkin-partner-api \ -H "Authorization: Bearer SESSION_JWT" \ -H "Content-Type: application/json" \ -d '{ "action": "checkin_status" }' ``` * Identity comes **only** from the verified token — do **not** send `collaborators`. A request with that field is rejected with `SELF_MODE_NO_COLLABORATORS`: user-level tokens can never look other people up. * The company scope comes from the session; the response has the exact same shape, with a single item in `collaborators`. * `checkin_engagement` works the same way (`{ "action": "checkin_engagement" }`). * Write actions and `checkin_options` are **partner-only**: with a user token they answer `400 SELF_MODE_NOT_SUPPORTED`. Inside the SalesOS app, check-in is done by the app itself. > [!TIP] > > Use self mode for screens rendered **inside** the authenticated app; use the API key (S2S) when your backend composes screens **before** the user has a SalesOS session — like a super-app home widget. *** ## Error Handling All errors follow the shared structure: ```json theme={null} { "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": [] } } ``` > [!WARNING] > > **Two shapes, not one.** The block above is the *endpoint* error. Failures in the **authentication layer** answer before the endpoint runs, with `error` as a **string**: > > ```json theme={null} > { "error": "Missing Authorization header", "code": "header_missing" } > ``` > > Code that assumes `error.code` reads `undefined` on every auth failure. Branch on the type — see [API Conventions](/api/conventions#error-shapes). > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, batch over the limit, CPF without 11 digits, or an item with neither `cpf` nor `email`. The `details` array points to the item `index`. > [accordion] 401 — authentication layer > > API key missing, unknown or expired, or the signature does not match. Answered with `error` as a **string** and codes such as `header_missing`, `api_key_not_found`, `signature_invalid`, `timestamp_too_old`. > [accordion] 403 — scope\_insufficient > > API key is valid but lacks the scope the action needs (`checkin:read`, or `checkin:write` for writes). Answered by the authentication layer: `{ "error": "...", "code": "scope_insufficient", "missing_scopes": ["checkin:write"] }`. > [accordion] 405 — METHOD\_NOT\_ALLOWED > > Only `POST` is accepted. > [accordion] 429 — RATE\_LIMITED > > Too many writes for the same collaborator (10 in 10 minutes). Wait the `Retry-After` seconds, then retry. Write actions have their own error table in [Writing check-ins](#messages-for-the-collaborator). > [accordion] 500 — SERVER\_ERROR > > Internal server error. Retry with exponential backoff (2s, 4s, 8s). > [!TIP] > > **An unknown collaborator is not an error.** The request succeeds with `found: false` for that item, so one bad CPF never breaks a whole home-screen render. *** ## Rate Limits | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per `checkin_status` | 500 | | Max collaborators per `checkin_engagement` | 100 | | Writes per collaborator (`checkin_create` + `checkin_checkout`) | 10 every 10 minutes | *** ## Security * Reading needs `checkin:read`; creating or ending check-ins needs `checkin:write` — issue write keys only to the backend that owns the button * Every check-in created through the API is stored with its origin, the key that created it, your `client` and the raw GPS reading, for audit * Each key is scoped to a single company — a CPF from another company answers `found: false` * Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs > [!WARNING] > > Never expose your API key in client-side code. This API must only be called from your backend server. *** ## Next Steps > [card] [Authentication](/api/authentication) > > Learn how to create and manage API Keys > [card] [Support](mailto:suporte@play2sell.com) > > Need help? Contact our support team # CVCRM Integration — Commission Payments Source: https://docs.play2sell.com/api/integrations/cvcrm How to connect your CVCRM to Play2sell PAY and pay commissions automatically — credentials, webhooks, payment method, receipt, lifecycle, testing, FAQ, and troubleshooting. Screen-by-screen setup, no coding. The **CVCRM × Commission Payments integration** connects your **CVCRM** to **Play2sell PAY** to issue the sale's boleto to the buyer and **pay commissions automatically** — with the boleto, settlement, deed registration, and receipt reflected back in your CVCRM. Setup is done **screen by screen, with no coding**, and takes about **15 minutes**. ## What you'll set up **1. In CVCRM** Generate an **API token**, create **3 webhooks**, and make sure the commission uses the **Boleto payment method**. **2. In the Play2sell panel** **Connect** the CVCRM (credentials + situation mapping) and **copy the webhook URL**. | Step | What you do | Result | | - | - | - | | **1** | Generate a token in CVCRM | the connection's API credential | | **2** | Connect the CVCRM in the Play2sell panel | integration configured | | **3** | Copy your webhook URL | the address CVCRM uses to notify Play2sell | | **4** | Create 3 webhooks in CVCRM | CVCRM starts notifying each event | | **5** | Test with a sale | confirms the end-to-end flow | > [!NOTE] > > **Prerequisites** > > * **Administrative** access to your CVCRM manager (`yourcompany.cvcrm.com.br/gestor`). > * A dedicated **API user** (CVCRM recommends naming it **"Integração"**, so the history stays attributable). If you'll use the **transfer receipt** (Step 2.4), this user must be a **manager with a panel access password**. > * The **situations** (statuses) you use for **sale**, **deed registration**, and **cancellation/contract termination** already configured in CVCRM. > * **Play2sell PAY** enabled on your account (if unsure, contact support). ## How does the integration work? The **CVCRM is the source of truth** for the sale, the parties, the commission split, and the deed registration. **Play2sell PAY** issues the boleto to the buyer, holds the funds in custody, and distributes the commissions. The two systems stay in sync via **webhooks** (CVCRM signals when something changes) and **write-backs** (Play2sell reports the result back in CVCRM). **1. CVCRM creates the contract** When the sale is registered, CVCRM has the amount, the beneficiaries, the number of installments, and the due dates. **2. Play2sell issues the boleto** Play2sell originates the sale and issues a **boleto (with Pix)** to the buyer. **3. The boleto goes back to CVCRM** The issued boleto is written back to the reservation's **commission** (situation "Programado"). **4. Buyer pays → CVCRM receives settlement** Upon payment confirmation, Play2sell reports the **paid** status back to CVCRM. **5. CVCRM registers the deed → the transfer is released** When the commission's deed is registered, Play2sell releases and distributes the transfer to the beneficiaries. **6. Play2sell pays and attaches the receipt** Transfer via **PIX** to each beneficiary; the **receipt** is attached to the commission in CVCRM. On contract termination, the amount is refunded. > [!NOTE] > > **Safe synchronization.** CVCRM webhooks are **thin** — they carry only an identifier (e.g., `{"idreserva": 123}`). Play2sell uses that signal merely as a trigger and **fetches the full record back** from the CVCRM API, authenticated, before acting. That's why a forged webhook can't inject data. > [!WARNING] > > **Identity is by CPF/CNPJ, never by email.** Buyers and beneficiaries are resolved by **document**. Make sure brokers, the real estate agency, and other beneficiaries have their CPF/CNPJ filled in within CVCRM. ## Step 1 — Get the credentials in CVCRM (email + token) The connection needs three values from your CVCRM: **domain**, **email**, and **token**. **1. Open Usuários Administrativos** In the CVCRM manager, click the gear ⚙ (top-right corner) and go to **Usuários Administrativos** (Administrative Users). **2. Open the integration user's options** Find the integration user in the list and, under **Opções** (Options), choose **Tokens**. ![CVCRM Administrative Users page](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/09-cvcrm-usuarios.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=52da52556f8d82a578af4adc3efcff43) CVCRM manager → Usuários Administrativos → user list **3. Generate and copy the token** Fill in the **Descrição** (Description, e.g., `Play2sell`), choose the **Validade do Token** (token expiry), and click **Gerar token** (Generate token). The token appears in the **Listagem de Tokens** (token list) — under **Ações → Copiar Token** (Actions → Copy Token), copy it. ![Generating and copying the token in CVCRM (Ações → Copiar Token)](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/10-cvcrm-token.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=d722dfbaad33d15838e2bfd866a31fa7) Tokens screen — generate and, under Ações → Copiar Token, copy **4. Note the email and domain** * **Email:** the administrative user's email (must belong to the same CVCRM domain). * **Domain:** your account's subdomain — the part **before** `.cvcrm.com.br` (e.g., in `yourcompany.cvcrm.com.br`, the domain is `yourcompany`). > [!TIP] > > You have **domain**, **email**, and **token** in hand — the three values for Step 2. > [!NOTE] > > The **token is sensitive** — treat it like a password. To rotate it later, generate a new one in CVCRM and update the connection in the Play2sell panel. ## Step 2 — Connect in the Play2sell panel In the Play2sell panel, go to **Integrações → Conectores** (Integrations → Connectors), find **CVCRM**, and click **Conectar** (Connect). ![CVCRM connector card](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/01-conectores.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=32092647dee9db29cb24f393f7f89606) Integrações → Conectores → CVCRM The form has five blocks. Fill in each one as described below. ![Connect CRM/ERP form: credentials, situation mapping, exit situation, and transfer receipt](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/02-conectar-modal.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=55be8ae29645a865c7c64eb727d0516f) “Conectar CRM/ERP” modal — complete form ### 2.1 — Credentials Fill in the three values from Step 1: | Field | What to enter | | - | - | | **Domínio** | The subdomain before `.cvcrm.com.br` (e.g., `yourcompany`). | | **E-mail de integração** | The API user's email. | | **Token** | The token generated in CVCRM (stored securely; not shown again afterward). | ### 2.2 — Situation mapping Here you tell Play2sell **which situation in your CVCRM** corresponds to each action. Enter the **name** (or the id) of the situation, **exactly** as it appears in your CVCRM. | Field | When to use | Action it triggers | | - | - | - | | **Vendida** | The **reservation** situation that indicates a confirmed sale. | Originates the sale and issues the boleto. | | **Escriturada** | (Optional) The **reservation** situation when deed registration is recorded on the reservation itself. | Releases the transfer. | | **Distrato** | (Optional) The **reservation** situation for cancellation/contract termination. | Refund. | | **Escriturada (via comissão)** | Use when deed registration in your CVCRM is a **commission** situation (e.g., "Escriturar"), not a reservation one. | Releases the transfer. | | **Cancelada (via comissão)** | (Optional) The **commission** situation that triggers termination/refund. | Refund. | > [!WARNING] > > Use the **exact label** from your instance. Situations are configurable and vary from company to company — "Vendida", "Venda Realizada", "Aprovada", etc. Copy the text as it appears in your CVCRM. > [!TIP] > > Many operations record deed registration **on the commission** (situation "Escriturar"), not on the reservation. In that case, leave **Escriturada** blank and fill in **Escriturada (via comissão)**. ### 2.3 — Exit situation (write-back) The **write-back** is when Play2sell reports the result back in CVCRM. These fields say **which situation your CVCRM should take on** for each event. They are **optional**. | Field | Meaning | Example | | - | - | - | | **Comissão com boleto** | The commission payment situation **when the boleto is issued**. | `Programado` | | **Comissão paga** | The commission payment situation **when it is settled** (paid). | `Pago` | > [!WARNING] > > For the exit situation, always prefer the **name** (e.g., `Programado`, `Pago`) over the id. The payment situation ids vary per instance and may land on misleading values. ### 2.4 — Transfer receipt (optional) Makes Play2sell **attach the payment receipt (PDF)** to the commission in CVCRM when the transfer is paid. It is **optional** and requires a **manager** login in CVCRM. | Field | What to enter | | - | - | | **Tipo do comprovante** | The **file type name** registered in your CVCRM (e.g., `Comprovante_Play2sell`). | | **Senha de gestor** | The **password** of the CVCRM manager user (the same **E-mail de integração**). | > [!WARNING] > > **Credentials the receipt requires.** The attachment uses CVCRM's **v3 API**, which — unlike the rest of the integration (which uses the **token**) — **logs in with email + password** to the manager panel. Therefore: > > * The **E-mail de integração** (Step 2.1) must belong to a **manager user** that signs in to the CVCRM panel **with a password**. > * Enter that **user's password** in the **Senha de gestor** field. > * Access is **renewed automatically** — you don't update anything periodically. If you change the password in CVCRM, update it here too. > [!NOTE] > > The **receipt type must already exist** in your CVCRM, and the **name** here must be **identical** to the one registered there. See how to create it in **Step 4.2**. Without this setup, everything else still works — only the receipt attachment doesn't happen. ### 2.5 — Role mapping (optional) Translate **your CVCRM's commission type** into the beneficiary's role in Play2sell. On the left, the text as it comes from CVCRM (e.g., `Corretor`); on the right, the role: `VENDEDOR`, `IMOBILIARIA`, `HOUSE`, `GERENTE`, `COORDENADOR`, or `PARCEIRO`. Use **"+ Adicionar papel"** (+ Add role) to include as many as you need. Click **Conectar** to save. > [!TIP] > > CVCRM shows as **connected** in the panel and opens the **"CRM conectado"** (CRM connected) screen with your webhook URL. ## Step 3 — Copy the webhook URL When you click **Conectar**, Play2sell **automatically provisions** the receiving endpoint and shows the **"CRM conectado"** screen with your **webhook URL** and a **copy** button. Copy that URL — you'll paste it into CVCRM in the next step. > [!NOTE] > > The URL is **unique to your account**. To retrieve it later, go to **Integrações → Endpoints** — that's where the webhook endpoints are listed. > > ![Endpoints page in the Play2sell panel](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/05-endpoints.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=9464f18e7d1cbb6e2b6be3a86582ffa8) > > Integrações → Endpoints — where the URL is available later > [!TIP] > > You have the **webhook URL** copied — ready to paste into CVCRM. ## Step 4 — Configure CVCRM Here you tell CVCRM to notify Play2sell on each event (4.1) and ensure three supporting settings (4.2, 4.3 and 4.4). ### 4.1 — Create the 3 webhooks In the CVCRM manager, go to **Configurações ⚙ → Integrações** (Settings → Integrations) and open the **Webhooks** card (under "Configurar"). ![CVCRM Integrations hub with the Webhooks card](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/06-cvcrm-integracoes.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=5adadd744cd615258faf06cc969227ae) CVCRM manager → Configurações → Integrações → Webhooks card ![Webhook list in CVCRM](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/07-cvcrm-webhooks-lista.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=870eab633111f90db91847c2fa9a684c) Webhook list in CVCRM You'll create **3 webhooks** — all pointing to the **same URL** (the one from Step 3). What changes in each is the **Funcionalidade** (Feature) and the **trigger situation**: | # | Funcionalidade | Trigger situation (example) | Field in the panel (Step 2.2) | What it triggers | | - | - | - | - | - | | **1** | **Reserva** | sale / send to commission payments | **Vendida** | origination + boleto issuance | | **2** | **Comissão** | escriturar | **Escriturada (via comissão)** | releases the transfer (PIX) | | **3** | **Comissão** | cancellation | **Cancelada (via comissão)** | cancels the unpaid boleto / refunds the paid one | For each one, click **"+ Criar novo Webhook"** (+ Create new Webhook) and fill in the form: | CVCRM field | What to enter | | - | - | | **Nome** | A clear label of your choosing (e.g., `Pagadoria — venda`). | | **Funcionalidade** | **Reserva** (webhook 1) or **Comissão** (webhooks 2 and 3). | | **Workflow** | Appears when the Funcionalidade has more than one situation flow. Under **Comissão** there is more than one workflow — choose the one that **contains the trigger situation** ("Escriturar" / "Cancelada"); if unsure, open the selector and see which workflow the situation appears in. Under **Reserva** there is usually only one. | | **Gatilho** | The **situation** that triggers the send. Use the **exact label** from your instance (the same as in Step 2.2). | | **Forma de envio** | Leave the default. | | **Endereço** | **Paste the webhook URL** copied in Step 3. | | **Ativo no painel** | Leave it **active** — without this, the webhook won't fire. | ![New webhook registration form in CVCRM](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/08-cvcrm-webhook-form.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=3c705dd46567c23c85173cd7938a0d93) Registering a new webhook in CVCRM **1. Webhook 1 — Origination (required)** **Funcionalidade Reserva**, on the situation that marks the sale / the send to commission payments (the same as the **Vendida** field, Step 2.2). Makes Play2sell **originate the sale and issue the boleto**. **2. Webhook 2 — Deed registration → releases the transfer (required)** **Funcionalidade Comissão**, on the situation that indicates deed registration/release — e.g., "Escriturar" (the same as the **Escriturada (via comissão)** field, Step 2.2). **Releases the transfer** and pays the beneficiaries via **PIX**. **3. Webhook 3 — Cancellation / Contract termination (recommended)** **Funcionalidade Comissão**, on the cancellation situation — e.g., "Cancelada" (the same as the **Cancelada (via comissão)** field, Step 2.2). **Cancels** the unpaid boleto or **refunds** the paid one, depending on the state. > [!TIP] > > Link the webhooks to the integration user ("Integração") — that way the changes made by the automation stay attributable in the CVCRM history. > [!NOTE] > > **Variation by instance.** If your CVCRM records deed registration or cancellation on the **reservation itself** (and not on the commission), create webhooks 2 and 3 with **Funcionalidade Reserva** and, in Step 2.2, use the **Escriturada** and **Distrato** fields instead of the "(via comissão)" ones. The behavior is the same. > [!TIP] > > **Confirm the 3 webhooks are firing.** In the webhook list, the **Transações** (Transactions) column counts each send. If it stays at **0** after moving a record to the trigger situation, review: the **Funcionalidade**, the **situation** (it must match Step 2.2), whether the webhook is **Ativo no painel**, and whether the **Endereço** is the exact URL from Step 3 (no spaces). ### 4.2 — Register the receipt type (optional) Do this **only if** you enabled the **Transfer receipt** in Step 2.4. It's a one-time setting that creates the **file type** used to attach the receipt PDF to the commission. In the CVCRM manager, go to **Configurações → Tipos de Arquivos de Pagamento Comissão** (Settings → Commission Payment File Types), click **"+ Criar novo Tipo"** (+ Create new Type), and fill in: | Field | What to enter | | - | - | | **Nome** | The type name (e.g., `Comprovante_Play2sell`). **Use exactly this name** in the "Tipo do comprovante" field from Step 2.4. | | **Ativo no painel** | `Ativo` (Active). | | **Tipo Pessoa** | `Física / Jurídica` (Individual / Company). | | **Obrigatório** | `Não` (No) — Play2sell attaches the receipt automatically. | ![Commission payment file type registration form in CVCRM](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/11-cvcrm-tipo-comprovante.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=ab2c54a028696a8a1fecd263241d4915) CVCRM → Tipos de Arquivos de Pagamento Comissão → Criar novo Tipo ### 4.3 — Ensure "Payment method = Boleto" For the boleto issued by Play2sell to appear as the commission receivable (and settle correctly), the **commission payments in CVCRM** must use the **"Boleto" payment method**. To check: in **Financeiro → Comissões** (Finance → Commissions), open a commission and click the **`$`** icon (Payments). In the **Pagamentos** (Payments) section, each beneficiary installment has a **"Forma de pagamento"** (Payment method) column — it must be set to **Boleto**. > [!WARNING] > > If the installment has another method (e.g., "Transferência bancária"/bank transfer), the boleto we issue **won't match** the commission. Adjust the method to **Boleto** in your CVCRM's commission rule/condition. ![Commission payments in CVCRM with Payment method equal to Boleto](https://mintcdn.com/play2sell/UX439KPh_mD83OMk/images/integrations/cvcrm/12-cvcrm-forma-boleto.png?fit=max\&auto=format\&n=UX439KPh_mD83OMk\&q=85\&s=b10581fd9b164cfb1287d2709d0dde29) Commission → Payments: each installment with Forma de pagamento = Boleto (situation “Programado” after issuance) ### 4.4 — Choose who goes into the boleto ("Enviar para Pagadoria") In the CVCRM commission rule, each commission recipient has the field **Enviar para Pagadoria** (**Sim** or **Não**). It decides who Play2sell charges for and pays. To check: in **Financeiro → Configuração de Comissões → Regras da comissão**, open the recipient's line with **Editar** and look at the **Enviar para Pagadoria** field. | How the rule is set | What Play2sell does | | - | - | | At least one recipient set to **Sim** | Originates the sale. The boleto for each due date is the **sum of the commissions set to Sim**. | | Recipient set to **Não** | Stays **out of the boleto** and is **not paid** by Play2sell at deed registration. You pay this recipient outside Play2sell. | | **All** set to **Não** | No boleto is issued. The reservation shows as **Nada a cobrar** (nothing to charge) in the panel — it is not an error. | **Example.** Total commission of R$ 10,000 with three recipients: the first gets R$ 5,000 (**Sim**), the second R$ 2,000 (**Não**) and the third R$ 3,000 (**Sim**). The buyer's boleto is issued for **R\$ 8,000**, and at deed registration only the first and the third are paid. > [!WARNING] > > **At most 6 recipients set to "Sim" per due date.** The rule may have more recipients than that, as long as no more than 6 are set to **Sim** on each due date. > [!NOTE] > > **Changed the option after the reservation went through?** Editing "Enviar para Pagadoria" in CVCRM **does not notify** Play2sell. After adjusting it, use **Gerar boleto** in the panel — see **How to reprocess a reservation** under Troubleshooting. > [!TIP] > > When the same recipient appears on **more than one line** of the rule (for example, commission and bonus), keep **all of their lines on the same option**. With one line on Sim and another on Não, Play2sell cannot tell which installment to charge and **does not issue the boleto**. ## Step 5 — Test and validate Before operating for real, run an end-to-end test with low amounts. **1. Create a clean test reservation** With a buyer (CPF filled in), a valid amount, and **commissions summing to 100%** for one broker. **2. Move it to the sale situation** This triggers the origination webhook. \[!TIP] The sale appears in the Play2sell panel and the **boleto is attached to the commission** in CVCRM (situation "Programado"). **3. Pay the boleto via Pix** Use the Pix copy-and-paste code (it clears instantly). \[!TIP] The commission changes to **"Pago"** in CVCRM. **4. Register the commission deed** Move the commission to the **Escriturar** situation. \[!TIP] The PIX transfer is paid to the beneficiary and the **receipt** is attached to the commission (if configured in Step 2.4). ## Next steps Once validated, the integration runs on its own. Day to day: * **Each sale** that enters the commission-payments situation generates the boleto and reflects it on the CVCRM commission, with no manual action. * **Track** commission status in **Financeiro → Comissões** (CVCRM) and sales in the **Play2sell panel**. * **To adjust** the situation mapping or the credentials later, go back to **Integrações → Conectores → CVCRM → Editar configuração** (Edit configuration). ## Frequently asked questions > [accordion] Do I need a developer to set this up? > > No. The entire setup is done through screens, in the CVCRM manager and the Play2sell panel. You only need administrative access to both systems. No code is required. > [accordion] Which webhooks does CVCRM need to have? > > Three, all pointing to the **same URL**: (1) **Reserva** on the sale situation → origination; (2) **Comissão** on the "Escriturar" situation → releases the transfer; (3) **Comissão** on the cancellation situation → refund. > [accordion] How is the commission amount calculated? > > CVCRM shows the **gross** commission. Play2sell applies the **service fee** (typically 1–3%) and the beneficiary receives the **net** amount via PIX. The calculation uses the **commission amount**, not the sale amount. > [accordion] Does the integration work with a commission smaller than 100% of the sale? > > Yes. The boleto and the split are calculated on the **commission amount**, so any percentage works. > [accordion] How quickly does the broker get paid? > > After the commission's deed is **registered** in CVCRM, the **PIX** transfer is processed within seconds and lands in the beneficiary's account. > [accordion] Is the transfer receipt mandatory? > > No, it's **optional**. Without it, the transfer is paid normally; only the PDF attachment on the CVCRM commission doesn't happen. ## Troubleshooting > [accordion] No events reach Play2sell > > Check in CVCRM: is the webhook **Ativo** (active)? Do the **Funcionalidade** (Reserva/Comissão) and the trigger **situation** match what you mapped in the panel? Is the **Endereço** the exact URL copied in Step 3 (no spaces/line breaks)? > [accordion] The boleto didn't appear on the commission > > Confirm that the commission's **payment method** is **Boleto** (Step 4.3) and that the exit situation **"Comissão com boleto"** is filled in (e.g., `Programado`). After adjusting the configuration, use **Gerar boleto** in the panel (see **How to reprocess a reservation**, below). > [accordion] The reservation shows "Nada a cobrar" > > Every recipient in the rule was set to **Enviar para Pagadoria = Não** when the reservation arrived, so there was nothing to charge. If it should have been charged, set the right recipients to **Sim** (Step 4.4) and use **Gerar boleto** in the panel. > [accordion] How to reprocess a reservation > > In the Play2sell panel, go to **Integrações → Geral**, find the **Integração CRM/ERP** card and open **Eventos recentes**. **Reservation** rows with status **Falha** or **Nada a cobrar** show the action **Gerar boleto**. > > When you confirm, Play2sell reads the reservation in CVCRM **as it is now** and issues the boleto with the commissions set to **Sim** — even if the reservation has already left the situation that generates the boleto. If the reservation is in a **cancellation** situation, the cancellation prevails. The action is shown to users allowed to **manage payments**. > [accordion] A beneficiary wasn't found / the transfer didn't go out > > Identity is by **CPF/CNPJ**, never by email. Make sure the beneficiary's document is filled in and correct in CVCRM. > [accordion] The paid status didn't reflect immediately > > Payment confirmations and write-backs can take a few moments. If it persists, contact support. ## Reference ### End-to-end lifecycle | Stage | Event in CVCRM | Play2sell action | What you see | | - | - | - | - | | **1. Origination** | Reservation → sale situation | Creates the sale + split and issues the **boleto (with Pix)** | Sale in the panel; boleto generated | | **2. Boleto on the commission** | — (write-back) | Attaches the boleto to the commission | Commission becomes **Programado**; Boleto/Commission-payments ID columns filled in | | **3. Payment / settlement** | Buyer pays the boleto | Confirms the payment and reports it to CVCRM | Commission becomes **Pago** | | **4. Deed registration** | Commission → **Escriturar** situation | Releases the transfer | Protocol released | | **5. Transfer** | — | Pays the beneficiary via **PIX** | Transfer completed (net) | | **6. Receipt** | — (write-back) | Attaches the receipt to the commission | PDF in "Documentos do pagamento da Comissão" | | **Contract termination** | Reservation/Commission → cancellation | Refunds depending on the state | Operation refunded | ### Error contract Error responses follow the `{ code, message, hint? }` format: * **4xx — rejection:** something is incorrect (e.g., an unmapped situation). **Fix it and try again.** * **5xx — transient error:** a temporary failure. It is **reprocessed automatically**. ### Technical appendix > [!NOTE] > > This section is for technical teams. The setup above requires nothing from here. **CVCRM API families** | Family | Use | Note | | - | - | - | | **v1** (`/api/v1//*`) | Current — used by the integration | Auth via `email` + `token` headers; 200 req/min | | **CVIO** (`/api/cvio/*`) | Legacy | **Being deprecated** — CVCRM is standardizing on v1 | | **CVDW** (`/api/v1/cvdw/*`) | BI / data warehouse | **Separately paid contract**; 20 req/min; returns 403 if not contracted | **Synchronization and idempotency** * **Thin webhook → pull-back:** the webhook carries only an id; Play2sell fetches the full record via an authenticated `GET` before acting. * **Idempotency:** each contract maps to a stable key derived from the reservation id (`cvcrm:{idreserva}`); redelivery never duplicates the sale. * **Ordering:** if deed registration arrives before origination completes, it is deferred and reprocessed. **Gotchas** * CVCRM may return **HTTP 200 with `codigo:404` in the body** for non-existent routes — always check the `codigo` field, not just the HTTP status. * Date filters on some endpoints are **ignored** — window on the client side. * Dates in the installments GET use **DD/MM/YYYY**. * There are **two distinct situation workflows** — the **commission** one and the **commission payment** one — with ids that can collide. That's why the situation write-back uses the **name** ("Programado"/"Pago"), not the id. ## Support > [!TIP] > > Need help mapping the situations in your instance? Contact support at **[suporte@play2sell.com](mailto:suporte@play2sell.com)** with your **domain** and the list of situations you use for sale / deed registration / contract termination. # Earnings API Source: https://docs.play2sell.com/api/integrations/earnings Read what each collaborator has been paid, what is on its way and what is still owed — in cents, broken down by type and status. # Earnings API > [!NOTE] > > This page assumes the shared rules in [API Conventions](/api/conventions) — authentication, the two error shapes, batching and identity resolution. It only covers what is specific to earnings. The Earnings API lets your backend read each collaborator's money: **what has already been paid**, **what is on its way**, and **what is still owed**. It was built for the earnings block of a home screen — the one with a total and a privacy toggle. > [!WARNING] > > **This API does not decide what counts as a "commission".** That word means different things at different companies: some call every payout a commission, others separate prizes from commissions strictly. So the response comes **broken down**, and your screen sums whatever your company calls a commission. ## How It Works 1. **You get an API Key** with the `earnings:read` scope 2. **Your backend asks** for one or many collaborators (by CPF or email) 3. **SalesOS answers** with the totals, broken down by payout type and by receivable status *** ## Authentication ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` | Property | Details | | - | - | | **Scope required** | `earnings:read` | | **Method** | `POST` only | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | *** ## Endpoint Reference ``` POST https://api.play2sell.com/functions/v1/earnings-partner-api ``` One action: `earnings_status`. ### Request Schema **action** `string` *required* Must be `"earnings_status"` **collaborators** `array` *required* Array of collaborator references (max 500) ### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/earnings-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "earnings_status", "collaborators": [{ "cpf": "529.982.247-25" }] }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-15", "collaborators": [ { "cpf": "52998224725", "found": true, "user_id": "8f14e45f-0000-0000-0000-000000000001", "name": "Maria Santos", "membership_status": "active", "earnings": { "currency": "BRL", "paid": { "total_cents": 382000, "count": 2, "by_type": { "PRIZE": 380000, "COMMISSION": 2000 } }, "in_transit": { "total_cents": 29000, "count": 1 }, "receivable": { "total_cents": 150000, "count": 2, "by_status": { "A_RECEBER": 100000, "ATRASO": 50000 } }, "last_paid_at": "2026-08-14T12:00:00.000Z" } } ], "total": 1, "found": 1 }, "meta": { "request_id": "1f6c1b2e-0000-4a1b-8c2d-000000000001", "timestamp": "2026-08-15T13:45:00.000Z" } } ``` *** ## Fields | Field | Meaning | | - | - | | `currency` | ISO code for every amount in the block — from the payment itself, or **your company's configured currency** for someone who has not been paid yet | | `paid.total_cents` | Money that has already left — settled payouts | | `paid.by_type` | The same money split by payout type — see below | | `in_transit.total_cents` | Payouts already issued, not settled yet | | `receivable.total_cents` | Earned, not yet turned into a payout | | `receivable.by_status` | The same amount split by stage — see below | | `last_paid_at` | When the most recent settled payout completed | > [!WARNING] > > **Every amount is in cents, as an integer.** Never parse them as decimals: floating-point arithmetic on money is a defect, not a rounding preference. Divide by 100 only at the moment of display. *** ## Payout types `paid.by_type` splits settled money across the three types the system records: | Type | What it is | | - | - | | `COMMISSION` | Commission on a sale | | `PRIZE` | Award — campaign, ranking, incentive | | `BONUS` | Discretionary payment | > [!WARNING] > > **Sum the types your company calls a commission — do not assume.** At one company every payout is called a commission and the whole `total_cents` is the right number. At another, only `COMMISSION` belongs on that line, and showing the total would inflate it by orders of magnitude. > > A type absent from `by_type` means the person has none of it, not zero-by-convention. *** ## Receivable stages `receivable` covers everything still owed. `by_status` splits it by stage: | Status | Meaning | | - | - | | `A_RECEBER` | Computed, waiting to be paid | | `ATRASO` | **Overdue** — owed and past its date | | `A_LIBERAR` | Pending release | | `DISPONIVEL` | Available to be paid out | Two stages never appear here: `PAGO` (already left, counted in `paid`) and `CANCELADO` (will never be paid). > [!WARNING] > > **`ATRASO` is owed money, not an error state.** It is included in `receivable.total_cents` on purpose. Filtering it out would hide, from the person who most needs to see it, money that is late. > [!TIP] > > Cancelled amounts are excluded everywhere. Showing them would promise money that will never arrive. *** ## Error Handling See [API Conventions](/api/conventions#error-shapes) for the two shapes and the status code table. > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, batch over 500, CPF without 11 digits, or an item with neither `cpf` nor `email`. > [accordion] 403 — FORBIDDEN > > API key is valid but lacks the `earnings:read` scope. > [!TIP] > > **Someone who has never been paid is not an error.** The response comes back with zeros and empty breakdowns, at status 200 — and that zero is a measurement: the person exists and has no payments. Different from `found: false`. *** ## Rate Limits | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per request | 500 | *** ## Security * Read-only: this API never creates, approves or changes a payment * Each key is scoped to a single company — money from another company never appears, even for the same person * Amounts and documents are **never written to logs**; only counts are *** ## Next Steps > [card] [Player Progress API](/api/integrations/progress) > > Level, XP, coins and ranking > [card] [Campaigns API](/api/integrations/campaigns) > > The catalog those prizes come from # Missions API Source: https://docs.play2sell.com/api/integrations/missions Read your team's SalesOS mission progress from your own backend — daily objectives, completion counters and the next mission to surface, built for super-app home screens and partner dashboards. # Missions API > [!NOTE] > > Examples below show the wire-format `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` header. To compute the signature in your code, use the `signedRequest` helper in [Authentication](/api/authentication). The Missions API lets your backend read the **gamification mission state** of your salespeople in SalesOS — which objectives are open today, how far along each one is, what was already completed, and which mission to surface next. It was built for **composing your own app screens** (for example, a home widget showing "3 of 6 missions done") before the user ever opens the SalesOS module. It is a **read-only, server-to-server** API: you look collaborators up by CPF or email, in batch, and SalesOS answers with the missions whose period window contains today, computed in your company's timezone. ## How It Works 1. **You get an API Key** with the `missions:read` scope (Admin > Integrations > API Keys) 2. **Your backend asks** for the mission state of one or many collaborators (by CPF or email) 3. **SalesOS answers** with today's missions per collaborator — progress counters, the full list, and the next active mission > [!NOTE] > > Missions are **advanced** by activity inside SalesOS: the engine listens to events (a visit scheduled, a sale closed) and increments the matching mission. This API is for **reading** that state — pair it with a deep link into the SalesOS module for the action itself. > [!WARNING] > > This endpoint never creates missions. If a collaborator's daily missions have not been provisioned yet, the answer is an empty list with `progress.total = 0` — not an error, and not a silent write. *** ## Authentication All requests require an API Key in the `Authorization` header: ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` See the [Authentication page](/api/authentication) for details on creating and managing API Keys. | Property | Details | | - | - | | **Header** | `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | **Scope required** | `missions:read` | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Key format** | `sk_live_` (production) or `sk_test_` (testing) | *** ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` *** ## Endpoint Reference ``` POST https://api.play2sell.com/functions/v1/missions-partner-api ``` The endpoint accepts two actions via the `action` field: `missions_status` and `missions_summary`. Each collaborator is identified by **CPF** (any format — digits are normalized) or **email**. When both are sent, CPF wins. *** ### Action: missions\_status The missions whose period window contains today, per collaborator. "Today" is computed in your company's timezone (returned as `timezone` / `reference_date` in the response) — never UTC. #### Request Schema **action** `string` *required* Must be `"missions_status"` **collaborators** `array` *required* Array of collaborator references (max 500 — 100 when `include_missions` is on) **include\_missions** `boolean` (default: false) Return the full `missions[]` array. Off by default: missions fan out per collaborator, so a large batch with the list on becomes a multi-megabyte response. `progress` and `next_mission` always come back. **collaborators\[].cpf** `string` CPF, any format (`52998224725` or `529.982.247-25`). Must contain exactly 11 digits. **collaborators\[].email** `string` Email — used only when `cpf` is absent #### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/missions-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "missions_status", "collaborators": [ { "cpf": "529.982.247-25" }, { "email": "joao@yourcompany.com" } ] }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-11", "collaborators": [ { "cpf": "52998224725", "found": true, "user_id": "8f14e45f-0000-0000-0000-000000000001", "name": "Maria Santos", "membership_status": "active", "progress": { "total": 6, "completed": 3, "pending_approval": 1, "active": 2, "expired": 0, "points_earned": 90, "points_available": 235, "points_pending_approval": 0 }, "next_mission": { "id": "b1a2c3d4-0000-0000-0000-000000000010", "key": "schedule_visit", "name": "Schedule 1 visit", "description": "Schedule a visit with a lead", "category": "sales", "icon": "calendar", "current_count": 0, "target_count": 1, "points_reward": 35, "nominal_reward": 70, "action": { "route": "/leads", "label": "See leads", "params": null } }, "missions": [ { "id": "b1a2c3d4-0000-0000-0000-000000000009", "key": "call_3_leads", "name": "Call 3 leads", "category": "sales", "period_type": "daily", "period_start": "2026-08-11", "period_end": "2026-08-11", "icon": "phone", "status": "completed", "current_count": 3, "target_count": 3, "points_reward": 30, "nominal_reward": 30, "points_credited_so_far": 30, "points_awarded": 30, "completed_at": "2026-08-11T13:20:04Z", "action": null } ] }, { "email": "joao@yourcompany.com", "found": false } ], "total": 2, "found": 1 }, "meta": { "request_id": "1f6c1b2e-0000-4a1b-8c2d-000000000001", "timestamp": "2026-08-11T13:45:00.000Z" } } ``` #### Response fields explained | Field | Meaning | | - | - | | `timezone` / `reference_date` | Your company's timezone and the local day the answer refers to | | `found` | Whether the CPF/email resolved to a collaborator in your company | | `membership_status` | The collaborator's membership state in your company | | `progress.total` | Missions whose period window contains today | | `progress.completed` | Finished **and** rewarded | | `progress.pending_approval` | Finished by the collaborator, waiting for a manager — points **not yet** credited | | `progress.active` | Still in progress | | `progress.expired` | Period closed without completion | | `progress.points_earned` | Points **actually credited** so far: the full reward of completed missions plus the installments already paid on missions in progress | | `progress.points_available` | What is **still to be won** on active missions — the effective reward minus the installments already credited. Penalty missions (negative reward) are excluded: a penalty is a risk, not something to earn | | `progress.points_pending_approval` | Rewards locked awaiting a manager's approval. Nothing has been credited for these yet | | `next_mission` | The active mission with the lowest display order — the one to surface first. Absent when nothing is active | | `missions[]` | The full list, in the company's configured display order | | `missions[].points_reward` | The **effective** reward — what this collaborator will actually be credited. Scaled by their own target (see below) | | `missions[].nominal_reward` | The reward configured on the mission definition, before scaling. Same field names the `mission.completed` event uses | | `missions[].points_credited_so_far` | How much of this mission's reward has already been paid out through progress | | `missions[].action` | Optional deep link configured for that mission (`route`, `label`, `params`). `null` when none | > [!WARNING] > > **The full list is opt-in.** By default the answer carries `progress` and `next_mission` only — enough to render a home screen. Ask for `include_missions: true` when you need every mission, and expect a tighter batch limit (100 instead of 500), because each collaborator carries several missions. > [!WARNING] > > **Rewards are personalized — always render `points_reward`, never `nominal_reward`.** A mission's target can be adapted per collaborator, and the reward scales with it: someone whose target was halved earns half the points. `points_reward` is what will actually be credited; `nominal_reward` is the number configured on the definition, sent only so you can show a "reduced goal" hint if you want. These are the same field names the `mission.completed` webhook uses, so both channels agree. > [!NOTE] > > **Rewards are paid in installments, so "earned" and "still to win" are different numbers.** A mission worth 100 points with a target of 5 credits 20 on every step. After one step the collaborator has **earned 20** and still has **80 to win** — `points_earned` counts the 20, `points_available` counts the 80. Adding the full 100 to both would count the same points twice. > [!TIP] > > **`pending_approval` is not `completed`.** Some missions require a manager's approval before the points are credited, and the credit happens on the approval date. Reporting them apart lets you render "waiting for approval" without inventing the distinction. > [!WARNING] > > Mission names, categories, icons, rewards, targets and display order are **configured per company**. Never hardcode them in your client — render whatever the response carries, so a change in SalesOS does not require an app release. *** ### Action: missions\_summary Everything `missions_status` returns, plus week/month completion counters. Useful for a "your month so far" strip. Missions are counted in the period they **belong to** (their own window), not the date they were approved — so a mission approved late still counts in the week it was earned. #### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/missions-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "missions_summary", "collaborators": [{ "cpf": "529.982.247-25" }] }' ``` **Response (200) — additional block per collaborator:** ```json theme={null} { "summary": { "week": { "completed": 8, "points": 240 }, "month": { "completed": 31, "points": 980 }, "all_time": { "completed": 287, "points": 8650 } } } ``` > [!NOTE] > > `missions_summary` scans a month of mission rows per collaborator, so its batch limit is **100** instead of 500. `all_time` carries the same since the beginning, under the same rule as week and month: completed and rewarded missions only, deleted ones excluded. *** ## Self mode (SSO user token) When your app already holds the token of a user who signed in through [SSO](/api/integrations/sso), send it as `Authorization: Bearer ` and **omit** `collaborators`. The answer covers only the token's own user. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/missions-partner-api \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "action": "missions_status" }' ``` > [!WARNING] > > Sending `collaborators` together with a user token is rejected with `SELF_MODE_NO_COLLABORATORS`. Batch lookups require a partner API key — otherwise any signed-in user could read other people's progress by CPF. *** ## Error Handling All errors follow the shared structure: ```json theme={null} { "error": { "code": "ERROR_CODE", "message": "Human-readable description", "details": [] } } ``` > [!WARNING] > > **Two shapes, not one.** The block above is the *endpoint* error. Failures in the **authentication layer** answer before the endpoint runs, with `error` as a **string**: > > ```json theme={null} > { "error": "Missing Authorization header", "code": "header_missing" } > ``` > > Code that assumes `error.code` reads `undefined` on every auth failure. Branch on the type — see [API Conventions](/api/conventions#error-shapes). > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, batch over the limit, CPF without 11 digits, or an item with neither `cpf` nor `email`. The `details` array points to the item `index`. > [accordion] 400 — SELF\_MODE\_NO\_COLLABORATORS > > A `collaborators` list was sent with a user token. Omit it, or use a partner API key. > [accordion] 401 — UNAUTHORIZED > > API key is missing, invalid, or expired, or the signature does not match. > [accordion] 403 — FORBIDDEN > > API key is valid but lacks the `missions:read` scope. > [accordion] 405 — METHOD\_NOT\_ALLOWED > > Only `POST` is accepted. > [accordion] 429 — RATE\_LIMITED > > Too many requests this hour. Wait `retry_after` seconds, then retry. > [accordion] 500 — SERVER\_ERROR > > Internal server error. Retry with exponential backoff (2s, 4s, 8s). > [!TIP] > > **An unknown collaborator is not an error.** The request succeeds with `found: false` for that item, so one bad CPF never breaks a whole home-screen render. *** ## Rate Limits | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per `missions_status` | 500 (100 with `include_missions`) | | Max collaborators per `missions_summary` | 100 (50 with `include_missions`) | *** ## Security * Read-only: this API never creates, advances or provisions missions * Each key is scoped to a single company — a CPF from another company answers `found: false` * Requests are HMAC-signed (P2S-SIGN-V1) and logged for audit; documents are never written to logs > [!WARNING] > > Never expose your API key in client-side code. This API must only be called from your backend server. *** ## Next Steps > [card] [Check-in API](/api/integrations/checkin) > > Read duty presence to complete the same home screen > [card] [Authentication](/api/authentication) > > Learn how to create and manage API Keys # Payments Integration Source: https://docs.play2sell.com/api/integrations/payments Issue invoices (charges) and tax documents from any system using the SalesOS Payments API and API Keys. # Payments Integration > [!TIP] > > Try signed requests in your browser at the [API Sandbox](https://play2sellsa.github.io/api-sandbox/) — paste your API key and secret, and the playground signs requests automatically. > [!NOTE] > > Examples below show the wire-format `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` header. To compute the signature in your code, use the `signedRequest` helper in [Authentication](/api/authentication). The Payments integration is a provider-agnostic REST API for the core financial operations every backoffice needs: 1. **Issue an invoice (charge)** — `POST /payments/invoices`. An *Invoice* here is a payment request — a charge collected via PIX, boleto, card, ACH or SEPA depending on region. 2. **Cancel an invoice** — `POST /payments/invoices/{id}/cancel` (voids unpaid charge) — *coming soon*. 3. **Issue a tax document (NFS-e/NF-e/PEPPOL)** — `POST /payments/invoices/{id}/tax-documents`. Optional, region-specific (Brazil today, Europe later). Can also be auto-issued from the Invoice creation call. > [!NOTE] > > **Restricted content.** Payouts to beneficiaries and the account statement are available only to customers under a commercial contract with Play2sell. Their documentation is shared privately after the contract is signed — talk to your account manager or [suporte@play2sell.com](mailto:suporte@play2sell.com). Every transaction carries first-class control fields used by your finance team for reconciliation: `cost_center` and `contractor_reference` you provide on the request; `our_number` is generated by SalesOS and returned in the response. Behind the scenes, SalesOS routes the request to the right provider — you do not pick the provider unless you want to. > [!NOTE] > > **Charge ≠ tax document.** An *Invoice* is the request for payment (boleto, PIX, card). The fiscal document (NFS-e in BR, PEPPOL in EU) is a separate, optional resource attached to the Invoice. This split keeps the API portable across BR / US / EU. > [!NOTE] > > The API follows accepted market conventions: REST resource model, integer minor-unit money, ISO-8601 timestamps, RFC 9457 Problem Details for errors, `Idempotency-Key` header for safe retries, cursor pagination, signed webhooks. If you have integrated with any major payments API you will feel at home. ## Region routing SalesOS picks the right backend automatically from the customer's `country` and `currency`. You do not need to choose. | Customer country | Currency | Status | Methods | | - | - | - | - | | BR | BRL | live | `pix`, `boleto`, `bolepix`, `card` (card-as-PIX) | | US | USD | *coming soon* | `card`, `ach_debit`, `bank_transfer` | | EU member states | EUR / local | *coming soon* | `card`, `sepa_debit`, `bank_transfer` | | Region | Tax document type | Status | | - | - | - | | BR | `nfse` (services) | live | | BR | `nfe` (products) | *coming soon* | | EU | `peppol` (e-invoice) | *coming soon* | | US | n/a | sales tax via Invoice line metadata; no fiscal document | *** ## How It Works 1. **You get an API Key** in the SalesOS Dashboard (Admin > Integrations > API Keys) with the right scopes (`payments:write`, `payments:read`). 2. **You issue invoices** (charges). SalesOS creates the payment request for the customer's region (BR live; US/EU coming soon). You receive a payable artifact: PIX QR-code/copy-paste, boleto barcode, card payment URL or hosted checkout link. 3. **(Optional) A tax document is attached.** When `currency = BRL` and you set `tax_document.auto_issue: true`, SalesOS issues an NFS-e automatically after the charge is confirmed paid. You can also call `POST /invoices/{id}/tax-documents` later to issue or retry. 4. **You listen to webhooks** for terminal events (`invoice.paid`, `invoice.canceled`, `tax_document.issued`, …) instead of polling. *** ## Quick Start **1. Get your API Key** Go to **Admin > Integrations > API Keys** in the SalesOS Dashboard. Create a new key with the scopes `payments:write` and `payments:read`. Copy the key — it will only be shown once. Your key looks like: `sk_live_a1b2c3d4e5f6g7h8i9j0...` **2. Issue your first invoice (BR — PIX charge with auto NFS-e)** Create a PIX charge for a Brazilian customer. The optional `tax_document` block tells SalesOS to issue the NFS-e automatically after the charge is paid. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/payments/invoices \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: inv-2026-04-27-001" \ -H "Content-Type: application/json" \ -d '{ "customer": { "country": "BR", "tax_id": "12345678000190", "name": "Acme Corp Ltda", "email": "billing@acme.com.br" }, "amount": 12345, "currency": "BRL", "description": "Consulting services — April/2026", "payment_method": { "type": "pix", "expires_in_seconds": 3600 }, "tax_document": { "auto_issue": true, "type": "nfse", "service_code": "01.05" }, "cost_center": "CC-OPERATIONS", "contractor_reference": "PO-9981", "metadata": { "campaign": "spring-2026", "owner_user_id": "usr-7782" } }' ``` **Response (201 Created):** ```json theme={null} { "id": "inv_01HW1Z3K8C7G6Y9PQ4M5R2X0NA", "status": "open", "amount": 12345, "currency": "BRL", "region": "br", "payment_method": { "type": "pix", "pix": { "qr_code": "00020126580014br.gov.bcb.pix...", "qr_code_image_url": "https://api.play2sell.com/.../qr.png", "expires_at": "2026-04-27T15:00:00Z" } }, "tax_document": { "id": "txd_01HW1Z3K8C7G6Y9PQ4M5R2X0NX", "type": "nfse", "status": "pending", "auto_issue": true }, "cost_center": "CC-OPERATIONS", "our_number": "INV-2026-000123", "contractor_reference": "PO-9981", "metadata": { "campaign": "spring-2026", "owner_user_id": "usr-7782" }, "created": "2026-04-27T14:00:00Z" } ``` Status flows from `open` → `paid` (on PIX confirmation, \~seconds) → `tax_document.status: issued` (NFS-e emission, seconds to minutes). Listen to webhooks `invoice.paid` and `tax_document.issued` instead of polling. **3. (Optional) Issue an invoice for a US customer (coming soon)** For US/EU customers SalesOS routes the charge to its international backend. This path is queued behind the Play2Sell LLC onboarding — calls today return `501 provider_not_configured`. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/payments/invoices \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: inv-us-2026-04-27-001" \ -H "Content-Type: application/json" \ -d '{ "customer": { "country": "US", "name": "Acme Inc", "email": "billing@acme.com" }, "amount": 12345, "currency": "USD", "description": "Consulting services — April/2026", "payment_method": { "type": "card" }, "cost_center": "CC-OPERATIONS", "contractor_reference": "PO-9981" }' ``` No `tax_document` block — US has no national fiscal document. Sales tax goes inside `metadata` or future `line_items`. **The customer's SSN is not collected** by this endpoint: regular B2C/B2B charges in the US do not require it. *** ## Authentication All requests require an API Key in the `Authorization` header: ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` See the [Authentication page](/api/authentication) for details on creating and managing API Keys. | Property | Details | | - | - | | **Header** | `Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE` | | **Scopes** | `payments:write` (create/cancel), `payments:read` (list/retrieve) | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | | **Key format** | `sk_live_` (production) or `sk_test_` (testing) | *** ## Environments > [tab] Production > > **Base URL:** `https://api.play2sell.com` > > **Dashboard:** `https://dashboard.play2sell.com` > [tab] Staging > > **Base URL:** `https://api-staging.play2sell.com` > > **Dashboard:** `https://dashboard-staging.play2sell.com` *** ## Endpoint Reference Base path: `/functions/v1/payments`. All endpoints accept and return JSON. ### Invoices An *Invoice* is a payment request — a charge that will be collected from your customer via PIX, boleto, card or another method depending on region. The Invoice does **not** include a fiscal document by default; see [Tax Documents](#tax-documents) below. #### `POST /functions/v1/payments/invoices` — create a charge **customer** `object` *required* Customer that will be billed. **customer.country** `string` *required* ISO-3166-1 alpha-2 (`BR`, `US`, `DE`, …). Drives charge-provider routing. **customer.tax\_id** `string` CPF (11 digits) or CNPJ (14 digits) for BR (required when `tax_document` is set). For US/EU charges this field is **not** required — leave it out unless your accounting workflow specifically needs it. SSN/EIN are not collected here for normal charges. **customer.name** `string` *required* Full legal name (max 255 chars). **customer.email** `string` *required* Valid email — used for receipts and (when applicable) fiscal-document delivery. **customer.phone** `string` Optional phone number (max 20 chars). E.164 format recommended (e.g. `+5511999000111`). Used by some providers for AML/KYC matching and transactional notifications. **amount** `integer` *required* Total amount in **minor units** (e.g. `12345` = R\$ 123,45). Must be positive. **currency** `string` *required* ISO-4217 code. Drives charge-provider routing alongside `customer.country`. **description** `string` *required* Human description shown on the payment artifact and (when issued) the fiscal document body (max 1000 chars). > [!NOTE] > > **The `description` field is shown to the payer.** For PIX charges it appears in the payer's bank/wallet app next to the QR code; for boleto it prints on the slip; for fiscal documents it goes into the document body. Pick a value that reads well in all three contexts (e.g. `"Consulting — April/2026"`, not `"INV-2026-000123 internal-billing-row"`). **payment\_method** `object` *required* How the charge will be collected. **payment\_method.type** `string` *required* One of `pix`, `boleto`, `bolepix`, `card` (BR); `card`, `ach_debit`, `bank_transfer` (US — coming soon); `card`, `sepa_debit`, `bank_transfer` (EU — coming soon). **payment\_method.expires\_in\_seconds** `integer` For `pix` / `boleto` / `bolepix`: how long the payment artifact stays valid. Defaults to 3600 (PIX) / 3 days (boleto). **payment\_method.return\_url** `string` For `card`: where to send the customer after card-checkout completion. **tax\_document** `object` Optional. When set, SalesOS will issue a fiscal document automatically after the charge is paid. BR-only today. **tax\_document.auto\_issue** `boolean` When `true`, the fiscal document is issued the moment the charge transitions to `paid`. When `false` (or the field is omitted), use `POST /v1/invoices/{id}/tax-documents` later. **tax\_document.type** `string` `"nfse"` (BR services — live), `"nfe"` (BR products — coming soon), `"peppol"` (EU — coming soon). **tax\_document.service\_code** `string` Municipal service code, required when `type="nfse"` (e.g. `"01.05"` for São Paulo consulting). **cost\_center** `string` Your internal cost center code (max 64 chars). Optional — when omitted, the charge is filed against the tenant's default cost center. Sending a code that is not registered for the tenant returns `422 unknown_cost_center`. See [Common Control Fields](#common-control-fields). **contractor\_reference** `string` External customer/contract reference (max 64 chars). **metadata** `object` Free-form key-value pairs (max 50 keys, value max 500 chars). > [!NOTE] > > `our_number` is **not** part of the request — SalesOS generates it on creation and returns it on the response (format: `INV--`). Store it for reconciliation. #### `GET /functions/v1/payments/invoices/{id}` — retrieve ```bash theme={null} curl -X GET https://api.play2sell.com/functions/v1/payments/invoices/inv_01HW1Z3K8C7G6Y9PQ4M5R2X0NA \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" ``` The response always includes the current `payment_method` artifact (PIX QR, boleto barcode, card checkout URL) and the inline `tax_document` summary when present. #### `GET /functions/v1/payments/invoices` — list Filters: `status` (`open|paid|canceled|failed`), `payment_method.type`, `cost_center`, `our_number`, `contractor_reference`, `created[gte]`, `created[lte]`. Cursor pagination via `limit` (≤ 100), `starting_after`, `ending_before`. ```bash theme={null} curl -X GET "https://api.play2sell.com/functions/v1/payments/invoices?status=paid&cost_center=CC-OPERATIONS&limit=50" \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" ``` #### `POST /functions/v1/payments/invoices/{id}/cancel` — void unpaid charge (*coming soon*) > [!WARNING] > > Canceling an invoice through the API is **not available yet**. Until it is, contact support to void an unpaid charge. > [!NOTE] > > **Refunding a paid charge is not exposed in v1.** If you need to reverse a settled payment, contact support — the team can process it manually. A future version of the API may expose a programmatic refund flow once the use-cases stabilize. *** ### Tax Documents A *TaxDocument* is the fiscal artifact attached to an Invoice — currently NFS-e (BR services). It has its own lifecycle and can be issued, retrieved or canceled independently of the underlying charge. Use this resource when you opted out of `auto_issue` at Invoice creation, when an auto-issue attempt failed and you want to retry, or when you need to cancel only the fiscal document. #### `POST /functions/v1/payments/invoices/{id}/tax-documents` — issue/retry **type** `string` *required* `"nfse"` today. Future: `"nfe"`, `"peppol"`. **service\_code** `string` Required when `type="nfse"`. **metadata** `object` Optional free-form metadata, persisted on the document row. ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/payments/invoices/inv_01HW1Z3K8C7G6Y9PQ4M5R2X0NA/tax-documents \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: txd-2026-04-27-001" \ -H "Content-Type: application/json" \ -d '{ "type": "nfse", "service_code": "01.05" }' ``` **Response (202 Accepted):** ```json theme={null} { "id": "txd_01HW1Z3K8C7G6Y9PQ4M5R2X0NX", "invoice_id": "inv_01HW1Z3K8C7G6Y9PQ4M5R2X0NA", "type": "nfse", "status": "pending", "created": "2026-04-27T14:10:00Z" } ``` Issuance is asynchronous. Listen for `tax_document.issued` (or `tax_document.failed`) webhooks. On success the document carries `document_number`, `xml_url`, `pdf_url` and `issued_at`. #### `GET /functions/v1/payments/invoices/{id}/tax-documents/{doc_id}` — retrieve #### `POST /functions/v1/payments/invoices/{id}/tax-documents/{doc_id}/cancel` — cancel ```bash theme={null} curl -X POST "https://api.play2sell.com/functions/v1/payments/invoices/inv_.../tax-documents/txd_.../cancel" \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: cancel-txd-001" \ -H "Content-Type: application/json" \ -d '{ "reason": "billing_correction" }' ``` Subject to the issuing municipality's cancellation window (typically the day of issuance for NFS-e). A `cancellation_window_expired` error is returned otherwise. *** ## Common Control Fields Every Invoice carries the same control fields. They round-trip on `GET` and are filterable on `LIST`. | Field | Direction | Format | Max | Indexed | Use | | - | - | - | - | - | - | | `cost_center` | input (optional) | string, FK to your cost-centers table | 64 | yes | File every transaction against a budget line. When omitted, falls back to the tenant's default cost center. | | `contractor_reference` | input (optional) | string | 64 | yes | External customer / contract reference (PO, contract id, event id). | | `metadata` | input (optional) | `Record` | 50 keys, value 500 chars | no | Free-form. Use sparingly; not searchable. | | `our_number` | **output only** | string, format `--` | 64 | yes | SalesOS-generated reference returned at creation. Distinct from `id` (ULID for API use). Stable, sequential per resource type per tenant. Use it as the bank-side reconciliation key. | > [!NOTE] > > **Why `our_number` is server-generated.** In Brazilian banking the *cedente* assigns "nosso número" — but in this API SalesOS is the issuance gateway, so we assign the value and hand it back. If you need to carry your own internal id, put it in `contractor_reference` (top-level, indexed) or `metadata.*` (free-form). *** ## Idempotency All `POST` endpoints **require** an `Idempotency-Key` header — a unique string of your choosing (max 255 chars; we recommend a UUIDv4 or a deterministic key derived from your domain). * The first call with a given key processes normally and the response is stored for 24 h. * Replays with the same key and the same body return the **same response**, with a `Idempotent-Replay: true` response header. * Replays with the same key but a **different body** return `409 idempotency_key_reused`. ```bash theme={null} # First call — processes curl -X POST https://api.play2sell.com/functions/v1/payments/invoices \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: inv-2026-04-27-001" \ -H "Content-Type: application/json" \ -d '{ "amount": 12345, "currency": "BRL", "payment_method": { "type": "pix" }, "...": "..." }' # Second call (network retry) — returns same response, no duplicate curl -X POST https://api.play2sell.com/functions/v1/payments/invoices \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: inv-2026-04-27-001" \ -H "Content-Type: application/json" \ -d '{ "amount": 12345, "currency": "BRL", "payment_method": { "type": "pix" }, "...": "..." }' ``` *** ## Money & Currency Amounts are integers in **minor units** to avoid floating-point errors: | Currency | Minor unit | `12345` means | | - | - | - | | `BRL` | centavo | R\$ 123,45 | | `USD` | cent | \$123.45 | | `EUR` | cent | €123.45 | Currencies follow ISO-4217 (3 uppercase letters). Always pair `amount` with `currency`. Reject any payload that mixes scales (e.g. sending decimals). *** ## Error Handling All errors follow [RFC 9457 Problem Details](https://www.rfc-editor.org/rfc/rfc9457): ```json theme={null} { "type": "https://docs.play2sell.com/errors/validation_error", "title": "Invalid request", "status": 422, "detail": "amount must be a positive integer", "instance": "req_01HW1Z3K8C7G6Y9PQ4M5R2X0NA", "code": "validation_error", "errors": [ { "field": "amount", "message": "must be a positive integer" } ] } ``` > [accordion] 400 — bad\_request > > Malformed JSON or missing required headers. Fix the request and resend. > [accordion] 401 — unauthorized > > API key missing, invalid or expired. Check the `Authorization` header. Generate a new key if expired. > [accordion] 403 — insufficient\_scope > > Key is valid but lacks the required scope (`payments:write` or `payments:read`). Edit the key in the Dashboard. > [accordion] 404 — not\_found > > The resource id does not exist or belongs to another tenant. > [accordion] 409 — idempotency\_key\_reused > > Same `Idempotency-Key` used with a different body. Either use a fresh key or send the original body. > [accordion] 422 — validation\_error and related > > The request was understood but cannot be processed. Inspect the `code` field to disambiguate: > > * **`validation_error`** — body validation failed; the `errors[]` array lists field-level problems. Fix the data and resend with a fresh `Idempotency-Key`. > * **`unsupported_region`** — the customer's `country` / `currency` combination is not yet wired (today only `BR` / `BRL` is live). Wait for the region to ship, or charge a customer in a supported one. > * **`unknown_cost_center`** — the `cost_center` code on the request is not registered for your tenant. Create it in **Admin > Integrations > Cost Centers** before resending, or omit the field to fall back to the tenant's default cost center. > * **`merchant_not_provisioned`** — your tenant has no active payment merchant for the resolved cost center. Contact support to finish provisioning before retrying. > [accordion] 429 — rate\_limited > > Too many requests. The `Retry-After` response header tells you how many seconds to wait. > [accordion] 502 — provider\_error > > The downstream backend returned an error. The `detail` field contains a sanitized message. Retry safely with the same `Idempotency-Key`. > [accordion] 500 — server\_error > > Internal error. Retry with exponential backoff (2s, 4s, 8s). Contact support if it persists. *** ## Webhooks Configure a webhook endpoint per environment in **Admin > Integrations > Webhooks**. SalesOS will POST signed JSON for every terminal event: | Event | Resource | Triggered when | | - | - | - | | `invoice.paid` | invoice | Charge confirmed paid by the provider | | `invoice.canceled` | invoice | Unpaid charge voided | | `invoice.failed` | invoice | Charge failed permanently (e.g. card declined, boleto expired) | | `tax_document.issued` | tax\_document | Fiscal document accepted by the municipality | | `tax_document.canceled` | tax\_document | Fiscal document cancellation accepted | | `tax_document.failed` | tax\_document | Issuance failed permanently | Each request includes: * `X-Pay-Event` — event type (e.g. `invoice.paid`). * `X-Pay-Signature` — `t=,v1=`. Verify with the secret you set in the Dashboard. * `X-Pay-Delivery` — unique delivery id, useful for deduplication. Signature verification (Node.js): ```javascript theme={null} import crypto from 'node:crypto'; function verifyWebhook(rawBody, signatureHeader, secret) { const parts = Object.fromEntries( signatureHeader.split(',').map(kv => kv.split('=')), ); const expected = crypto .createHmac('sha256', secret) .update(`${parts.t}.${rawBody}`) .digest('hex'); const ok = crypto.timingSafeEqual( Buffer.from(parts.v1, 'hex'), Buffer.from(expected, 'hex'), ); const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300; // 5 min return ok && fresh; } ``` Sample payload: ```json theme={null} { "id": "evt_01HW1Z9P7B5F2X8KQ4M5R2X0ND", "type": "invoice.paid", "created": "2026-04-27T14:00:45Z", "data": { "id": "inv_01HW1Z3K8C7G6Y9PQ4M5R2X0NA", "status": "paid", "amount": 12345, "currency": "BRL", "cost_center": "CC-OPERATIONS", "our_number": "INV-2026-000123", "contractor_reference": "PO-9981" } } ``` *** ## Complete Code Examples ```bash cURL theme={null} # Set credentials (see /api/authentication for the signing helper) export SALESOS_API_KEY="sk_live_YOUR_API_KEY" export SALESOS_API_SECRET="YOUR_API_KEY_SECRET" export SALESOS_URL="https://api.play2sell.com/functions/v1/payments" # 1. Issue an invoice (BR PIX charge with auto NFS-e) curl -s -X POST "$SALESOS_URL/invoices" \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "customer": { "country": "BR", "tax_id": "12345678000190", "name": "Acme Corp", "email": "billing@acme.com" }, "amount": 12345, "currency": "BRL", "description": "Consulting — April/2026", "payment_method": { "type": "pix", "expires_in_seconds": 3600 }, "tax_document": { "auto_issue": true, "type": "nfse", "service_code": "01.05" }, "cost_center": "CC-OPERATIONS", "contractor_reference": "PO-9981" }' | jq . ``` ```javascript Node.js theme={null} import { randomUUID } from 'node:crypto'; const API_URL = 'https://api.play2sell.com/functions/v1/payments'; const API_KEY = process.env.SALESOS_API_KEY; async function call(path, { method = 'GET', body } = {}) { const headers = { // P2S-SIGN-V1 — see signedRequest() in /api/authentication 'Authorization': await signedHeader(method, path, body), 'Content-Type': 'application/json', }; if (method === 'POST') headers['Idempotency-Key'] = randomUUID(); const res = await fetch(`${API_URL}${path}`, { method, headers, body: body ? JSON.stringify(body) : undefined, }); if (!res.ok) { const problem = await res.json(); throw new Error(`${problem.code}: ${problem.detail || problem.title}`); } return res.json(); } // Issue an invoice (BR PIX charge with auto NFS-e) const invoice = await call('/invoices', { method: 'POST', body: { customer: { country: 'BR', tax_id: '12345678000190', name: 'Acme Corp', email: 'billing@acme.com' }, amount: 12345, currency: 'BRL', description: 'Consulting — April/2026', payment_method: { type: 'pix', expires_in_seconds: 3600 }, tax_document: { auto_issue: true, type: 'nfse', service_code: '01.05' }, cost_center: 'CC-OPERATIONS', contractor_reference: 'PO-9981', }, }); console.log(`Invoice issued: ${invoice.id} (our_number: ${invoice.our_number}, pix qr: ${invoice.payment_method.pix.qr_code})`); ``` ```python Python theme={null} import os import uuid import requests API_URL = 'https://api.play2sell.com/functions/v1/payments' API_KEY = os.environ['SALESOS_API_KEY'] def call(path: str, method: str = 'GET', body: dict | None = None) -> dict: headers = { 'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json', } if method == 'POST': headers['Idempotency-Key'] = str(uuid.uuid4()) r = requests.request(method, f'{API_URL}{path}', json=body, headers=headers, timeout=30) if not r.ok: problem = r.json() raise Exception(f"{problem.get('code')}: {problem.get('detail') or problem.get('title')}") return r.json() # Issue an invoice (BR PIX charge with auto NFS-e) invoice = call('/invoices', 'POST', { 'customer': {'country': 'BR', 'tax_id': '12345678000190', 'name': 'Acme Corp', 'email': 'billing@acme.com'}, 'amount': 12345, 'currency': 'BRL', 'description': 'Consulting — April/2026', 'payment_method': {'type': 'pix', 'expires_in_seconds': 3600}, 'tax_document': {'auto_issue': True, 'type': 'nfse', 'service_code': '01.05'}, 'cost_center': 'CC-OPERATIONS', 'contractor_reference': 'PO-9981', }) print(f"Invoice issued: {invoice['id']} (our_number: {invoice['our_number']})") print(f"PIX QR code: {invoice['payment_method']['pix']['qr_code']}") ``` ```php PHP theme={null} $method, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => $headers, CURLOPT_POSTFIELDS => $bodyStr ?: null, CURLOPT_TIMEOUT => 30, ]); $res = curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); $json = json_decode($res, true); if ($code >= 400) { throw new Exception(($json['code'] ?? 'error') . ': ' . ($json['detail'] ?? $json['title'] ?? 'unknown')); } return $json; } // Issue an invoice (BR PIX charge with auto NFS-e) $invoice = call('/invoices', 'POST', [ 'customer' => ['country' => 'BR', 'tax_id' => '12345678000190', 'name' => 'Acme Corp', 'email' => 'billing@acme.com'], 'amount' => 12345, 'currency' => 'BRL', 'description' => 'Consulting — April/2026', 'payment_method' => ['type' => 'pix', 'expires_in_seconds' => 3600], 'tax_document' => ['auto_issue' => true, 'type' => 'nfse', 'service_code' => '01.05'], 'cost_center' => 'CC-OPERATIONS', 'contractor_reference' => 'PO-9981', ]); echo "Invoice issued: {$invoice['id']} (our_number: {$invoice['our_number']})\n"; echo "PIX QR: {$invoice['payment_method']['pix']['qr_code']}\n"; ``` *** ## Best Practices ### Cost-center hygiene Pick a small, stable set of cost-center codes (≤ 50). Document them in your finance wiki. Reject API calls server-side that reference an unknown code — better to fail loudly than to silently miscategorize. ### Use both keys together for reconciliation * **`our_number` (server-generated)** is your **bank-side key** — printed on the boleto / sent to the provider, present in your bank statement file. * **`contractor_reference` (you provide)** is your **contract-side key** — the PO, vendor agreement id or event id you owe against; present in your ERP. Joining the two at month-end gives you a one-click reconciliation between the bank, the SalesOS Payments API and your ERP. ### Region routing SalesOS auto-routes by `customer.country` and `currency`. You do not need to pick a backend; trust the routing. ### Webhook reliability Treat webhooks as the source of truth for terminal status. Polling works but burns rate-limit budget. Always verify `X-Pay-Signature` and dedupe by `X-Pay-Delivery`. ### Handling failures * **422:** fix the data and resend with a fresh `Idempotency-Key`. * **429:** back off as `Retry-After` says. * **502 (provider\_error):** retry with the **same** `Idempotency-Key` — the original request did not commit, so retrying is safe. * **5xx:** exponential backoff (2s, 4s, 8s). Contact support if it persists. *** ## Rate Limits Each API key has a configurable limit (default: 1000 requests per hour). The counter resets every hour. | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max payload size | 1 MB | | Max list page size | 100 | | Timeout per request | 60 seconds | Rate-limited responses include a `Retry-After` header (seconds). *** ## Security * API keys are hashed with bcrypt — never stored in plaintext. * Each key is scoped to a single tenant — no cross-tenant access. * IP allowlists can be configured per key. * All requests are logged for audit purposes (immutable, 7-year retention). * Keys can be revoked instantly from the Dashboard. > [!WARNING] > > Never expose your API key in client-side code (JavaScript running in the browser, mobile apps, or public repos). The Payments API must be called only from your backend server. *** ## Next Steps > [card] [Authentication](/api/authentication) > > Create and manage API Keys > [card] [Activities Integration](/api/integrations/activities) > > Send CRM activities to SalesOS > [card] [Support](mailto:suporte@play2sell.com) > > Need help? Contact our support team # Player Progress API Source: https://docs.play2sell.com/api/integrations/progress Read level, XP, coins, ranking position and day streak for your collaborators — built for the identity band on a super-app home screen. # Player Progress API > [!NOTE] > > This page assumes the shared rules in [API Conventions](/api/conventions) — authentication, the two error shapes, batching and identity resolution. It only covers what is specific to progress. The Player Progress API lets your backend read where each collaborator stands in your company's gamification: **which level they are on**, **how much XP they have**, **how many coins they can spend**, **their position in the ranking**, and **how many days in a row they have been scoring**. It was built for the band at the top of a home screen — the one that greets the person and shows how they are doing. > [!NOTE] > > The **level ladder is configured by your company**: how many levels, their names, what each one requires, and how each one looks. This API returns whatever is configured — it knows no specific ladder. ## How It Works 1. **You get an API Key** with the `progress:read` scope 2. **Your backend asks** for one or many collaborators (by CPF or email) 3. **SalesOS answers** with the ladder **once at the top**, then each person's state *** ## Authentication ``` Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE ``` | Property | Details | | - | - | | **Scope required** | `progress:read` | | **Method** | `POST` only | | **Rate limit** | Configurable per key (default: 1000 requests/hour) | *** ## Endpoint Reference ``` POST https://api.play2sell.com/functions/v1/progress-partner-api ``` One action: `progress_status`. ### Request Schema **action** `string` *required* Must be `"progress_status"` **collaborators** `array` *required* Array of collaborator references (max 500) **period** `string` Period for XP and ranking: `daily`, `weekly`, `monthly` or `all_time`. Absent = `all_time`. **ranking\_scope** `string` Ranking universe: `tenant` (everyone in the company) or `org_unit` (the person's own unit). Absent = `tenant`. ### Example ```bash theme={null} curl -X POST https://api.play2sell.com/functions/v1/progress-partner-api \ -H "Authorization: P2S-SIGN-V1 API_KEY:TIMESTAMP:SIGNATURE" \ -H "Content-Type: application/json" \ -d '{ "action": "progress_status", "collaborators": [{ "cpf": "529.982.247-25" }], "period": "all_time" }' ``` **Response (200):** ```json theme={null} { "data": { "timezone": "America/Sao_Paulo", "reference_date": "2026-08-14", "period": "all_time", "ranking_scope": "tenant", "levels": [ { "order": 1, "key": "level_01", "name": "Starter", "requirements": [], "appearance": null }, { "order": 2, "key": "level_02", "name": "Advanced", "requirements": [{ "type": "min_xp", "value": 500 }], "appearance": { "color": "#7B2D8E" } } ], "collaborators": [ { "cpf": "52998224725", "found": true, "user_id": "8f14e45f-0000-0000-0000-000000000001", "name": "Maria Santos", "membership_status": "active", "level": { "order": 2, "key": "level_02", "name": "Advanced", "appearance": { "color": "#7B2D8E" }, "requirements": [{ "type": "min_xp", "value": 500, "current": 1200, "remaining": 0, "met": true, "progress_percent": 100 }] }, "next_level": { "order": 3, "key": "level_03", "name": "Legend", "requirements": [{ "type": "min_xp", "value": 2000, "current": 1200, "remaining": 800, "met": false, "progress_percent": 60 }], "appearance": null }, "xp": { "period": "all_time", "current": 1200, "all_time": 1200, "monthly": 300, "daily": 0 }, "coins": { "balance": 640, "source": "playcoin", "label": "Moedas", "label_singular": "Moeda", "icon": "🪙" }, "ranking": { "scope": "tenant", "period": "all_time", "position": 1, "total": 240 }, "streak": { "current": 10, "longest": 14, "today_counts": false, "at_risk": true, "last_active_date": "2026-08-13", "started_date": "2026-08-04", "expires_at": "2026-08-15T03:00:00+00:00", "week_start": "2026-08-09", "week": [ { "date": "2026-08-09", "active": true }, { "date": "2026-08-10", "active": true }, { "date": "2026-08-11", "active": true }, { "date": "2026-08-12", "active": true }, { "date": "2026-08-13", "active": true }, { "date": "2026-08-14", "active": false }, { "date": "2026-08-15", "active": false } ] } } ], "total": 1, "found": 1 }, "meta": { "request_id": "1f6c1b2e-0000-4a1b-8c2d-000000000001", "timestamp": "2026-08-14T13:45:00.000Z" } } ``` *** ## Fields ### The ladder (top level) | Field | Meaning | | - | - | | `levels[]` | Your company's level ladder, ordered from first to last | | `levels[].order` | Position on the ladder — this is what `level.order` refers to | | `levels[].name` | The level name **as your company configured it** | | `levels[].requirements` | What that level demands (e.g. `min_xp`, `min_missions_count`) | | `levels[].appearance` | Visual configuration for the level — see the warning below | | `levels[].description` | The level's text, as your company configured it. `null` until it is configured | > [!WARNING] > > **The number of levels is your company's, not a constant.** Build the screen from the array. A ladder can have nine rungs where another has ten, and both are correct. ### Per collaborator | Field | Meaning | | - | - | | `level` | The level the person is on right now, with its name, description and appearance. It is the **same level the app shows**. Someone who has not moved up yet is on the **first rung** of the ladder | | `level.requirements[]` | The requirements of the current level, with what the person has on each. This is where the total stays visible for someone at the top | | `next_level` | The next rung and what it requires. **Absent** when the person is at the top | | `next_level.requirements[].current` | How much the person **already has** on that requirement, counted all-time | | `next_level.requirements[].remaining` | How much is **left** to meet the requirement. Never negative | | `next_level.requirements[].met` | `true` once the requirement is met | | `next_level.requirements[].progress_percent` | Progress on the requirement from 0 to 100, rounded down and capped at 100. Ready for a progress bar | | `xp.period` | The period you asked for, echoed back | | `xp.current` | XP in that period — the number to show next to the name | | `xp.all_time` · `monthly` · `weekly` · `daily` | The same score in every period. **A period with no measurement is absent, not zero** | | `coins.balance` | Coins available to spend | | `coins.label` · `label_singular` · `icon` | The currency name as your company configured it. **Absent** until it is configured — use your own fallback, and never hardcode a name | | `ranking.scope` | The universe the position was computed in | | `ranking.position` · `total` | Position and how many people are in that universe | | `streak.current` · `longest` | Consecutive days scoring right now, and the person's record. See "Day streak" below | | `streak.today_counts` · `at_risk` | Whether today already counts; whether the streak only lasts until the end of today | | `streak.expires_at` | When the streak ends if nobody scores (UTC) | | `streak.week[]` | The 7 days of the current week, with `active` on each | *** ## How far to the next level Each requirement in `next_level.requirements` carries the rule **and** the person's progress. That is what lets you write "20 sales, 10 to go" without doing the math on your side: ```json theme={null} "next_level": { "order": 7, "key": "estrategico_iii", "name": "Strategic III", "requirements": [ { "type": "min_activities_count", "value": 30, "event_types": ["sale.closed"], "current": 20, "remaining": 10, "met": false, "progress_percent": 66 } ] } ``` | Requirement type | What `current` counts | | - | - | | `min_xp` | The person's all-time XP | | `min_missions_count` | Missions completed, all-time | | `min_activities_count` | Activities of the types listed in `event_types` (for example `sale.closed`, closed sales), all-time | | `missions_completed` | How many of the missions listed in `keys` are already completed. `value` is the size of the list and `missing_keys` carries the ones still missing | * The number is the **same** one SalesOS uses to promote the person: your screen never disagrees with the level. * A level can have **more than one requirement**. The person moves up when all of them are `met: true`. * Requirements are **configured per company**. Build the screen from `type` and `event_types`, and never hardcode "sales" in your client. * A requirement type the API does not measure yet comes with the rule only, **without** `current`. Treat it as "not measured", not as zero. * `level.requirements` carries the same measure for the current level. Someone at the top has no `next_level`, and that is where the total keeps showing. * The level is the person's current rung on the ladder, the same one the app shows, and does not depend on `period`. The counts are **always all-time**. `period` only changes XP and ranking. * The level is re-evaluated when the person's next activity arrives. So, for a brief moment, `next_level` may show `met: true` on everything before the person moves up. * A requirement configured in a way that cannot be measured also comes with the rule only, without `current`. *** ## Level appearance The level's visual identity — its color, and anything else your company configures — comes back in `appearance`. `appearance.image_url` is the level badge, with the **full address** of the environment that answered (`https://api.play2sell.com/storage/...` in production, `https://api-staging.play2sell.com/storage/...` in staging). Use the URL as is. > [!WARNING] > > **`appearance` can be `null`, and null does not mean "no color".** It means nobody has configured one yet. Render your own fallback in that case, but do not hardcode a palette keyed by level name: the day your company renames a level or changes its colors, a hardcoded screen keeps showing the old one, with no error anywhere. > [!TIP] > > Read the color from the response even when it looks constant today. That is the whole reason it travels in the payload instead of living in your app. *** ## Periods XP is stored in four periods, and the screen usually shows one of them. Because "200 XP" on a design does not say which, this API returns **all four** plus the one you asked for. | `period` | Covers | | - | - | | `daily` | Today, in the company's timezone | | `weekly` | The current week | | `monthly` | The current month | | `all_time` | Everything since the person joined | > [!WARNING] > > An unknown period is **rejected with 400**, not answered with zeros. A response full of zeros would make your screen state that the person has no XP — an absence that is not true. > [!WARNING] > > **A period that was never measured comes back absent, not as `0`.** In the example above `weekly` is missing: that person has no weekly score row. `daily: 0` is different — it was measured, and the result was zero. > > Treat the two apart. Writing "0 XP this week" for an absent period tells the person they scored nothing, when the truth is nobody computed that period for them. *** ## Ranking A position only means something alongside its universe, so `scope`, `period` and `total` always travel with it. | `ranking_scope` | Universe | | - | - | | `tenant` | Everyone in the company | | `org_unit` | Only the person's own unit | > [!TIP] > > `total` is how many people the position was measured against. "#12 of 240" reads very differently from "#12 of 13" — show it. *** ## Day streak `streak` tells how many consecutive days the person has been scoring — the "🔥 10 days" on a home screen. It is **the same number as the app's Consistency card**: both reads come from the same rule. **A day counts when the person ends it with a positive points balance.** Any credited point counts (mission, quiz, extra points). A reversed point undoes the day; a day with only penalties does not count. The day is in the **company's time zone** (`timezone`, at the top of the response): a point at 9 PM on Sunday in Brasília counts for Sunday, even though it is already Monday in UTC. | Field | Meaning | | - | - | | `current` | Consecutive days up to today (or up to yesterday, if today has no points yet) | | `longest` | The longest streak the person has ever had | | `today_counts` | `true` when today already counts toward the streak | | `at_risk` | `true` when today has no points yet but yesterday did: the streak lasts until midnight | | `last_active_date` | The last day the person scored. **Absent** if they never scored | | `started_date` | The first day of the current streak. **Absent** when `current` is 0 | | `expires_at` | The instant (UTC) the streak ends if nobody scores — the midnight, in the company's time zone, that closes the day after the last scoring day. **Absent** when `current` is 0 | | `week_start` · `week[]` | The current week, starting on the day your company starts its week, always 7 days | > [!TIP] > > With `at_risk: true`, nudge the person to act: "score today to keep your 10 days". `expires_at` gives the exact deadline — count hours from it, no time-zone math. > [!WARNING] > > **No points today does not reset the streak.** It only drops to 0 after a full day without points. Showing "streak lost" at noon would tell the person they lost something they can still save. > [!NOTE] > > Here zero is a measurement: someone who never scored has `current: 0` and `longest: 0`. A person not found (`found: false`) has no `streak`. *** ## Error Handling See [API Conventions](/api/conventions#error-shapes) for the two shapes and the status code table. > [accordion] 400 — VALIDATION\_ERROR > > Invalid body, batch over 500, CPF without 11 digits, an item with neither `cpf` nor `email`, or an unknown `period` / `ranking_scope`. > [accordion] 403 — FORBIDDEN > > API key is valid but lacks the `progress:read` scope. > [!TIP] > > **A company with no ladder configured is not an error.** The response comes back with `levels: []` and status 200. *** ## Rate Limits | Limit | Value | | - | - | | Default requests per hour | 1000 | | Max collaborators per request | 500 | *** ## Next Steps > [card] [Missions API](/api/integrations/missions) > > The progress that earns the XP shown here > [card] [Campaigns API](/api/integrations/campaigns) > > Where the coins get spent # SIGAVI 360 Integration — Missions, Leads, and Commission Payments Source: https://docs.play2sell.com/api/integrations/sigavi How to connect your SIGAVI 360 to Play2sell so that brokers' activities count toward missions, service records become leads, and each proposal's commissions are charged and transferred through Commission Payments — integration user, funnel stages, what is read, commission payment rules, FAQ, and troubleshooting. The **SIGAVI 360 integration** connects your **SIGAVI** to **Play2sell** for three things: * **Missions** — activities, visits, and events that brokers record in SIGAVI count toward the gamification missions. * **Leads** — each SIGAVI **service record (FAC)** becomes a **lead** in Play2sell, with the responsible broker and the funnel stage. * **Commission Payments** — the commission of each SIGAVI **proposal** becomes a sale in **Play2sell PAY**: each boleto awaiting payment is charged and the transfer is split among the beneficiaries. See the **Commission Payments** section further below. Setup is done **screen by screen, with no coding**, and takes about **10 minutes**. Commission Payments is turned on **in stages**: first in **observation mode**, on the same screen, and only then live. > [!NOTE] > > **SIGAVI is the source of truth.** Play2sell **only reads** your SIGAVI — nothing is created, changed, or deleted there. The read happens **every 10 minutes**: what the broker records in SIGAVI appears in Play2sell within 10 minutes. ## What you'll set up | Step | What you do | Result | | - | - | - | | **1** | Get the **integration user** from your SIGAVI | the connection's read credential | | **2** | Connect SIGAVI in the Play2sell panel | access checked on the spot | | **3** | Choose what to turn on and the stage for each situation | users, missions, and leads synchronized | | **4** | Check the first read | integration validated | > [!NOTE] > > **Prerequisites** > > * Be an **administrator** of the company in Play2sell (only administrators turn the integration on or off). > * Have your SIGAVI's **integration user** — it is the API user, **not** your personal login. > * Nothing to register by hand: the SIGAVI collaborators are imported as users (the **Usuários** (Users) block, which comes turned on). ## How does the integration work? **1. The broker works in SIGAVI** They record activities, visits, and service records as they always have. **2. Play2sell reads what changed** Every 10 minutes Play2sell queries your SIGAVI and brings in what was created or changed since the previous read. Each read steps back a few minutes over the previous one, so as not to miss anything that was saved along the way — whatever comes in repeated is recognized and does not count twice. **3. Activities count toward missions** Each activity, visit, or event is attributed to the broker who recorded it and becomes available to your company's missions. **4. Records become leads** Each service record becomes a lead. When the record changes situation in SIGAVI, the lead follows, moving to the funnel stage you chose. ### How the broker is identified | Record | How Play2sell finds the broker | | - | - | | **Activities, visits, and events** (missions) | by the broker's **email** in SIGAVI; if not found, by their **CPF/CNPJ** in SIGAVI | | **Service record** (lead's responsible broker) | by the broker's **email** in SIGAVI | A record whose broker is not found **generates no points**, and the lead is left **without a responsible broker**. To avoid this, leave **Usuários** turned on: the SIGAVI collaborators enter Play2sell with the same email and the same CPF. > [!WARNING] > > If the same person is registered **twice** in Play2sell (once with the email, once with the CPF), the record goes to the registration found by **email**. It is worth merging duplicate registrations before connecting. ### Which day an activity counts on Each activity counts on the **date and time it was registered in SIGAVI** — in practice, the moment Play2sell reads it, up to 10 minutes later. Dates entered by the broker, such as the date set for a task, do not change the day: a task scheduled today for Friday counts **today**. Missions always apply to the present; nothing counts toward a past or future day. ### Accounts left out of the ranking SIGAVI accounts that are not brokers — the system vendor's support, test accounts — also register activities. To keep them out of the missions, open **Edit configuration** and, with **Missions** on, use **Accounts left out of the ranking**: enter the account's email and save. The screen also lists **accounts with activity in the last 7 days and no user here**, with a **Leave out** button. To bring an account back into the ranking, remove it from the list. ## Step 1 — Get the integration user in SIGAVI The connection needs three values: **address**, **integration user**, and **password**. **1. Open your SIGAVI's API help** With your administrator login, go to `yourcompany.sigavi360.com.br/Help` (replace `yourcompany` with your SIGAVI's address). **2. View the integration credential** On the help page, use the option to **view** the integration user and password and copy both values. **3. Note the address** It is the part **before** `.sigavi360.com.br` — in `yourcompany.sigavi360.com.br`, the address is `yourcompany`. > [!TIP] > > You have **address**, **integration user**, and **password** in hand. > [!NOTE] > > The integration password is **sensitive** — treat it like any password. In Play2sell it is stored and **never shown again**. If you can't find the integration credential in the SIGAVI help, ask SIGAVI support for your company's **API user**. ## Step 2 — Connect in the Play2sell panel In the Play2sell panel, go to **Integrações → Conectores** (Integrations → Connectors), find **SIGAVI 360**, and click **Conectar** (Connect). | Field | What to enter | | - | - | | **Endereço do SIGAVI** (SIGAVI address) | The part before `.sigavi360.com.br` (e.g., `yourcompany`). If you paste the full address, the panel uses only that part. | | **Usuário de integração** (Integration user) | The API user copied in Step 1. | | **Senha** (Password) | The integration password. | When you click **Continuar** (Continue), Play2sell **checks the access on the spot** in your SIGAVI. If the user or the password doesn't get in, you see the reason right there and nothing is saved. ## Step 3 — Choose what to turn on After checking the access, the panel shows what can be turned on: | Option | What it does | | - | - | | **Usuários** (Users) | The SIGAVI collaborators enter as users of the company, with CPF, position, team, CRECI, and hire date. Anyone who is inactive in SIGAVI enters inactive. Comes turned on. | | **Missões** (Missions) | Brokers' activities, visits, events, and **sales** in SIGAVI count toward missions. | | **Leads** | Each SIGAVI service record becomes a lead, with the responsible broker. | | **Pagadoria de comissões** (Commission Payments) | Reads and checks the SIGAVI proposals and commission boletos in **observation mode**, without issuing or paying anything. Comes turned off. See the **Commission Payments** section. | You can turn on all of them or just some. With **Usuários** turned off, leads and activities are only attributed to those who already have a registration in Play2sell with the same email. ### Funnel stage for each situation With **Leads** turned on, the panel lists **your SIGAVI's service situations** — read from your account, with the names your company uses — and, next to each one, the **stages of your lead funnel** in Play2sell. * When there is a stage with **the same name** as the situation, it comes already selected. * For the others, choose the stage — or leave **"Manter a etapa em que o lead está"** (Keep the stage the lead is in). | Record's situation in SIGAVI | What happens to the lead | | - | - | | Has a stage chosen | The lead goes to that stage whenever the record is in that situation. | | "Manter a etapa em que o lead está" | A new lead enters the **first stage** of the funnel; a lead that already exists **stays where it is**. | Click **Conectar**. The first read goes out within 10 minutes. > [!TIP] > > You don't need to map everything at once. You can come back later, in **Editar configuração** (Edit configuration), and adjust the stages — the choices already made come filled in. ## Step 4 — Check the first read **1. Wait up to 10 minutes** The first read brings in the records changed in the **last 24 hours**, the activities from the **last 2 hours**, and the sales from the **last 48 hours**. Anything older than that is not imported. **2. Check a lead** Open the lead funnel and look for a recent service record from SIGAVI: name, contact, responsible broker, and stage should match. **3. Check an activity** Ask a broker to record an activity in SIGAVI and, after 10 minutes, see their progress in the missions. ## What is read from SIGAVI | From SIGAVI | Becomes in Play2sell | Note | | - | - | - | | Collaborator | **User** | Name, email, mobile phone, CPF/CNPJ, position, team, CRECI, date of birth, hire date, and whether they are active. Read every 30 minutes and at connection time. | | Service record (FAC) | **Lead** | The whole record — see **What the lead receives**, below. One record, one lead. | | Record **registered** | Event for the missions | Counts **once** per record, at the moment of registration. It carries neither the customer's name nor contact. | | Record activities | Events for the missions | Attributed to the activity's broker. | | Visits | Events for the missions | Attributed to the visit's broker. | | Record events | Events for the missions | Attributed to the event's broker. | | Sales | Events for the missions | Contract generated, pre-deed, deeded, and cancellation. Attributed to the sale's broker. Read every 30 minutes, together with **Missões**. | ### What the lead receives | From the SIGAVI record | On the lead | | - | - | | Customer, email, phone | Name and contact | | Customer's CPF/CNPJ | Document (only when it comes complete) | | Broker | Lead's responsible broker | | Service situation | Funnel stage, according to your map | | Product | Product of interest | | Expected closing | Closing forecast | | Record number, segment, channel, media, campaign, temperature, classification, team, management status, contact situation, completion reason | Additional lead fields, with the field's name | | Registration, update, expiration, and completion dates | Additional lead fields | | Customer's address (city/state, neighborhood, CEP, street) | Additional lead fields | | Extra information that your company configured in SIGAVI | Additional lead fields, with the name you gave | ### What the user receives | From the collaborator in SIGAVI | On the user | | - | - | | Name, corporate email (or personal, if there is none), mobile phone | Name and contact | | CPF/CNPJ | Document — it is what identifies the broker in the activities and the beneficiary in Commission Payments | | Position, team | Position and team | | CRECI, date of birth, hire date | The same fields | | Active / inactive | Anyone who is inactive in SIGAVI enters inactive. Anyone who already uses Play2sell is never deactivated by the integration, and nobody is reactivated by it. | **Not imported** from the collaborator: parents' names, RG, marital status, children, sex, place of birth, previous company, education, and the SIGAVI login. ### Lead rules * **One record, one lead.** If the same record is read again, the lead is updated — it is not duplicated. * **Name and contact come from SIGAVI.** A field that arrives **empty** from SIGAVI **does not erase** what is already on the lead. * **What you enriched in Play2sell stays.** Amount, document, and other data filled in within Play2sell are not overwritten by the read. * **Deletions are not mirrored.** A record deleted in SIGAVI remains as a lead in Play2sell. ## Commission Payments With Commission Payments, the commission of each SIGAVI **proposal** is charged to the payer by **Play2sell PAY**, and the amount received is **split among the beneficiaries** (broker, agency, manager…) exactly as it is in SIGAVI. > [!NOTE] > > **Turned on in stages.** Commission Payments always starts in **observation mode**, which you turn on yourself on the connection screen: Play2sell reads and checks your proposals **without issuing or paying anything**, and shows what would be ready and what needs fixing. Going live is a second step, done with the Play2sell team after you check the result. ### How it works **1. You enter the commission in SIGAVI** On the proposal: the commission boletos (payer, amount, due date and beneficiaries) and each collaborator's commission, with the position. **2. Play2sell reads and checks** Every 10 minutes Play2sell reads the boletos and commissions with an upcoming due date (from the last 30 days to the next 120), groups everything **by proposal**, and checks the proposal against the rules below. **3. The proposal becomes a sale in Play2sell PAY** A proposal that passes every rule becomes **one sale**, and each of its boletos **awaiting payment** becomes a charge (boleto with Pix) in the payer's name. Each proposal is issued **only once**. **4. The payer pays** The amount is held in custody in Play2sell PAY. **5. The deed releases the transfer** When the proposal reaches the **Escriturado** status in SIGAVI, the transfer of what has already been paid is released and each beneficiary receives their share. A boleto not yet paid is released when it is paid. A proposal that was already deeded when issued has the transfer released as soon as the boleto is paid. ### What needs to be in order | In SIGAVI | In Play2sell | | - | - | | Commission boleto with **payer** (name and CPF/CNPJ), **amount** and **due date**, awaiting payment | **Play2sell PAY** enabled, with a **commissions** cost center able to issue charges | | Boleto **beneficiaries** with **CPF/CNPJ** and **amount** | The **position map**: which Commission Payments role each position in your SIGAVI maps to | | Each beneficiary's **commission** on the same proposal, with the **position** | — | The Commission Payments roles are: **Seller**, **Agency**, **House**, **Manager**, **Coordinator** and **Partner**. The connection screen shows the positions **your** company uses in SIGAVI commissions, so you can choose the role of each one. The beneficiary is identified by **CPF/CNPJ**. Anyone not yet in your company in Play2sell is registered with the name and email from SIGAVI and linked to the company — there is no need to register them first. ### Checking rules Each rule applies to the **whole proposal**: if a boleto or a beneficiary does not pass, **nothing from that proposal is issued** — Commission Payments does not charge halfway. | Rule | Why | | - | - | | Payer and beneficiaries are identified **only by the full CPF/CNPJ**. | Names and emails repeat; documents do not. An incomplete or masked document is not used. | | All boletos of the proposal have the **same payer**. | The sale has a single buyer. | | In each boleto, the **sum of the beneficiaries** **equals the boleto amount**, to the cent. | A one-cent difference is already money with no owner. | | Amounts with more than two decimal places **are not rounded**. | Rounding would mean deciding who gets the cent. | | Each beneficiary needs a **commission on the same proposal**, with a position present in the map. | The position defines the role in the transfer. | | At most **6 beneficiaries** per boleto. | Commission Payments limit. | | Only boletos **awaiting payment** are charged. | A boleto already paid or transferred outside Play2sell is not charged again. | ### Cancellation (distrato) When the proposal reaches the **Distrato produção** status in SIGAVI: * an **open** boleto is **cancelled**; * a **paid** boleto still in custody is **returned to the payer**; * if the transfer **has already been made**, nothing is undone on its own: the case is recorded and handled with the Play2sell team. A cancelled proposal that had not been issued yet is not issued. > [!TIP] > > If your company uses other status names for the deed and the cancellation, the Play2sell team adjusts the mapping for your company. ### What Commission Payments does not do * **It does not write to SIGAVI.** The charge, the payment and the transfer appear in the Play2sell panel; SIGAVI is not updated. * **It does not change what has already been issued on its own.** If the proposal changes in SIGAVI after being issued (amount, due date, beneficiaries), **nothing is reissued automatically**: the change is recorded and handled with the Play2sell team. The exception is the **cancellation**, above. ### How to activate **1. Connect SIGAVI** Steps 1 and 2 on this page. Commission Payments uses the same connection. **2. Turn on Commission Payments in observation mode** In **Integrations → Connectors → SIGAVI 360**, in the **what to turn on** step, turn on **Pagadoria de comissões**, choose the role of each position and save. Nothing is issued: reading your proposals starts within 10 minutes. **3. Check what observation shows** Go back to **Edit configuration**: the screen shows the **last read** — how many proposals were read, how many would be ready and why the others would not pass. In **Integrations**, the integration health panel lists each proposal with the decision and the reason. Fix the registrations and the map until the result is as expected. **4. Ask to go live, with low limits** With observation checked, the Play2sell team turns on issuing for your company, with an **amount cap per proposal** and a **maximum number of proposals per read** defined with you. **5. Check the first sale** After checking the first charge issued and the first transfer, the limits are raised. ## Edit or turn off In **Integrações → Conectores → SIGAVI 360 → Editar configuração**: * **Review the configuration:** enter the integration password again (it is not visible after being saved), adjust whatever you want, and save. * **Reimportar as fichas dos últimos 7 dias** (Re-import the records from the last 7 days)**:** turn on this switch so that the next read re-reads the records from the period and completes the leads that have already come in. Nothing is duplicated. * **Desligar integração** (Turn off integration)**:** the reads stop. **Leads and points that have already come in remain** in Play2sell, and you can turn it on again whenever you want — the read resumes from where it stopped. ## Frequently asked questions > [accordion] How long does it take for what I do in SIGAVI to appear in Play2sell? > > Within **10 minutes**. SIGAVI does not notify when something changes, so Play2sell queries every 10 minutes. > [accordion] Does Play2sell change anything in my SIGAVI? > > **No.** The integration is read-only. > [accordion] I moved the lead to another stage in Play2sell. Will the read undo it? > > Only if the record's situation in SIGAVI has a **stage chosen** in the mapping — in that case SIGAVI rules. If the situation is set to "Manter a etapa em que o lead está", the lead stays where you put it. > [accordion] We created a new situation in SIGAVI. What now? > > Records in that situation keep becoming leads, and the lead stays in the stage it is in. To direct it to a stage, open **Editar configuração**: the new situation appears in the list. > [accordion] Do the brokers' old activities come in? > > No. The integration starts counting from the connection (with the windows from Step 4). > [accordion] Can the same activity count twice? > > No. Each SIGAVI record has its own identification; what is read again is recognized and ignored. > [accordion] We created a new activity type in SIGAVI. Does it count? > > Yes. On the first read, the new type is added to the **Missions** activity list with the same name it has in SIGAVI, and you can use it in a mission. It only counts once it is part of an active mission. > [accordion] Does Commission Payments start issuing boletos as soon as I connect SIGAVI? > > **No.** Commission Payments comes **turned off**. When you turn it on on the screen, it starts in observation mode (without issuing or paying); issuance only goes live after you check the result and ask for it to be turned on. > [accordion] Can the same proposal be issued twice? > > No. Each SIGAVI proposal has its own identifier and is issued only once, even though it is read again every 10 minutes. > [accordion] I changed the proposal in SIGAVI after it was issued. What happens? > > Nothing is reissued on its own. The change is recorded and the Play2sell team handles the case with you. The exception is the **cancellation**: open boletos are cancelled and paid ones still in custody are returned to the payer. > [accordion] One of the beneficiaries is not registered in Play2sell. Do I need to register them first? > > No. The beneficiary is identified by CPF/CNPJ and, if not yet in your company, is registered with the name and email from SIGAVI. > [accordion] When does the beneficiary get paid? > > When the proposal reaches the **Escriturado** status in SIGAVI and the boleto is paid. If the proposal was already deeded, as soon as the boleto is paid. > [accordion] Does SIGAVI show that the boleto was paid or transferred? > > No. SIGAVI does not offer a way to receive that information; tracking is in the Play2sell panel. ## Troubleshooting | What appears | Likely cause | What to do | | - | - | - | | "O SIGAVI recusou o usuário ou a senha." (SIGAVI rejected the user or the password.) | Incorrect integration user or password, or the personal login was used. | Copy the integration credential again from the SIGAVI API help (Step 1). | | "O SIGAVI aceitou o usuário, mas não deixou ler os dados." (SIGAVI accepted the user, but did not allow reading the data.) | The user entered is not the integration one. | Use the API user, not the personal login. | | "Endereço do SIGAVI inválido." (Invalid SIGAVI address.) | Something beyond your company's address was entered. | Enter only the part before `.sigavi360.com.br`. | | "Resposta inesperada do SIGAVI…" (Unexpected response from SIGAVI…) | Your SIGAVI's API is down or returning an error. | Try again in a few minutes. If it persists, ask SIGAVI support to check your company's API. | | "Há situações em etapas que não são do funil de leads desta empresa." (There are situations in stages that do not belong to this company's lead funnel.) | A funnel stage was removed while the screen was open. | Close and open the configuration again and redo the choice. | | Lead without a responsible broker | The record's broker is not a user in Play2sell. | Turn on **Usuários** in the configuration, or check whether the broker's email is the same in both systems. | | Activity did not count toward the mission | The broker was not found, or there is no mission that counts that type of activity. | Check the broker's registration and the company's active missions. | ### Commission Payments — why a proposal was not issued | Reason | What to do | | - | - | | Payer without a name or without a full CPF/CNPJ | Complete the payer's registration in SIGAVI. | | Boletos of the same proposal with different payers | Keep the same payer on every boleto of the proposal. | | Nothing to charge | No boleto of the proposal is awaiting payment — there is nothing to issue. | | Beneficiary without a full CPF/CNPJ | Complete the beneficiary's document in SIGAVI. | | Sum of the beneficiaries different from the boleto amount | Fix the amounts in SIGAVI so the sum matches to the cent. | | Amount with more than two decimal places | Fix the amount in SIGAVI. | | Position without a role in the map | Choose the position's role on the connection screen, or enter the beneficiary's commission in the same proposal as the boleto. | | More than 6 beneficiaries | Split the commission into more than one boleto. | | Missing or invalid due date | Fix the due date in SIGAVI. | | Above the amount cap | The proposal exceeds the limit agreed for the current phase; ask for it to be raised. | | Cancelled proposal | A cancelled proposal is not issued. | | Changed in SIGAVI after being issued | The sale is not changed on its own; the Play2sell team handles the case with you. | | Account not enabled to issue | Complete the cost center's payments enablement in Play2sell PAY. | ## Reference | Item | Value | | - | - | | Direction | SIGAVI → Play2sell (read-only) | | Frequency | every 10 minutes; sales and users every 30 minutes | | First read | records from the last 24 hours; activities from the last 2 hours; sales from the last 48 hours | | Broker identity | email; for activities, in the absence of the email, CPF/CNPJ | | Lead identity | the record's internal number in SIGAVI | | Users | every 30 minutes and at connection time | | Record re-import | on demand, last 7 days | | Who can configure | company administrators | | Commission Payments — what is read | commission boletos and commissions per collaborator, by due date (−30 to +120 days), grouped by proposal | | Commission Payments — identity | CPF/CNPJ of the payer and of each beneficiary | | Commission Payments — transfer release | at the proposal's **Escriturado** status (boleto paid) | | Commission Payments — cancellation | **Distrato produção** status: cancels what is open and returns what was paid and is in custody | | Commission Payments — return to SIGAVI | none; tracking in the Play2sell panel | # SSO (Single Sign-On) Source: https://docs.play2sell.com/api/integrations/sso Your company's users sign in to SalesOS with no SalesOS password — through the identity provider you already use (OAuth 2.0 / OpenID Connect) — on any page, and come back through it when the session expires. # SSO (Single Sign-On) Your company's users can sign in to SalesOS **without a SalesOS password**: the identity provider your company already uses does the authentication. SalesOS receives the identity, checks that the person belongs to your company and opens the session. It covers **all of SalesOS** — home screen, leads, wallet, campaigns, ranking — and the link can take the person straight to any of those pages. This guide is for **whoever administers your company's identity provider** (the IT team). ## Who does what | Stage | Who | | - | - | | Register Play2sell as an application in your provider and send us the details | Your company | | Connect your provider to SalesOS and return the connection name and entry link | Play2sell | | Test in staging with a test user | Your company, with Play2sell | | Repeat in production and share the link with your users | Your company | ## Before you start * **Administrator** access to your identity provider (OAuth 2.0 / OpenID Connect). * Your company already uses SalesOS and SSO access has been agreed with Play2sell. * A test user in your provider who is **not an administrator**: administrators often get access to everything automatically, and the test would pass without proving anything. ## What your provider needs | Requirement | Detail | | - | - | | Flow | *Authorization code* with a **confidential** application (with a client secret) | | PKCE | Accept PKCE with `S256` on every authorization | | **Userinfo** endpoint | **Required.** On every sign-in SalesOS reads the user's profile from it, with the access token | | Stable identifier | A field that identifies the person and never changes (see [The stable identifier](#the-stable-identifier)) | | **Email** | **Required** in the profile. Without an email the sign-in is refused | | Name | Recommended | | Scopes | `openid profile email` (plus any your provider requires) | > [!NOTE] > > If your provider lets you choose how the application authenticates at the token endpoint, enable both `client_secret_post` and `client_secret_basic`. ## Step by step **1. Register Play2sell in your provider** Create **one application per environment** (production and staging) with these settings: | Item | Production | Staging | | - | - | - | | Callback address (redirect URI) | `https://auth.play2sell.com/login/callback` | `https://auth-staging.play2sell.com/login/callback` | | Client application settings | Confidential application with a client secret, using the *authorization code* flow | Same | | Scopes | `openid profile email` | Same | **Done when:** both applications exist and each callback address is exactly as above, with no trailing slash. **2. Map the profile** Make sure **userinfo** returns the user's stable identifier, **email** and name. Note the name of each field (e.g. `sub`, `email`, `name`, or `dados.cpf`). **Done when:** the test user has all three fields filled in. **3. Assign who can sign in** In your provider, assign the users or groups that can sign in to SalesOS to the application. This is the step most often forgotten: without the assignment, your provider refuses the sign-in before it ever reaches SalesOS. **Done when:** the test user is assigned to both applications. **4. Send the details to Play2sell over a secure channel** Never as plain-text email or chat. For each environment: * the path to your OpenID Connect configuration (`/.well-known/openid-configuration`) or your provider's **authorization**, **token** and **userinfo** endpoints; * the **client ID** and **client secret**; * the names of the **stable identifier**, **email** and **name** fields; * the test user and a technical contact. **Done when:** Play2sell confirms receipt. **5. Receive the connection name and the entry link** Play2sell connects your provider to SalesOS in staging and returns the **connection name** and the **entry link** (see [Entry link](#entry-link)). **6. Test in staging** With the test user (not an administrator), open the staging entry link: | Test | Expected result | | - | - | | First sign-in, no `next` | Signs in to your provider and lands on the SalesOS home screen, already in your company | | Open the link again, still signed in to your provider | Gets in with nothing to type | | Link with `next` set to a SalesOS page (e.g. `next=%2Fleads`) | Lands straight on that page | **Done when:** all three results happen. If something fails, see [Troubleshooting](#troubleshooting). **7. Production** Repeat step 4 with the production application details. Once Play2sell confirms, share the production entry link with your users — in your portal, intranet or any system of yours that leads to SalesOS. ## Entry link | Environment | Link | | - | - | | Production | `https://app.play2sell.com/login/sso?connection=&next=` | | Staging | `https://app-staging.play2sell.com/login/sso?connection=&next=` | Each environment has its own connection: the `connection` name in staging is the one Play2sell gives you for the staging application. | Parameter | Required | What it is | | - | - | - | | `connection` | Yes | Your company's connection name, which Play2sell gives you when it is turned on | | `next` | No | The SalesOS page the user lands on after signing in — any page, e.g. `/leads`, `/wallet`, `/ranking`, `/campanha`. Without it, the home screen opens | > [!TIP] > > Some SalesOS APIs already return the entry link for the right page. The [Campaigns API](/api/integrations/campaigns#signing-in-again-through-your-company’s-provider), for example, returns `access.login_url` with the address for each environment — use it instead of building the link in your code. ### What happens when the user opens the link | User's situation | Result | | - | - | | Already has a SalesOS session | Opens the requested page directly | | SalesOS session expired, still signed in to your provider | Goes through your provider with nothing to type and lands on the page | | No session anywhere | Signs in to **your** provider and lands on the page | A user who came in this way and whose session expires **inside** SalesOS is sent back through your provider automatically, to the same page, instead of a password screen they don't have. > [!WARNING] > > `next` only accepts a **path inside SalesOS** (starting with `/`). A full URL, another host or a sign-in path is ignored and the user lands on the home screen. ## The stable identifier It is the field that says **who the person is** from one sign-in to the next. It must not change when the user changes email. Your company picks one of these: | Identifier | When to use it | | - | - | | **Your provider's internal id** | The default (usually the `sub` field) | | **CPF or CNPJ** | Recommended when your provider has the document: on the first sign-in, SalesOS finds the person already registered with that document, even under another email, and the document is added to their record. Accepted with or without formatting (11 or 14 digits, with a valid check digit); an invalid document is refused | | **Email** | Only when there is nothing else; changing email in your provider means becoming another person | Namespaced fields (e.g. `https://yourcompany.com/cpf`) and nested fields (e.g. `dados.cpf`) are accepted. ## Who gets in and who is refused Signing in through your company's provider **does not open the account of someone outside your company**. A new user comes in already tied to your company, with the default role agreed with Play2sell; role changes are made in SalesOS. **People who already have a SalesOS account at another company** also get in, after a confirmation. On their first sign-in through your provider, SalesOS sends a single-use link to the primary email on the person's account. Once they confirm, signing in through your provider opens their account, and they also join your company with the default role, without leaving the companies they were already in. From the second sign-in on, they go straight in. The confirmation exists because the email a provider sends does not, on its own, prove who owns the account. The cases below are refused, each with a message that tells the user what to do: | Situation | What the user sees | | - | - | | The email belongs to **more than one person** in SalesOS, or the person was **removed from your company** after already signing in through your provider | "This email already has a SalesOS account" — sign in with the SalesOS login | | It is a **Play2sell staff** account | "Use the SalesOS login" | | The person's access in your company was **deactivated** in SalesOS | "Your access is deactivated" — talk to your manager | | Your company's access through this path is **turned off** | "This access is turned off" | | The connection used is **not enabled** in SalesOS | "This access is not enabled" | | Your provider did not send the **email** | "Your company's sign-in did not send your email" | | Your provider did not send the **identifier** | "Your company's sign-in did not send your identification" | | The **CPF/CNPJ** sent is not valid | "The CPF or CNPJ sent is not valid" | | Your provider's **userinfo** did not respond | "Your company's sign-in did not respond as expected" | > [!NOTE] > > The screens themselves are in Portuguese; the table translates them. ## Offboarding and client secret rotation * **Someone leaves your company:** deactivate the person in your provider. Their next sign-in is refused by your provider; a session they already had open in SalesOS lasts until it expires. To cut it in SalesOS too, ask your company's SalesOS manager to deactivate their access. * **Client secret rotation:** many providers make the secret expire (usually after 6 to 24 months). Before it expires, generate a new one and send it to Play2sell over the same secure channel, with the date for the switch, so sign-in does not stop. ## Troubleshooting | Symptom | Likely cause | What to do | | - | - | - | | Your provider shows a redirect address error | The redirect URI is not exactly the one in the step 1 table | Fix the address, with no trailing slash, in the right environment | | Your provider says the user has no access to the application | The user was not assigned to the application | Assign the user or group (step 3) | | "Your company's sign-in did not send your email" | Email is not in userinfo, or the field name given is another one | Release the email in the profile and check the field name | | "Your company's sign-in did not respond as expected" | Userinfo returned an error or did not respond | Check that userinfo accepts the application's access token | | Sign-in worked and stopped for everyone | Expired client secret | Generate a new one and send it to Play2sell | When asking Play2sell for help, send: the **time** of the attempt, the user's **email**, the **environment** (production or staging) and the error **code or text** shown on screen. ## Security * **Authorization code with server-to-server exchange:** no identity token travels in the browser URL. * **PKCE** on every authorization. * The **client secret** lives only in Play2sell's authentication service; it is not stored in the SalesOS database and is never shown back on any screen. * **Denied by default:** a sign-in through a connection that is not enabled, or from a company whose access is turned off, is refused — it never falls back to another path. ## Next steps > [card] [Campaigns API](/api/integrations/campaigns) > > An API that returns the entry link ready to use (`access.login_url`) > [card] [API Keys](/api/integrations/api-keys) > > Server-to-server integrations # Webhooks (Outbound) Source: https://docs.play2sell.com/api/integrations/webhooks Receive real-time events from SalesOS at your own HTTPS endpoint — envelope, signature verification, event catalog, retries and idempotency. # Webhooks (Outbound) Webhooks let SalesOS **call your system** when something happens (a lead is offered, a ranking is published, a message is dispatched). You give us an HTTPS URL and a secret; we `POST` a signed JSON payload to it whenever a subscribed event fires. > [!NOTE] > > This page covers **outbound** webhooks (SalesOS → your endpoint). For sending data **into** SalesOS, > see [Activities](/api/integrations/activities) and [API Keys](/api/integrations/api-keys). ## Configure a webhook in the Dashboard Go to **Integrations → Webhooks → New Webhook** and fill in the form. **1. Basic** * **Name** (required) — e.g. `Notify CRM`. * **Key** — a stable identifier (e.g. `notify_crm`). * **Description** — optional. **2. Events (triggers)** Pick a **Category**, then select the **events** that fire this webhook — this is your subscription (see the [catalog](#event-catalog)). Leave it empty for a webhook you only trigger manually (the *Test* button) or from a workflow. **3. Destination** * **Method** — `POST` (default), `PUT` or `PATCH`. * **Timeout (seconds)** — how long we wait for your `2xx` (default 30). * **URL** (required) — your endpoint. **Must be `https://`** and public (internal/loopback hosts are blocked). * **Authentication** — choose **HMAC** to sign every delivery, then in **Auth Config (JSON)** set your secret: ```json theme={null} { "secret": "whsec_your_secret" } ``` (Other schemes are available: Bearer, API Key, Basic, OAuth2.) **4. Advanced** * **Custom Headers (JSON)** — extra headers sent with every delivery. * **Payload Template (JSON with `{{ }}` variables)** — shapes the envelope `data` from the event context, e.g. `{ "id": "{{event.id}}", "type": "{{event.type}}", "to": "{{event.to}}" }`. > [!WARNING] > > Template values are interpolated into JSON. Use **flat, scalar** fields. Injecting a nested object > via `"{{event.data}}"` may not render cleanly today — always check the **Preview** / send a **Test** first. **5. Preview, test & save** The form shows a live **Preview** (headers + body). Click **Save webhook**, then use **Test Webhook** to send a sample delivery and confirm your endpoint receives — and verifies — it. ## The envelope On the event path, every delivery is a single JSON object: ```json theme={null} { "id": "evt_2KWPBgLlAfxdpx2AI54pPJ85f4W", "type": "ranking.weekly.published", "version": "1", "ts": "2026-06-03T12:00:00.000Z", "tenant": "9b1f0c2e-1a2b-4c3d-8e4f-5a6b7c8d9e0f", "data": { /* event-specific — see catalog */ } } ``` | Field | Description | | - | - | | `id` | Unique event id, **stable across retries** → your idempotency key. | | `type` | Event type (see catalog). | | `version` | Schema version of `data`. Evolves additively. | | `ts` | When the event occurred (ISO 8601, UTC). | | `tenant` | Origin tenant (uuid). | | `data` | Event-specific payload. | ## Headers | Header | Description | | - | - | | `X-SalesOS-Event` | Event type — route without parsing the body. | | `X-SalesOS-Event-Id` | Equals `id`; stable across retries (idempotency). | | `X-SalesOS-Delivery-Id` | Per-attempt id (changes on retry; for debugging). | | `X-SalesOS-Timestamp` | Unix seconds — part of the signature (anti-replay). | | `X-SalesOS-Tenant` | Origin tenant id. | | `X-SalesOS-Signature` | `sha256=` — see [Verify](#verify-the-signature). | ## Verify the signature > [!WARNING] > > Always verify the signature before trusting a delivery. Without it, anyone who learns your URL could > forge events. On the event path, the signature covers **`{id}.{timestamp}.{rawBody}`** (Standard-Webhooks style), so it authenticates the payload **and** the timestamp (anti-replay). Recompute the HMAC with your secret, compare in constant time, and reject if the timestamp is more than **300s** off. ```js Node.js theme={null} import crypto from "node:crypto"; // raw = the exact raw request body (do NOT JSON.parse first) export function verify(req, secret) { const id = req.headers["x-salesos-event-id"]; const ts = req.headers["x-salesos-timestamp"]; const sig = req.headers["x-salesos-signature"]; // "sha256=" const raw = req.rawBody; if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // replay window const expected = "sha256=" + crypto.createHmac("sha256", secret).update(`${id}.${ts}.${raw}`).digest("hex"); const a = Buffer.from(sig), b = Buffer.from(expected); return a.length === b.length && crypto.timingSafeEqual(a, b); } ``` ```python Python theme={null} import hmac, hashlib, time def verify(headers, raw_body: bytes, secret: str) -> bool: event_id = headers["X-SalesOS-Event-Id"] ts = headers["X-SalesOS-Timestamp"] sig = headers["X-SalesOS-Signature"] # "sha256=" if abs(time.time() - int(ts)) > 300: # replay window return False msg = f"{event_id}.{ts}.{raw_body.decode()}".encode() expected = "sha256=" + hmac.new(secret.encode(), msg, hashlib.sha256).hexdigest() return hmac.compare_digest(sig, expected) ``` > [!NOTE] > > **Test deliveries** (the "Test Webhook" button) and legacy workflow triggers currently use a simpler > scheme: the body is the raw rendered template (not the envelope) and the signature header is > `X-Signature: ` — **without** the `id.timestamp.` prefix, so it has no > anti-replay. Prefer the event path above for production. ## Event catalog | `type` | When it fires | `data` | | - | - | - | | `lead.offer_created` | A lead is offered to a broker | lead/opportunity payload | | `lead.accepted` | A broker accepts a lead | lead/opportunity payload | | `lead.offer_expired` | An offer expires before acceptance | lead/opportunity payload | | `mission.completed` | A mission is completed | mission payload | | `ranking.weekly.published` | Weekly ranking is published (scheduled) | leaderboard (rows by email) | | `ranking.consolidated.published` | Consolidated ranking is published | leaderboard (rows by email) | | `message.dispatch` | A message is dispatched to a user/group | `{ to, m }` | | `notification.push.dispatch` | A push is dispatched to a user/group | `{ to, n }` | | `checkin.confirmed` | A collaborator checks in and **becomes eligible** for leads | `{ checkin_id, type, queue_eligible, location_id, location_name, shift, shift_expires_at, user }` | | `checkin.shift_closed` | The configured shift ended — **the collaborator leaves the queue** | `{ checkin_id, queue_eligible, reason, user }` | | `checkin.checked_out` | The collaborator **clocked out** — leaves the queue | `{ checkin_id, type, queue_eligible, user }` | ### Check-in: the three moments a queue changes Eligibility changes at exactly three moments, and each has its own event. If you route leads by who is on duty, subscribe to **all three** — taking only the first leaves people enabled forever. | Event | Meaning for your queue | | - | - | | `checkin.confirmed` | **Enable.** Duty or home office, created successfully | | `checkin.shift_closed` | **Disable.** The configured shift ended | | `checkin.checked_out` | **Disable.** The person clocked out | > [!NOTE] > > A check-in that does not make someone eligible never reaches you. Delivering it would tell you to enable somebody who cannot receive leads. Expiry by **inactivity** — no signal from the app for four hours — is a safety net, not a rule, and deliberately does not reach you. It still notifies the collaborator. > [!WARNING] > > Expiry is evaluated by a job that runs **every 15 minutes**, so `checkin.shift_closed` can arrive up to 15 minutes after the shift's closing time. If your side enforces a hard cutoff, use the shift end from the [Check-in API](/api/integrations/checkin) rather than waiting for the event. Every check-in event carries a `user` block — the identity of whoever entered or left the queue, resolved on our side so you can recognize the person without any prior identity agreement. Example `data` for `checkin.confirmed`: ```json theme={null} { "checkin_id": "5f0c…", "type": "duty", "queue_eligible": true, "location_id": "a1b2…", "location_name": "Stand Jardim Alameda", "shift": "manha", "shift_expires_at": "2026-08-17T15:00:00Z", "user": { "id": "3c3d…", "name": "Maria Santos", "email": "maria@empresa.com", "cpf": "52998224725" } } ``` > [!NOTE] > > `user.cpf` may be `null` — not every collaborator has a document on file; fall back to `user.email`. Fields that do not exist at the moment of the event (e.g. `shift` on a clock-out) arrive as `null`, never dropped from the schema. Example `data` for `ranking.weekly.published`: ```json theme={null} { "p": { "type": "weekly", "label": "Semana 23/2026", "start": "2026-05-25", "end": "2026-05-31" }, "org_unit": null, "totals": { "users": 843, "points": 1820400, "missions": 5120 }, "rows": [ { "rank": 1, "delta": 2, "email": "maria@loja.com", "points": 4820, "missions": 37, "org_unit": "ou_12" } ] } ``` Recipients are keyed by **email** — names and ids are not sent; enrich on your side if needed. ## Reliability **Respond fast.** Return a `2xx` status quickly (before heavy processing) to acknowledge receipt. | Your response | What SalesOS does | | - | - | | `2xx` | Marks the delivery completed. No retry. | | `4xx` (400, 401, 422…) | Treated as a permanent rejection. **No retry** (except `429`, which respects backoff). | | `5xx` / timeout / connection error | Retried with **exponential backoff** (`2^n` minutes, up to 5 attempts), then **dead-lettered**. | **Idempotency.** The same event may be delivered more than once (retries). Deduplicate on `X-SalesOS-Event-Id` — it stays the same across retries. > [!TIP] > > Failed deliveries land in the **Deliveries** panel (Dashboard → Integrations → Webhooks) where you can > inspect status, attempts and the last error, and resend from the dead-letter queue. # SalesOS Documentation Source: https://docs.play2sell.com/index Everything you need to know about SalesOS — the sales management platform that combines CRM, gamification, and automation. # Welcome to SalesOS Documentation SalesOS is a complete sales management platform that brings together CRM capabilities, gamification mechanics, and powerful automation to help your team close more deals and stay motivated. Whether you are a sales rep looking to understand the pipeline, an admin configuring your workspace, or a developer building integrations, you will find everything you need here. > [card] [User Guide](/user-guide/introduction) > > Learn how to use SalesOS day-to-day — manage leads, track deals, earn badges, and communicate with your team. > [card] [Admin Guide](/admin/initial-setup) > > Set up your company workspace, manage users and teams, customize fields and workflows, and handle billing. > [card] [API Reference](/api/conventions) > > Integrate SalesOS with your existing tools using our REST API. Includes authentication, endpoints, and integration guides. > [card] [Support](/support/faq/general) > > Find answers to common questions, troubleshoot issues, and get in touch with our support team. ## Quick Links > [card] [First Login](/user-guide/getting-started) > > Get up and running in minutes > [card] [Pipeline Management](/user-guide/sales/pipeline) > > Master the Kanban sales pipeline > [card] [Gamification](/user-guide/gamification/rankings) > > Understand points, rankings, and badges > [card] [Invite Your Team](/admin/users/invites) > > Add team members to your workspace > [card] [API Authentication](/api/authentication) > > Start making API calls ## What Makes SalesOS Different SalesOS is not just another CRM. It is a platform designed specifically for sales teams that want to: * **Close more deals** with a visual Kanban pipeline and smart lead qualification * **Stay motivated** through gamification — rankings, badges, and challenges that turn selling into a rewarding experience * **Save time** with automation workflows that handle repetitive tasks * **Stay connected** with built-in team chat and real-time notifications * **Make data-driven decisions** with comprehensive dashboards and reports * **Integrate everything** through our API, webhooks, and pre-built connectors > [!NOTE] > > SalesOS is available at [app.play2sell.com](https://app.play2sell.com). If you do not have an account yet, contact your company administrator or reach out to our sales team. # Changelog Source: https://docs.play2sell.com/support/changelog SalesOS release notes — new features, improvements, and bug fixes. # Changelog Stay up to date with the latest changes to SalesOS. We release updates regularly with new features, improvements, and bug fixes. > [!NOTE] > > SalesOS is a cloud platform — updates are applied automatically. You do not need to install or update anything. Simply refresh your browser to get the latest version. *** ## April 2026 ### April 30, 2026 **Security** * Initial API security review completed * Documented the request signature scheme (P2S-SIGN-V1): a 30-second validity window with a 5-step HMAC-SHA256 derived-key chain over `API_KEY`, `TIMESTAMP`, `METHOD`, `PATH`, and the body's SHA-256 digest * API key creation now returns a separate `api_key_secret` used to sign requests, never sent on the wire **Improvements** * OpenAPI specification updated to reflect both authentication schemes (Bearer JWT for Dashboard sessions, P2S-SIGN-V1 for server-to-server calls) * All API and integration pages (en/pt/es) refreshed with the new wire-format `Authorization` header and updated code samples in cURL, Node.js, Python, and PHP * Added an in-browser [API Sandbox](https://play2sellsa.github.io/api-sandbox/) that signs requests automatically — try endpoints without writing the HMAC code *** ## March 2026 ### March 12, 2026 **New Features** * Added custom badge creation for Enterprise plan administrators * Introduced scheduled report delivery via email (daily, weekly, monthly) * New "Forecast vs Actual" chart in the reporting dashboard **Improvements** * Pipeline drag and drop performance improved for boards with 200+ deals * Lead import now supports up to 5,000 records per batch (previously 1,000) * Webhook retry logic now uses exponential backoff for better reliability **Bug Fixes** * Fixed issue where pipeline filters would reset after moving a deal * Fixed notification count not clearing after marking all as read * Fixed CSV export including deleted records in certain filter combinations *** ## February 2026 ### February 25, 2026 **New Features** * SalesOS Pay: NFS-e electronic invoice generation * Added bulk operations on the deals list view (reassign, update stage, add tags) * New challenge type: Team Challenges with shared goals **Improvements** * Chat now supports threaded replies for better conversation organization * Dashboard widgets load independently — a slow widget does not block others * Improved search performance across leads and deals **Bug Fixes** * Fixed gamification points not being awarded for deals created via API * Fixed team hierarchy not being respected in the ranking leaderboard * Fixed file attachments failing for files with special characters in the name ### February 10, 2026 **New Features** * Automation workflows: new "Send Chat Message" action type * Added keyboard shortcuts for common actions (press `?` to see all) * New "Days in Stage" indicator on pipeline deal cards **Improvements** * Reduced login time by 40% through authentication flow optimization * Custom fields now support conditional required rules based on pipeline stage * Improved mobile responsiveness for the dashboard and lead list views **Bug Fixes** * Fixed round-robin lead distribution skipping deactivated users * Fixed date filters using UTC instead of the workspace timezone * Fixed rare issue where closing a deal as won would not trigger the #wins notification *** ## January 2026 ### January 20, 2026 **New Features** * SalesOS Connect (n8n): integrated workflow automation platform * Added webhook signature verification for secure integrations * New "Read-Only Viewer" default role option **Improvements** * Report generation is now 3x faster for large datasets * Added support for multi-select custom field type * Webhook delivery logs now show full request and response details **Bug Fixes** * Fixed pipeline metrics not updating in real time after deal moves * Fixed user invitation emails going to spam due to missing SPF record * Fixed challenge countdown timer showing incorrect time for non-UTC timezones *** ## December 2025 ### December 15, 2025 **New Features** * White-label branding: custom logo, colors, and login page customization * API v1 released with full CRUD support for leads, deals, and users * Added deal activity timeline with complete audit trail **Improvements** * Complete redesign of the notification center with filtering and bulk actions * Gamification tier system now includes 5 levels (Bronze through Diamond) * CSV import now validates and previews data before processing **Bug Fixes** * Fixed deals with zero value breaking the pipeline value calculation * Fixed chat channels not showing messages for newly added members * Fixed exported PDFs missing custom field columns *** > [!TIP] > > Have a feature request or feedback? We love hearing from our users. Contact us through the [support channels](/support/contact) to share your ideas. # Contact and Support Source: https://docs.play2sell.com/support/contact Get in touch with the SalesOS support team — support channels, hours, and how to report issues. # Contact and Support We are here to help you get the most out of SalesOS. Choose the support channel that best fits your needs. ## Support Channels > [card] Email Support > > **[support@play2sell.com](mailto:support@play2sell.com)** > > Available for all plans. Send detailed descriptions of your issue along with screenshots. > > Response time: within 24 business hours. > [card] In-App Chat > > Click the **Help** button in the bottom-right corner of SalesOS to start a chat with our support team. > > Available on Professional and Enterprise plans during business hours. > [card] Priority Support > > Enterprise customers have access to priority support with a dedicated Customer Success Manager. > > Response time: within 4 business hours. > [card] Documentation > > You are already here! Browse our documentation for guides, tutorials, and FAQs. > > Available 24/7 with no waiting. ## Business Hours Our support team operates during: * **Monday to Friday**: 9:00 AM to 6:00 PM (BRT, UTC-3) * **Weekends and holidays**: Limited email support for critical issues > [!NOTE] > > Enterprise customers with priority support have extended hours and emergency weekend coverage. Contact your Customer Success Manager for details. ## How to Report an Issue When contacting support, include as much of the following information as possible to help us resolve your issue quickly: **1. Describe the issue** Explain what you were trying to do, what happened, and what you expected to happen. Be as specific as possible. **2. Include error messages** Copy the exact error message text. If there is an error code or request ID, include that as well. **3. Add screenshots or recordings** A screenshot or short screen recording often tells us more than a description alone. Capture the full browser window including the URL bar. **4. Note your environment** Tell us which browser and version you are using, your operating system, and whether you are on desktop or mobile. **5. Provide reproduction steps** If the issue is reproducible, list the exact steps to trigger it. If it happens intermittently, note approximately when it occurred. ## Feature Requests We actively collect and prioritize feature requests from our users. To submit a feature request: 1. Email **[feedback@play2sell.com](mailto:feedback@play2sell.com)** with the subject line "Feature Request: \[brief description]" 2. Describe the feature, the problem it solves, and how you would use it 3. Our product team reviews all requests and considers them for the roadmap > [!TIP] > > Feature requests that clearly describe the business problem (not just the desired solution) help our team design the best possible implementation. ## Security Concerns To report a security vulnerability: * Email **[security@play2sell.com](mailto:security@play2sell.com)** * Do not disclose the vulnerability publicly until we have addressed it * Include detailed reproduction steps * We will acknowledge receipt within 24 hours and keep you informed of the resolution ## Sales Inquiries For questions about plans, pricing, or enterprise agreements: * **Email**: [sales@play2sell.com](mailto:sales@play2sell.com) * **Website**: [play2sell.com](https://play2sell.com) ## Useful Links | Resource | URL | | - | - | | SalesOS App | [app.play2sell.com](https://app.play2sell.com) | | Company Website | [play2sell.com](https://play2sell.com) | | Documentation | You are here | | Status Page | [status.play2sell.com](https://status.play2sell.com) | # Admin FAQ Source: https://docs.play2sell.com/support/faq/admin Frequently asked questions about SalesOS administration — users, teams, settings, and billing. # Admin FAQ Common questions about administering your SalesOS workspace. > [accordion] How do I invite new users? > > Go to **Admin > Users** and click **Invite User**. Enter the user's email, name, role, and optional team assignment. They will receive an invitation email with a link to create their account. > > For bulk invites, click **Bulk Invite** and upload a CSV file. See the [Invites guide](/admin/users/invites) for details. > [accordion] What happens when I deactivate a user? > > Deactivating a user: > > * Prevents them from logging in > * Preserves all their data (deals, leads, notes) > * Frees up a seat on your plan > * Does not delete anything > > You can reactivate the user later. Their data and history remain intact. If you need to reassign their deals, do so before or after deactivation from the user management panel. > [accordion] How do I change someone's role? > > Go to **Admin > Users**, find the user, and click their name. Change the **Role** dropdown to the desired role and click **Save**. The change takes effect immediately. > > Available roles: Admin, Manager, Sales Rep, and any custom roles you have created. > [accordion] Can I have multiple admins? > > Yes. You can assign the Admin role to as many users as needed. However, we recommend limiting admin access to a small number of trusted users, as admins have full access to all settings, data, and billing. > [accordion] How do I change our subscription plan? > > Go to **Admin > Billing > Plans**. Click **Change Plan**, select the new tier, review the changes, and confirm. > > * **Upgrades** take effect immediately (prorated charge) > * **Downgrades** take effect at the end of the current billing period > [accordion] What counts as a user toward my plan limit? > > Every active or invited user counts toward your plan's user limit. Deactivated users do not count. Pending invitations that have not been accepted also count toward the limit. > > If you need to free up a seat, either deactivate a user or revoke a pending invitation. > [accordion] Can I customize the gamification point values? > > Yes. Go to **Admin > Gamification > Point Settings**. You can adjust the point values for each activity type (creating leads, closing deals, etc.) and the value bonus multiplier. Changes apply to future activities only — existing points are not recalculated. > [accordion] How do I create custom badges? > > Custom badge creation is available on Enterprise plans. Go to **Admin > Gamification > Badges** and click **Create Badge**. Define the name, image, criteria, and point reward. Custom badges follow the OpenBadges standard just like the default ones. > [accordion] How do I export all company data? > > Go to **Admin > Data Management > Export All**. Select which entities to include (deals, leads, users, activities) and click **Generate Export**. The system prepares the export in the background and emails you a download link when ready. See the [Export guide](/admin/reports/export) for more details. > [accordion] Can I delete my company's SalesOS workspace? > > Workspace deletion must be requested through our support team. This is a permanent action that deletes all data, users, and configuration. Contact [support](/support/contact) to initiate the process. You will be asked to confirm multiple times given the irreversibility. # General FAQ Source: https://docs.play2sell.com/support/faq/general Frequently asked questions about SalesOS — account, platform, compatibility, and general usage. # General FAQ Common questions about SalesOS, your account, and the platform. > [accordion] What is SalesOS? > > SalesOS is a sales management platform that combines CRM capabilities, gamification, and automation. It helps sales teams manage leads and deals through a visual pipeline, stay motivated with rankings and badges, and save time with automated workflows. Access it at [app.play2sell.com](https://app.play2sell.com). > [accordion] What browsers does SalesOS support? > > SalesOS works on all modern browsers: > > * Google Chrome (recommended, latest 2 versions) > * Mozilla Firefox (latest 2 versions) > * Microsoft Edge (latest 2 versions) > * Safari (latest 2 versions) > > Internet Explorer is not supported. We recommend Chrome for the best experience. > [accordion] Is there a mobile app? > > SalesOS is a web application optimized for desktop and tablet browsers. The interface is responsive and works on mobile devices, though the full desktop experience is recommended for pipeline management and reporting. A dedicated mobile app is on our product roadmap. > [accordion] How do I reset my password? > > 1. Go to [app.play2sell.com](https://app.play2sell.com) > 2. Click **Forgot password?** below the login form > 3. Enter your email address > 4. Check your inbox for a password reset link > 5. Click the link and set a new password > > The reset link expires after 1 hour. If you do not receive the email, check your spam folder or contact your administrator. > [accordion] Can I change my email address? > > Your email address is tied to your authentication account and cannot be changed by you directly. Contact your company administrator to update your email address. > [accordion] How is my data protected? > > SalesOS takes security seriously: > > * All data is encrypted in transit (TLS/HTTPS) and at rest > * Authentication uses an industry-standard OAuth/JWT identity platform > * Role-based access control limits who can see and modify data > * All actions are logged in an audit trail > * Regular backups ensure data durability > * Infrastructure hosted on secure cloud providers > > For detailed security information, contact our team. > [accordion] What languages does SalesOS support? > > SalesOS is available in: > > * English > * Portuguese (Brazil) > * Spanish > > The language is set per user in their profile settings. Administrators can set a default language for the workspace. > [accordion] Is there a free trial? > > Contact our sales team to discuss trial options for your organization. We offer guided trials where our team helps you set up and evaluate the platform with your real data and workflows. > [accordion] How do I get support? > > See our [Contact page](/support/contact) for all support channels, including email, chat, and priority support for Enterprise customers. > [accordion] Where is SalesOS data stored? > > SalesOS data is hosted on cloud infrastructure with servers in secure data centers. Data residency options may be available for Enterprise customers — contact our team for details. # Sales FAQ Source: https://docs.play2sell.com/support/faq/sales Frequently asked questions about sales features — pipeline, leads, deals, and day-to-day usage. # Sales FAQ Common questions about using the sales features in SalesOS. > [accordion] How do I create a new deal? > > There are several ways to create a deal: > > 1. Click **+ New Deal** at the top of the Pipeline view > 2. Press `N` on your keyboard while on the Pipeline page > 3. Convert an existing lead by opening it and clicking **Convert to Deal** > 4. Use the API to create deals programmatically > > Fill in the deal name, value, expected close date, and initial stage, then click **Create**. > [accordion] Can I customize the pipeline stages? > > Yes, but only administrators can modify pipeline stages. Go to **Admin > Pipeline Settings** to: > > * Add, remove, or rename stages > * Reorder stages > * Set probability percentages for each stage > * Define required fields per stage > > If you are a sales rep and need stage changes, request them from your administrator. > [accordion] How do I import leads from a spreadsheet? > > 1. Go to **Leads** and click **Import** > 2. Download the CSV template > 3. Fill in your lead data following the template format > 4. Upload the CSV file > 5. Map your columns to SalesOS fields > 6. Review the preview and click **Import** > > The system validates data and flags duplicates. Maximum 5,000 leads per import. > [accordion] What happens when I move a deal to Closed Won? > > When you close a deal as won: > > * The deal moves to the Closed Won stage > * You earn gamification points (base points + value bonus) > * A notification is posted to the #wins channel > * Any automation workflows configured for deal.won trigger > * The revenue counts toward your stats and forecasts > * If SalesOS Pay is active, invoice and NFS-e generation may be triggered > [accordion] Can I reopen a closed deal? > > Yes. Open the closed deal and click **Reopen Deal**. Select the stage you want to return it to. The deal reappears on the pipeline board. Note that reopening a deal does not reverse the gamification points that were already awarded or deducted. > [accordion] How does lead assignment work? > > Leads can be assigned in three ways: > > * **Manual** — The creator or an admin assigns the lead to a specific rep > * **Round-robin** — New leads are automatically distributed evenly across team members > * **Weighted** — Leads are distributed based on weights (capacity) assigned to each rep > > Your admin configures the distribution method in **Admin > Teams > Lead Distribution**. > [accordion] What is the difference between a lead and a deal? > > A **lead** is a potential customer who has shown interest but has not entered your sales pipeline yet. Leads are in the qualification phase. > > A **deal** (or opportunity) is an active sales opportunity with an estimated value and expected close date, managed on the pipeline board. > > When a lead is qualified, you convert it to a deal. The lead data carries over to the new deal record. > [accordion] Can I see other team members' deals? > > Visibility depends on your role: > > * **Sales Rep** — You see your own deals only (unless others share deals with you) > * **Manager** — You see deals for everyone on your team > * **Admin** — You see all deals across the organization > > Your admin can create custom roles with different visibility rules. > [accordion] How do I set up deal filters? > > On the Pipeline or Deals list view: > > 1. Click the **Filter** button > 2. Select filter criteria (stage, owner, value range, date, tags, etc.) > 3. Apply the filters > 4. Optionally click **Save View** to save the filter combination for quick access later > [accordion] What are deal tags and how do I use them? > > Tags are labels you can apply to deals for organization and filtering. Common uses: > > * Product type (Enterprise, SMB, Startup) > * Priority (Hot, Warm, Cold) > * Campaign source (Q1 Campaign, Webinar Lead) > * Any custom categorization > > Add tags when creating or editing a deal. Filter by tags on the pipeline or list view. # Technical FAQ Source: https://docs.play2sell.com/support/faq/technical Frequently asked questions about SalesOS technical topics — API, integrations, security, and infrastructure. # Technical FAQ Technical questions about the SalesOS API, integrations, security, and infrastructure. > [accordion] What authentication does the API use? > > The SalesOS API uses JWT (JSON Web Tokens) issued by our identity service. You can obtain tokens via: > > * **Client Credentials** flow for server-to-server integrations > * **Authorization Code** flow for applications acting on behalf of a user > > All requests must include the token in the `Authorization: Bearer ` header. See the [Authentication guide](/api/authentication) for details. > [accordion] What are the API rate limits? > > Rate limits depend on your plan: > > * **Starter**: 100 requests/minute > * **Professional**: 500 requests/minute > * **Enterprise**: 2,000 requests/minute > > Rate limit information is included in response headers (`X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`). When exceeded, the API returns `429 Too Many Requests`. > [accordion] Does SalesOS support SSO / SAML? > > SSO via SAML is available on the Enterprise plan. SalesOS supports SAML, OIDC, and social-login connections. Contact our team to configure SSO for your organization. > [accordion] How do webhooks handle failures? > > If your webhook endpoint does not return a `2xx` response, SalesOS retries with exponential backoff: > > * 1st retry after 1 minute > * 2nd retry after 5 minutes > * 3rd retry after 30 minutes > * 4th retry after 2 hours > * 5th retry after 12 hours > > After 5 failures, the event is marked as failed. After 10 consecutive failures across any events, the webhook is automatically deactivated. > [accordion] Can I use the API to bulk import data? > > Yes. Use the POST endpoints for leads and deals in a loop. Respect rate limits by implementing appropriate delays between requests. For very large imports (10,000+ records), contact support for a bulk import solution that bypasses rate limits. > [accordion] What data format does the API use? > > The API exclusively uses JSON. All request bodies must be `Content-Type: application/json`. Dates use ISO 8601 format (`2026-03-15T14:30:00Z`). Currency values are plain numbers (not formatted strings). > [accordion] Is there a sandbox / staging environment? > > Yes. SalesOS provides a staging environment for testing integrations without affecting production data. The staging API base URL and credentials are available in your **Admin > Integrations > API Keys** panel. Staging data is reset periodically. > [accordion] How do I debug API errors? > > All error responses include: > > * An HTTP status code indicating the error category > * An error `code` string for programmatic handling > * A human-readable `message` > * A `details` array for validation errors (which fields failed) > * A `request_id` for support reference > > Include the `request_id` when contacting support about API issues. > [accordion] Can I connect SalesOS to my own automation tool? > > Yes. Any tool that can make signed HTTP requests works: create an API key, sign requests as described in [Authentication](/api/authentication), and subscribe to [webhooks](/api/integrations/webhooks) for the events you care about. > [accordion] What is the maximum payload size for API requests? > > The maximum request body size is 1MB. File uploads (attachments) are handled through a separate upload endpoint with a 50MB limit per file. # Integration Troubleshooting Source: https://docs.play2sell.com/support/troubleshooting/integrations Troubleshoot common integration issues — API errors, webhook failures, and NFS-e issuance. # Integration Troubleshooting Common issues when connecting SalesOS with external tools, and how to resolve them. ## API Connection Issues ### 401 Unauthorized **Symptom**: API returns `401 Unauthorized` for every request. **Causes and solutions**: > [accordion] Token expired > > JWT tokens expire after 24 hours. Request a new token using your client credentials or refresh token. See the [Authentication guide](/api/authentication). > [accordion] Token missing or malformed > > Ensure the Authorization header is formatted as `Bearer YOUR_TOKEN` (with a space after "Bearer"). Do not include quotes around the token. > [accordion] Wrong audience > > When requesting a token, the `audience` parameter must be `https://api.play2sell.com`. An incorrect audience generates a valid token that SalesOS does not accept. > [accordion] Revoked API client > > Your API client may have been deleted or deactivated by an administrator. Check **Admin > Integrations > API Keys** to verify. ### 403 Forbidden **Symptom**: API returns `403 Forbidden` for specific endpoints. **Solution**: Your API client does not have the required scope. Edit the API client in **Admin > Integrations > API Keys** and add the necessary scopes (e.g., `leads:write`, `deals:read`). ### 429 Too Many Requests **Symptom**: API returns `429` after many rapid requests. **Solution**: You have exceeded your rate limit. Implement these strategies: 1. Check the `Retry-After` header for when you can resume 2. Add delays between requests (especially in loops) 3. Use pagination efficiently — fetch larger pages to reduce total requests 4. Cache responses where possible 5. Consider upgrading your plan for higher limits ## Webhook Issues ### Webhooks Not Firing If you are not receiving webhook events: **1. Check webhook status** Go to **Admin > Integrations > Webhooks**. Verify the webhook is set to **Active**. **2. Verify the URL** Ensure the webhook URL is correct and uses HTTPS. HTTP URLs are rejected. **3. Check event subscriptions** Confirm you are subscribed to the correct event types. A webhook set to `deal.won` will not fire for `deal.created`. **4. Check the delivery log** Open the webhook details and review the delivery log. Failed deliveries show the HTTP status code and error message from your server. **5. Test your endpoint** Use `curl` to send a test POST request to your webhook URL and verify it returns `200`. ### Webhook Receiving Duplicate Events **Cause**: Retries due to slow or failed responses from your server. **Solution**: * Ensure your server responds with `200` within 10 seconds * Use the event `id` field for deduplication * Process payloads asynchronously — respond immediately, handle the data in a background job ### Webhook Auto-Deactivated **Cause**: 10 consecutive delivery failures automatically deactivate the webhook. **Solution**: 1. Fix the underlying issue with your endpoint 2. Go to **Admin > Integrations > Webhooks** 3. Reactivate the webhook 4. Test with a manual event to confirm it works ## NFS-e Issues ### Client Registration Fails * Verify the CNPJ/CPF is valid (correct number of digits, valid check digits) * Ensure all required fields are filled: name, CNPJ/CPF, address * Check if the client already exists (duplicate CNPJ) ### NFS-e Issuance Fails Common errors: | Error | Solution | | - | - | | Invalid service code | Select a valid municipal service code | | Client not found | Register the client first | | Tax authority unavailable | Wait and retry — municipal systems have scheduled maintenance | | Invalid tax configuration | Review your tax regime settings with your accountant | > [!WARNING] > > NFS-e errors sometimes carry Portuguese messages from the municipal tax authority. If you cannot interpret the error, contact SalesOS support together with your accountant. ## General Troubleshooting Steps If none of the specific solutions above help: 1. **Check the SalesOS status page** for any ongoing incidents 2. **Review recent changes** — Did someone modify API keys, webhook URLs, or integration settings? 3. **Test with minimal configuration** — Create a simple test (e.g., a single API call) to isolate the issue 4. **Check logs** — Review webhook delivery logs and your server logs 5. **Contact support** — Include error messages, request IDs, and reproduction steps > [card] [API Conventions](/api/conventions) > > Review API documentation > [card] [Contact Support](/support/contact) > > Get help from our team # Login Issues Source: https://docs.play2sell.com/support/troubleshooting/login Required two-step verification (authenticator app) for the Dashboard, plus fixes for password reset, SSO errors, locked accounts, and browser issues. # Login Issues Having trouble logging in to SalesOS? Follow the troubleshooting steps below for common login problems. ## Dashboard: two-step verification is required > [!NOTE] > > **To access the Dashboard, you now need to set up an authenticator app.** The first time you sign in to the Dashboard after this change, the Dashboard itself asks you to set it up. It takes about 1 minute, and you can't enter the Dashboard without it. **What changed:** after your password (or Google), signing in to the **Dashboard** ([dashboard.play2sell.com](https://dashboard.play2sell.com)) asks for a 6-digit code from an authenticator app on your phone. You may also know this as **two-factor authentication**, **2FA**, **MFA** or "the Google Authenticator code". **Why:** the Dashboard is where your company manages its team and approves payments. With the second step, someone who learns your password still can't get into the Dashboard without your phone. > [!NOTE] > > The agent app and [app.play2sell.com](https://app.play2sell.com) work as before. Two-step verification applies only to the Dashboard. People who only receive payments (payees) don't use the Dashboard and don't need to set anything up. > [!TIP] > > **Before you start:** have your phone at hand, with an authenticator app installed and date and time set to automatic. ### First Dashboard sign-in: set up your authenticator app You do this once, inside the Dashboard sign-in itself. **1. Install an authenticator app on your phone** Any app that generates 6-digit codes works: **Google Authenticator**, **Microsoft Authenticator**, **1Password** and others. **2. Sign in to the Dashboard as usual** After your email and password (or Google), the Dashboard shows **Secure your account** with a QR code. ![Dashboard 'Secure your account' screen with the QR code (blurred in this image) and the one-time code field](https://mintcdn.com/play2sell/0dHz51sSxpD8jaYj/images/support/mfa-cadastro-qr.png?fit=max\&auto=format\&n=0dHz51sSxpD8jaYj\&q=85\&s=c8026f08e889cf5e16fcf9eaf40ac481) **3. Scan the QR code with the app** In the authenticator app, tap **add** (usually a **+**) and point the camera at the QR code. If the camera can't read it, tap **Trouble scanning?** to see a text code you can type into the app. **4. Enter the 6-digit code** The app shows a code that changes every 30 seconds. Type the current code into the Dashboard and tap **Continue**. **5. Save your recovery code** The Dashboard then shows a **recovery code**. It is shown **only once**: store it somewhere safe (a password manager is ideal). It's how you get into the Dashboard if you lose or replace your phone. > [!WARNING] > > The QR code is the key to your account. Don't photograph it, screenshot it or share it with anyone, including support. Play2sell will never ask for your QR code or your 6-digit codes. ### Next Dashboard sign-ins * After your Dashboard password, enter the 6-digit code currently shown in the app. * If you tick **remember this browser**, the Dashboard won't ask for the code in that browser for up to 30 days (or 7 days without signing in). Don't tick it on a shared computer. * A new browser, private window or another computer asks for the code again. That's expected. ### Dashboard two-step verification issues > [accordion] The Dashboard says my code is invalid > > 1. Use the code shown **right now**: it changes every 30 seconds. If it's about to expire, wait for the next one. > 2. Make sure you're reading the **Play2sell** entry in the app (if you have several). > 3. Set your phone's clock to **automatic date and time**. Authenticator codes depend on the correct time; a clock a few minutes off produces rejected codes. > [accordion] I replaced or lost my phone and can't get into the Dashboard > > On the code screen, choose the option to **use a recovery code** and enter the code you saved during setup. After you're in the Dashboard, set up the app on your new phone. > > If you no longer have the recovery code, [contact support](/support/contact). We'll verify your identity and enable a new setup. For your security, this isn't done over chat without that verification. > [accordion] The camera can't read the Dashboard QR code > > Tap **Trouble scanning?**. A text code appears: in the authenticator app, choose **enter a setup key** (or similar) and type that code. > [accordion] The Dashboard showed a message that two-step verification couldn't be completed > > The Dashboard sign-in was interrupted before verification finished. Sign in to the Dashboard again and enter the code from the app. If you replaced your phone, use your recovery code. If the message keeps appearing, [contact support](/support/contact) and include the detail shown below the message. > [accordion] I sign in to the Dashboard with Google: do I need the code too? > > Yes. Dashboard two-step verification applies to any sign-in method: email and password or Google. ## I Forgot My Password **1. Go to the login page** Navigate to [app.play2sell.com](https://app.play2sell.com). **2. Click Forgot Password** Click the **Forgot password?** link below the login form. **3. Enter your email** Type the email address associated with your SalesOS account. **4. Check your inbox** Look for an email from SalesOS with a password reset link. Check your spam/junk folder if you do not see it within a few minutes. **5. Set a new password** Click the link in the email and create a new password. The link expires after 1 hour. > [!NOTE] > > If you do not receive the reset email after 5 minutes, verify that you are using the correct email address. If the problem persists, contact your administrator — they can trigger a password reset from the admin panel. ## Incorrect Password If you receive an "Incorrect email or password" error: * **Check for typos** — Make sure Caps Lock is off and there are no extra spaces * **Try your password in a text editor** — Type it in a visible field first to confirm it is correct * **Reset your password** — Use the Forgot Password flow above if you are unsure of your current password * **Check the email** — Ensure you are using the email address that received the invitation ## Account Locked After multiple failed login attempts, your account may be temporarily locked for security: * **Wait 15 minutes** — The lock expires automatically * **Do not keep trying** — Each failed attempt during lockout resets the timer * **Contact your administrator** — They can unlock your account immediately from the admin panel ## SSO / Single Sign-On Issues If your company uses SSO and you are having trouble: > [accordion] SSO button does not appear > > SSO is configured at the company level. If you do not see an SSO button on the login page, your company may not have SSO enabled. Contact your administrator. > [accordion] SSO redirects but fails > > This usually means your identity provider (IdP) session has expired. Try: > > 1. Log in to your company's IdP (Okta, Azure AD, Google Workspace, etc.) first > 2. Then try the SalesOS SSO login again > 3. If it still fails, clear your browser cookies and try once more > [accordion] Error: User not authorized > > Your SalesOS account may not be linked to your SSO identity. Contact your administrator to verify that your email matches between SalesOS and the identity provider. ## Browser Issues If the login page does not load or behaves unexpectedly: ### Clear Browser Cache 1. Open your browser settings 2. Navigate to **Privacy** or **History** 3. Click **Clear browsing data** 4. Select **Cached images and files** and **Cookies** 5. Clear for "All time" 6. Reload [app.play2sell.com](https://app.play2sell.com) ### Try an Incognito/Private Window Open an incognito window and try logging in. If it works, a browser extension or cached data is likely causing the issue. ### Check Browser Compatibility SalesOS requires a modern browser. Ensure you are using: * Chrome 90 or newer * Firefox 90 or newer * Safari 15 or newer * Edge 90 or newer ### Disable Browser Extensions Ad blockers, privacy extensions, or VPN extensions can sometimes interfere with the login process. Try disabling them temporarily. ## Invitation Link Expired If your invitation link has expired (after 7 days): 1. Contact your company administrator 2. Ask them to **Resend** the invitation from **Admin > Users** 3. Check your email for the new invitation link 4. Click the link and complete your account setup > [!WARNING] > > Do not ask a colleague to share their invitation link with you. Each invitation is unique and tied to a specific email address. ## Still Having Issues? If none of the above solutions resolve your problem: 1. Note the exact error message you see 2. Take a screenshot if possible 3. Note which browser and version you are using 4. Contact [SalesOS support](/support/contact) with these details # Performance Issues Source: https://docs.play2sell.com/support/troubleshooting/performance Troubleshoot slow loading, lag, and performance problems in SalesOS. # Performance Issues If SalesOS feels slow or unresponsive, follow these troubleshooting steps to identify and resolve the issue. ## Quick Checks Before diving into detailed troubleshooting, try these quick fixes: **1. Refresh the page** Press `Ctrl + Shift + R` (Windows/Linux) or `Cmd + Shift + R` (Mac) to do a hard refresh that clears the page cache. **2. Check your internet connection** Run a speed test at [fast.com](https://fast.com). SalesOS requires a stable connection with at least 5 Mbps download speed. **3. Try a different browser** Open SalesOS in a different browser to rule out browser-specific issues. **4. Check the status page** Visit the SalesOS status page to see if there is an ongoing incident affecting performance. ## Slow Page Loading ### Browser Cache A full or corrupted browser cache can slow down page loading: 1. Open browser settings 2. Go to **Privacy** or **History** 3. Click **Clear browsing data** 4. Select **Cached images and files** (not passwords or form data) 5. Clear and reload SalesOS ### Too Many Open Tabs Each open tab consumes memory. If you have many tabs open: * Close tabs you are not actively using * Keep SalesOS in a dedicated browser window * Consider using a browser extension to suspend inactive tabs ### Browser Extensions Some extensions can interfere with SalesOS: * **Ad blockers** — May block API calls or resources * **Privacy extensions** — May block cookies needed for authentication * **Heavy extensions** — Extensions that monitor all page content slow down rendering Try disabling extensions one by one to identify the culprit, or test in an incognito window (where most extensions are disabled by default). ## Pipeline View Performance If the pipeline specifically is slow: > [accordion] Too many deal cards visible > > A pipeline with hundreds of visible cards can be slow to render. Use filters to reduce the number of visible deals: > > * Filter by owner (show only your deals) > * Filter by date range > * Filter by priority or tags > * Save the filtered view for quick access > [accordion] Large custom field payloads > > Deals with many custom fields take longer to load. If your admin has added a large number of custom fields, consider whether all of them need to display on the card summary view. > [accordion] Drag and drop lag > > If dragging cards between stages feels sluggish: > > * Reduce the number of visible cards with filters > * Close other browser tabs to free up memory > * Use the card menu to change stages instead of drag and drop ## Search Performance If global search or filtering is slow: * **Be specific** — Use more specific search terms instead of single characters * **Use filters** — Combine search with filters to narrow the dataset * **Wait for debounce** — Search triggers after you stop typing for 300ms; do not press Enter repeatedly ## Real-Time Updates If chat messages, notifications, or pipeline updates are delayed: ### WebSocket Connection SalesOS uses WebSocket connections for real-time features. If real-time updates are not working: 1. Check if your network or firewall blocks WebSocket connections 2. Corporate proxies sometimes strip WebSocket upgrade headers 3. VPNs can interfere with persistent connections **Test**: Open the browser developer console (F12) and check the **Network** tab for WebSocket connections to SalesOS. If you see connection failures, contact your IT team about WebSocket support. ### Notifications Delayed If notifications arrive late: * Check that desktop notifications are enabled in your browser * Verify your notification preferences in SalesOS settings * Ensure you have not enabled Do Not Disturb mode * Check if your browser is throttling background tabs (some browsers reduce activity for inactive tabs) > [!TIP] > > Pin the SalesOS tab in your browser. Pinned tabs are typically exempt from background throttling and maintain their WebSocket connections. ## Data Export Slowness Large exports can take time to prepare: * Exports with fewer than 1,000 records should be nearly instant * Exports with 1,000-10,000 records may take 30 seconds to a few minutes * Exports with 10,000+ records are processed in the background; you receive an email when ready To speed up exports, apply filters to reduce the dataset size. ## Device-Specific Issues ### Low-End Devices If you are on an older or low-powered device: * Close unnecessary applications and browser tabs * Use the list view instead of the Kanban pipeline view (lighter rendering) * Avoid having multiple SalesOS tabs open simultaneously * Disable browser animations in accessibility settings ### Mobile Devices SalesOS on mobile may feel slower due to: * Smaller screens require more scrolling and navigation * Mobile browsers have less memory available * Cellular connections may have higher latency For the best experience, use SalesOS on a desktop or laptop computer. ## When to Contact Support If performance issues persist after trying the above solutions, contact support with: * Your browser name and version * Your operating system * Your approximate location (for network routing analysis) * Which specific pages or actions are slow * A screenshot of the browser developer console (Network tab) showing slow requests * The approximate time when you experienced the issue > [card] [Login Issues](/support/troubleshooting/login) > > Trouble accessing your account? > [card] [Contact Support](/support/contact) > > Get help from our team # Chat Source: https://docs.play2sell.com/user-guide/communication/chat Communicate with your team using SalesOS built-in chat — channels, direct messages, and deal discussions. # Chat SalesOS includes a built-in chat system so your team can communicate without switching to a separate app. Discuss deals, share updates, celebrate wins, and coordinate — all within the platform. ## Accessing Chat Click **Chat** in the sidebar or press `G` then `C`. The chat interface opens with your conversations on the left and the message area on the right. ## Channels Channels are group conversations organized by topic. They are visible to all members who join them. ### Default Channels Every SalesOS workspace starts with these channels: * **#general** — Company-wide announcements and discussions * **#sales** — Sales team conversations * **#wins** — Automatic posts when deals are closed (celebration channel) * **#random** — Off-topic conversations ### Creating a Channel **1. Click the + icon next to Channels** In the chat sidebar, click the plus icon. **2. Set channel details** Enter a channel name, description, and choose whether it is public or private. **3. Add members** Invite team members to the channel. For public channels, anyone can join later. **4. Create** Click **Create Channel** and start the conversation. > [!NOTE] > > Private channels are only visible to invited members. Use them for sensitive discussions like management topics or specific deal teams. ## Direct Messages Send private messages to any team member: 1. Click **New Message** or the compose icon 2. Type the person's name to find them 3. Start typing your message 4. Press Enter to send You can also create group direct messages with up to 8 people for small team discussions that do not need a full channel. ## Message Features ### Text Formatting SalesOS chat supports rich text formatting: * **Bold** — Surround text with `**asterisks**` * *Italic* — Surround text with `*single asterisks*` * `Code` — Surround text with backticks * Links — Paste a URL and it auto-links * Mentions — Type `@` followed by a name to notify someone ### File Sharing Drag and drop files into the chat, or click the attachment icon. Supported file types include images, PDFs, documents, and spreadsheets up to 25MB. ### Reactions React to messages with emoji by hovering over a message and clicking the reaction icon. Reactions are a quick way to acknowledge a message without sending a reply. ### Threading Reply to a specific message to create a thread: 1. Hover over the message 2. Click the **Reply in thread** icon 3. Type your reply in the thread panel Threads keep conversations organized and prevent important discussions from being lost in a busy channel. ## Deal Discussions When viewing a deal in the pipeline, you can start a chat directly from the deal card: 1. Open the deal detail view 2. Click the **Chat** tab 3. Messages here are linked to the deal and visible to all deal participants This is useful for discussing strategy, sharing updates, or coordinating next steps without leaving the deal context. > [!TIP] > > Use deal discussions instead of channels when the conversation is specific to one opportunity. This keeps the context together with the deal history. ## Notifications Chat notifications follow your general notification settings: * **Desktop notifications** — Browser notifications for new messages * **Sound** — Audio alert for incoming messages * **Badge count** — Unread message count on the Chat icon * **Mute** — Mute specific channels or conversations to stop notifications ### Do Not Disturb Enable **Do Not Disturb** mode to pause all chat notifications: 1. Click your avatar in the bottom-left 2. Select **Do Not Disturb** 3. Choose a duration (30 min, 1 hour, 4 hours, until tomorrow, custom) ## Search Use the search bar at the top of the chat to find messages, files, or people: * Search by keyword across all conversations * Filter by channel, person, or date range * Find shared files by name ## Next Steps > [card] [Notifications](/user-guide/communication/notifications) > > Configure your notification preferences > [card] [Teams](/admin/users/teams) > > Set up teams for organized communication # Notifications Source: https://docs.play2sell.com/user-guide/communication/notifications Configure notification settings — control what alerts you receive, how, and when. # Notifications SalesOS sends notifications to keep you informed about important events — new leads, deal updates, chat messages, ranking changes, and more. You can customize what you receive and how. ## Notification Types > [accordion] Sales Notifications > > * A new lead is assigned to you > * A deal is moved to a new stage > * A deal you own is approaching its close date > * A deal has been stale for too long > * A deal value or owner changes > [accordion] Gamification Notifications > > * You earned a new badge > * Your ranking position changed > * A new challenge is available > * Challenge progress milestones (50%, 75%, 100%) > * Challenge results are announced > [accordion] Communication Notifications > > * New chat message in a channel you follow > * Direct message received > * You were mentioned in a message > * Thread reply on a message you participated in > [accordion] Task Notifications > > * A task is assigned to you > * A task is due today > * A task is overdue > * A task you created was completed > [accordion] System Notifications > > * Your profile was updated by an admin > * New team member joined > * Scheduled report is ready > * System maintenance announcements ## Notification Channels SalesOS delivers notifications through three channels: | Channel | Description | Best For | | - | - | - | | **In-app** | Bell icon badge and notification panel inside SalesOS | All notifications — your primary feed | | **Desktop** | Browser push notifications | Urgent items when SalesOS is in a background tab | | **Email** | Notification emails to your account email | Important updates when you are away from the platform | ## Configuring Preferences **1. Open notification settings** Click your avatar in the bottom-left corner, then select **Notification Preferences**. **2. Choose per-category settings** For each notification type, toggle which channels should be active (in-app, desktop, email). **3. Set quiet hours** Define hours during which non-urgent notifications are held and delivered later (e.g., 10 PM to 7 AM). **4. Save** Click **Save Preferences** to apply your settings. ### Recommended Settings > [tab] Sales Reps > > * **In-app**: Everything enabled > * **Desktop**: New lead assignments, deal stage changes, task due dates > * **Email**: Daily digest only > * **Quiet hours**: 9 PM to 7 AM > [tab] Managers > > * **In-app**: Everything enabled > * **Desktop**: Deal closings, team ranking changes, challenge updates > * **Email**: Daily digest + deal closings > * **Quiet hours**: 10 PM to 6 AM ## Notification Center Click the bell icon in the top-right corner to open the notification center. It shows: * **Unread notifications** at the top, highlighted * **Read notifications** below, in chronological order * **Mark all as read** button to clear the badge count * **Filter** by notification type Each notification includes: * An icon indicating the type * A brief description of what happened * Timestamp * A link to the relevant item (deal, lead, chat, etc.) > [!TIP] > > Click any notification to go directly to the related item. For example, clicking a "deal stage changed" notification opens that deal in the pipeline. ## Do Not Disturb When you need to focus, enable Do Not Disturb mode: * All desktop and sound notifications are paused * In-app notifications still accumulate silently * Email notifications are held until DND ends * A DND indicator appears on your avatar so teammates know ## Email Digest Instead of individual email notifications, you can opt for a digest: * **Daily digest** — One email at the end of the day summarizing all activity * **Weekly digest** — A summary email sent every Monday morning This reduces inbox clutter while keeping you informed. > [!NOTE] > > Even with digests enabled, certain critical notifications (like being assigned a high-priority lead) will still be sent immediately via email. ## Next Steps > [card] [Chat](/user-guide/communication/chat) > > Learn about chat notification controls > [card] [Getting Started](/user-guide/getting-started) > > Review your overall profile settings # Badges Source: https://docs.play2sell.com/user-guide/gamification/badges Earn digital badges for sales achievements — powered by the OpenBadges standard. # Badges SalesOS uses a badge system powered by the [OpenBadges](https://openbadges.org/) standard to recognize and reward sales achievements. Badges are visual tokens that appear on your profile and can be shared externally. ## How Badges Work Badges are awarded automatically when you meet specific criteria. Each badge has: * **Name** — The badge title * **Description** — What the badge represents * **Visual** — A unique icon/image * **Criteria** — The specific conditions required to earn it * **Points** — Bonus points awarded when earned * **Rarity** — How difficult the badge is to earn ## Badge Categories > [tab] Sales Milestones > > Badges earned by reaching sales targets: > > | Badge | Criteria | Points | > | - | - | - | > | **First Blood** | Close your first deal | 25 | > | **Deal Maker** | Close 10 deals | 50 | > | **Closer** | Close 50 deals | 100 | > | **Sales Machine** | Close 100 deals | 200 | > | **Revenue Hunter** | Close \$100K in total revenue | 150 | > | **Big Fish** | Close a single deal worth \$50K+ | 100 | > [tab] Activity > > Badges earned through consistent platform usage: > > | Badge | Criteria | Points | > | - | - | - | > | **First Steps** | Complete your profile | 10 | > | **Networker** | Create 50 leads | 30 | > | **Prospector** | Qualify 25 leads | 40 | > | **Streak Master** | Log activity 30 days in a row | 75 | > | **Early Bird** | Log activity before 8 AM, 10 times | 25 | > | **Note Taker** | Add 100 notes to deals | 30 | > [tab] Team > > Badges earned through team collaboration: > > | Badge | Criteria | Points | > | - | - | - | > | **Team Player** | Send 50 chat messages | 15 | > | **Mentor** | Help 5 deals owned by others (via notes) | 30 | > | **Champion** | Finish first in a weekly ranking | 50 | > | **Unbeatable** | Hold first place for 4 consecutive weeks | 150 | > | **MVP** | Highest revenue in a quarter | 200 | > [tab] Special > > Limited-time or rare badges: > > | Badge | Criteria | Points | > | - | - | - | > | **Pioneer** | Be among the first 10 users in your company | 50 | > | **Perfect Month** | 100% task completion in a month | 75 | > | **Hat Trick** | Close 3 deals in a single day | 100 | > | **Comeback Kid** | Move a Closed Lost deal back to Closed Won | 60 | > [!NOTE] > > Your administrator can create custom badges specific to your company's goals and culture. The badges listed above are the default set. ## Viewing Your Badges ### Badge Gallery Navigate to the **Badges** section in the sidebar to see: * **Earned Badges** — All badges you have earned, with the date earned * **Available Badges** — Badges you can still earn, with progress indicators * **Locked Badges** — Badges with hidden criteria that are revealed as you get closer ### Progress Tracking For badges with numeric criteria (like "Close 10 deals"), you can see your current progress as a percentage bar. This helps you know exactly how close you are to earning the next badge. ### Badge Detail Click any badge to see: * Full description and criteria * Date earned (if applicable) * How many people in your company have earned it * Rarity percentage (what percentage of users have it) * Points awarded ## OpenBadges Standard SalesOS badges comply with the [OpenBadges 2.0 standard](https://www.imsglobal.org/spec/ob/v2p0/), which means: * Each badge is a verifiable digital credential * Badges contain metadata about the issuer, criteria, and recipient * You can export badges and display them on external platforms (LinkedIn, personal website) * Badge verification is cryptographically secure ### Exporting a Badge To share a badge externally: 1. Go to your earned badges 2. Click the badge you want to export 3. Click **Share / Export** 4. Choose your export option: * **Image** — Download the badge as a PNG with embedded metadata * **JSON** — Download the badge assertion in OpenBadges JSON format * **Link** — Get a verification URL that anyone can use to confirm the badge > [!TIP] > > Adding SalesOS badges to your LinkedIn profile showcases your sales achievements to your professional network. Use the image export and upload it as a certification. ## Badge Notifications You receive a notification whenever you earn a new badge: * In-app notification with a celebration animation * Email notification (if enabled) * Your team sees a feed entry about your achievement ## Next Steps > [card] [Challenges](/user-guide/gamification/challenges) > > Compete in time-limited sales challenges > [card] [Rankings](/user-guide/gamification/rankings) > > See how badges affect your ranking # Challenges Source: https://docs.play2sell.com/user-guide/gamification/challenges Compete in sales challenges — time-limited competitions with goals, prizes, and team motivation. # Sales Challenges Challenges are time-limited competitions created by managers or administrators to drive specific sales behaviors. They add an extra layer of motivation on top of the regular ranking system. ## How Challenges Work A challenge defines: * **Goal** — What participants need to achieve (e.g., close 5 deals, generate \$50K revenue) * **Duration** — Start and end date * **Participants** — Who is eligible (individual reps, specific teams, or everyone) * **Reward** — Bonus points, badges, or other recognition for winners * **Metric** — How progress is measured ## Active Challenges Navigate to the **Challenges** section in the sidebar to see: * **Active Challenges** — Currently running challenges you can participate in * **Upcoming** — Challenges scheduled to start soon * **Completed** — Past challenges with final results ### Challenge Card Each active challenge displays: * Challenge name and description * Time remaining (countdown) * Your current progress vs the goal * Leaderboard of top participants * Prize or reward information ## Types of Challenges > [accordion] Revenue Target > > Close deals totaling a specific revenue amount within the challenge period. Example: "Generate \$100K in new business this month." > [accordion] Deal Count > > Close a specific number of deals. Example: "Close 10 deals this week." > [accordion] Lead Generation > > Create and qualify a target number of leads. Example: "Qualify 30 new leads this month." > [accordion] Activity-Based > > Complete a target number of activities. Example: "Make 50 prospect calls this week" or "Log 20 meeting notes this month." > [accordion] Conversion Rate > > Achieve a target conversion rate from leads to deals. Example: "Maintain 25% or higher conversion rate this quarter." > [accordion] Team Challenge > > A collective goal where the entire team works together. Example: "As a team, close \$500K this month." Individual contributions are tracked but the goal is shared. ## Participating in a Challenge **1. View active challenges** Open the Challenges section to see what is currently running. **2. Join (if required)** Some challenges require you to opt in by clicking **Join Challenge**. Others automatically include all eligible participants. **3. Track your progress** Your progress updates in real time as you complete qualifying activities. The progress bar shows how close you are to the goal. **4. Check the leaderboard** See how you compare to other participants. The challenge leaderboard updates live. > [!TIP] > > Focus on challenges that align with your existing pipeline. If you have several deals near closing, a "Revenue Target" challenge is a natural fit. ## Challenge Rewards When a challenge ends, rewards are distributed: * **Winner** — The participant who best met or exceeded the goal * **Top 3** — Some challenges reward the top three performers * **All completers** — Some challenges reward everyone who met the goal Rewards typically include: * Bonus gamification points * Exclusive badges * Public recognition in the team feed * Custom rewards set by your administrator ## Challenge Notifications You receive notifications for: * A new challenge is available * A challenge you joined is starting * You are halfway to the goal * Someone overtakes you on the challenge leaderboard * The challenge is ending soon (24-hour warning) * Challenge results are announced > [!NOTE] > > Managers create challenges from the Admin panel. If you have an idea for a challenge, suggest it to your manager — great challenges come from the team. ## Next Steps > [card] [Rankings](/user-guide/gamification/rankings) > > See your overall ranking position > [card] [Chat](/user-guide/communication/chat) > > Discuss challenges with your team # Rankings Source: https://docs.play2sell.com/user-guide/gamification/rankings Understand how the SalesOS ranking system works — points, leaderboards, and how performance is measured. # Rankings The ranking system is at the heart of SalesOS gamification. It tracks sales performance through a points system and displays leaderboards that motivate your team through friendly competition. ## How Points Work Every sales activity in SalesOS earns points. The point values are designed to reward behaviors that drive revenue: | Activity | Points | | - | - | | Creating a new lead | 5 | | Qualifying a lead | 10 | | Converting a lead to a deal | 15 | | Moving a deal forward one stage | 10 | | Closing a deal (Won) | 50 + value bonus | | Completing a task on time | 5 | | Logging a note or activity | 2 | | Earning a badge | Varies by badge | ### Value Bonus When you close a deal, you earn a bonus based on the deal value. The formula is: **Value Bonus = Deal Value / 100** For example, closing a deal worth \$10,000 earns 50 base points + 100 value bonus = **150 points**. > [!NOTE] > > Point values and the value bonus multiplier can be customized by your administrator. The values shown above are defaults. ## Leaderboard The leaderboard shows all team members ranked by their total points for the selected period. ### Time Periods Switch between different time windows using the period selector: * **Today** — Points earned today only * **This Week** — Monday to current day * **This Month** — First of the month to current day * **This Quarter** — Current quarter * **All Time** — Total accumulated points ### Leaderboard Columns | Column | Description | | - | - | | **Rank** | Current position (with change indicator) | | **Name** | Sales rep name and avatar | | **Points** | Total points for the period | | **Deals Won** | Number of deals closed as won | | **Revenue** | Total value of closed deals | | **Conversion Rate** | Percentage of leads converted to won deals | ### Rank Changes The leaderboard shows position changes compared to the previous period: * Green arrow up — You moved up in ranking * Red arrow down — You moved down * Gray dash — No change ## Team Rankings If your company has multiple teams, the rankings page also shows: * **Individual ranking** — Your position among all sales reps * **Team ranking** — Your team's combined performance vs other teams * **Within-team ranking** — Your position within your own team > [!TIP] > > Use team rankings to foster healthy competition between departments or regions. Managers can view both team and individual breakdowns. ## Ranking Tiers As you accumulate points, you progress through ranking tiers: > [accordion] Bronze (0 - 499 points) > > Starting tier for new team members. Focus on learning the platform and building your pipeline. > [accordion] Silver (500 - 1,499 points) > > You are making consistent contributions. Your deal flow is regular and growing. > [accordion] Gold (1,500 - 3,999 points) > > Strong performer. You are closing deals regularly and contributing significantly to team revenue. > [accordion] Platinum (4,000 - 9,999 points) > > Top performer. You are among the best on your team with consistent high-value closings. > [accordion] Diamond (10,000+ points) > > Elite status. You are a sales leader with exceptional performance across all metrics. ## Viewing Your Stats Click your name on the leaderboard (or go to your profile) to see detailed statistics: * Points breakdown by activity type * Points trend over time (chart) * Current tier and progress to next tier * Comparison to team average * Historical ranking positions ## Notifications SalesOS sends ranking-related notifications: * When you move up or down in the leaderboard * When you reach a new tier * When someone overtakes your position * Weekly ranking summary You can customize these in your [notification settings](/user-guide/communication/notifications). ## Next Steps > [card] [Badges](/user-guide/gamification/badges) > > Earn badges for achievements > [card] [Challenges](/user-guide/gamification/challenges) > > Compete in sales challenges # Getting Started Source: https://docs.play2sell.com/user-guide/getting-started Your first steps in SalesOS — from logging in to navigating the dashboard and setting up your profile. # Getting Started with SalesOS This guide walks you through your first login, profile setup, and an overview of the main dashboard so you can start working right away. ## First Login **1. Open SalesOS** Go to [app.play2sell.com](https://app.play2sell.com) in your web browser. SalesOS works best on Chrome, Firefox, Safari, or Edge. **2. Enter your credentials** Use the email address and password provided by your company administrator. If your company uses single sign-on (SSO), click the SSO button and select your identity provider. **3. Complete your profile** On first login, you will be prompted to complete your profile. Add your name, photo, and phone number. This information is visible to your team members. **4. Explore the dashboard** After setup, you land on the main dashboard. Take a moment to familiarize yourself with the navigation sidebar on the left. > [!NOTE] > > If you have not received an invitation email, contact your company administrator. They can send a new invite from the Admin panel. ## Setting Up Your Profile Your profile is how your team sees you in SalesOS. To edit it: 1. Click your avatar in the bottom-left corner of the sidebar 2. Select **Profile Settings** 3. Update the following fields: | Field | Description | | - | - | | **Name** | Your full name as displayed to team members | | **Photo** | A profile picture (recommended: square, at least 200x200px) | | **Phone** | Your business phone number | | **Email** | Your login email (cannot be changed — contact admin if needed) | | **Notification preferences** | Choose how and when you receive notifications | > [!TIP] > > Adding a profile photo helps your teammates quickly identify you in chat, rankings, and deal assignments. ## Dashboard Overview The main dashboard is your home base in SalesOS. It gives you a snapshot of your current performance and pending activities. ### Navigation Sidebar The left sidebar contains all main sections: * **Dashboard** — Your performance overview and KPIs * **Pipeline** — The Kanban board for managing deals * **Leads** — Your lead database * **Chat** — Team communication * **Rankings** — Gamification leaderboards * **Badges** — Your earned and available badges * **Challenges** — Active sales challenges * **Reports** — Detailed analytics (managers and admins) * **Admin** — Company settings (admins only) ### Dashboard Widgets The dashboard displays several widgets: > [accordion] Performance Summary > > Shows your key metrics for the current period: total deals, deals won, deals lost, total revenue, and conversion rate. > [accordion] Pipeline Overview > > A mini view of your pipeline showing how many deals are in each stage and their combined value. > [accordion] Recent Activity > > A feed of your latest actions — deals moved, leads created, badges earned, and messages received. > [accordion] Ranking Position > > Your current position in the team ranking, your point total, and how far you are from the next position. > [accordion] Upcoming Tasks > > Tasks and follow-ups scheduled for today and the coming days. ## Keyboard Shortcuts SalesOS supports keyboard shortcuts to help you work faster: | Shortcut | Action | | - | - | | `G` then `D` | Go to Dashboard | | `G` then `P` | Go to Pipeline | | `G` then `L` | Go to Leads | | `G` then `C` | Go to Chat | | `N` | Create new deal or lead (context-dependent) | | `/` | Open global search | | `?` | Show all keyboard shortcuts | ## Next Steps Now that you are set up, explore the core features: > [card] [Sales Pipeline](/user-guide/sales/pipeline) > > Start managing your deals on the Kanban board > [card] [Lead Management](/user-guide/sales/leads) > > Learn how to create and qualify leads > [card] [Gamification](/user-guide/gamification/rankings) > > Understand how rankings and points work > [card] [Team Chat](/user-guide/communication/chat) > > Connect with your team # Introduction to SalesOS Source: https://docs.play2sell.com/user-guide/introduction Learn what SalesOS is, its key features, and how it can transform your sales team's performance. # What is SalesOS? SalesOS is a sales management platform built for teams that want more than a traditional CRM. It combines deal management, gamification, and automation into a single workspace where sales representatives stay engaged and managers get full visibility into performance. The platform is designed around three core principles: 1. **Simplicity** — A clean, intuitive interface that sales reps actually want to use 2. **Motivation** — Gamification mechanics that keep teams engaged and competitive 3. **Visibility** — Real-time dashboards and reports that give managers actionable insights ## Key Features > [card] Sales Pipeline > > A visual Kanban board where you manage deals from first contact to close. Drag and drop cards between stages, set values, and track progress in real time. > [card] Lead Management > > Capture, import, and qualify leads with custom fields. Score leads automatically and route them to the right sales rep. > [card] Gamification Engine > > Points, rankings, badges, and challenges that turn daily sales activities into a rewarding experience. Powered by the OpenBadges standard. > [card] Team Communication > > Built-in chat with channels and direct messages. No need to switch between apps — discuss deals right where you manage them. > [card] Automation Workflows > > Set up triggers and actions to automate repetitive tasks. Move deals automatically, send notifications, and update fields based on conditions. > [card] Reports and Dashboards > > Track KPIs, conversion rates, team performance, and revenue forecasts with visual dashboards you can customize. > [card] API and Integrations > > Connect SalesOS to your existing tools through our REST API, webhooks, or pre-built ERP integrations. > [card] White-Label Branding > > Customize the platform with your company logo, colors, and branding. Make it feel like your own product. ## Who Is SalesOS For? SalesOS is designed for: * **Sales Representatives** who need a clear, motivating workspace to manage their deals and leads * **Sales Managers** who want visibility into team performance with real-time dashboards and reports * **Company Administrators** who need to configure the platform, manage users, and control access * **Developers** who want to integrate SalesOS with other tools in their company's tech stack ## Platform Architecture SalesOS is a cloud-based platform accessible through any modern web browser. There is nothing to install — just log in at [app.play2sell.com](https://app.play2sell.com) and start working. Under the hood, SalesOS is built on: * A multi-tenant cloud backend with PostgreSQL and Row Level Security * Industry-standard OAuth/JWT authentication and single sign-on (SAML, OIDC, social) * The **OpenBadges** standard for the gamification badge system > [!TIP] > > If you are new to SalesOS, start with the [Getting Started](/user-guide/getting-started) guide to set up your profile and learn the basics of the dashboard. ## Next Steps > [card] [Getting Started](/user-guide/getting-started) > > Set up your profile and explore the dashboard > [card] [Sales Pipeline](/user-guide/sales/pipeline) > > Learn how to manage your deals # Lead Management Source: https://docs.play2sell.com/user-guide/sales/leads Create, import, and qualify leads in SalesOS — from initial capture to conversion into deals. # Lead Management Leads are potential customers who have shown interest in your product or service but have not yet entered your sales pipeline as a deal. SalesOS provides tools to capture, organize, qualify, and convert leads efficiently. ## Creating Leads ### Manual Creation **1. Navigate to Leads** Click **Leads** in the sidebar or press `G` then `L`. **2. Click New Lead** Click the **+ New Lead** button at the top-right corner. **3. Fill in lead information** Enter the required fields: name, email, and phone. Add optional fields like company, position, source, and any custom fields your admin has configured. **4. Assign the lead** Choose a sales rep to own the lead, or leave it unassigned for round-robin distribution. **5. Save** Click **Create** to add the lead to your database. ### Importing Leads in Bulk SalesOS supports CSV import for adding multiple leads at once: 1. Go to **Leads** and click **Import** 2. Download the CSV template to see the expected column format 3. Fill in the template with your lead data 4. Upload the completed CSV file 5. Map your CSV columns to SalesOS fields 6. Review the preview and click **Import** > [!NOTE] > > The import process validates email addresses and phone numbers. Duplicate leads (matched by email) are flagged for review — you can choose to skip, update, or create duplicates. ### Lead Sources Track where your leads come from by setting the **Source** field: * Website form * Phone call * Referral * Social media * Trade show / event * Cold outreach * Partner * Custom sources (configured by your admin) ## Lead List View The lead list displays all your leads in a table format with sortable columns: | Column | Description | | - | - | | **Name** | Lead's full name | | **Company** | Associated company | | **Email** | Contact email | | **Phone** | Contact phone number | | **Source** | How the lead was acquired | | **Status** | New, Contacted, Qualified, Unqualified, Converted | | **Owner** | Assigned sales rep | | **Created** | Date the lead was added | | **Last Activity** | Most recent interaction | ### Filtering Leads Use the filter bar to narrow your list: * **Status** — Filter by lead status * **Owner** — Filter by assigned sales rep * **Source** — Filter by lead source * **Date range** — Filter by creation or last activity date * **Custom fields** — Filter by any custom field values * **Tags** — Filter by applied tags ## Qualifying Leads Lead qualification is the process of determining whether a lead is a good fit for your product and ready to enter the sales pipeline. ### Lead Statuses Each lead progresses through these statuses: > [accordion] New > > The lead was just created and has not been contacted yet. This is the default status for all new leads. > [accordion] Contacted > > A sales rep has made initial contact with the lead via phone, email, or another channel. > [accordion] Qualified > > The lead meets your qualification criteria and is ready to be converted into a deal in the pipeline. > [accordion] Unqualified > > The lead does not meet your criteria — wrong fit, no budget, no authority, or not the right timing. > [accordion] Converted > > The lead has been converted into a deal and now exists in the sales pipeline. The lead record links to the deal for reference. ### Converting a Lead to a Deal When a lead is qualified and ready to enter the pipeline: 1. Open the lead detail view 2. Click **Convert to Deal** 3. Confirm the deal value, expected close date, and initial pipeline stage 4. The lead status changes to **Converted** and a new deal card is created in the pipeline > [!TIP] > > All information from the lead record (notes, custom fields, contact details) is carried over to the deal. You do not need to re-enter anything. ## Lead Activity Timeline Each lead has an activity timeline that logs: * Status changes * Notes added by sales reps * Emails sent or received (if email integration is enabled) * Phone calls logged * Tasks created and completed * File attachments ## Best Practices * **Respond quickly** — Leads contacted within the first hour have significantly higher conversion rates * **Use consistent qualification criteria** — Agree as a team on what makes a lead "qualified" * **Keep notes updated** — Document every interaction so any team member can pick up the conversation * **Clean up regularly** — Mark unqualified leads to keep your list focused on real opportunities * **Track your sources** — Understanding which sources produce the best leads helps optimize marketing spend ## Next Steps > [card] [Opportunities](/user-guide/sales/opportunities) > > Manage deals after converting leads > [card] [Custom Fields](/admin/customization/custom-fields) > > Add custom fields to capture more lead data # Opportunities Source: https://docs.play2sell.com/user-guide/sales/opportunities Manage sales opportunities and deals — track values, forecast revenue, and move deals toward close. # Managing Opportunities Opportunities (also called deals) are the core of your sales process in SalesOS. Each opportunity represents a potential sale with an associated value, close date, and probability of winning. ## Opportunity Detail View When you click a deal card in the pipeline or open an opportunity from the list, you see the full detail view: ### Key Fields | Field | Description | | - | - | | **Name** | The opportunity name (usually the company or project name) | | **Value** | The monetary value of the deal | | **Stage** | Current pipeline stage | | **Probability** | Likelihood of closing (auto-set by stage, editable) | | **Expected close date** | When you expect the deal to close | | **Owner** | The sales rep responsible for this deal | | **Contact** | Primary contact person | | **Company** | Associated company | | **Source** | Where the opportunity originated | | **Priority** | High, Medium, or Low | ### Stage Probabilities Each pipeline stage has a default probability that reflects how likely a deal in that stage is to close: | Stage | Default Probability | | - | - | | Prospecting | 10% | | Qualification | 25% | | Proposal | 50% | | Negotiation | 75% | | Closed Won | 100% | | Closed Lost | 0% | > [!TIP] > > You can override the default probability on individual deals. This is useful when a deal is progressing faster or slower than typical for its stage. ## Revenue Forecasting SalesOS calculates revenue forecasts based on your open deals: * **Best case** — Sum of all open deal values * **Weighted forecast** — Sum of (deal value x probability) for all open deals * **Committed** — Value of deals in Negotiation stage or later * **Closed** — Value of deals already marked as Closed Won ### Forecast by Period Use the period selector to view forecasts for: * Current month * Current quarter * Current year * Custom date range The forecast view shows a bar chart comparing your target (if set by your admin) against your weighted and committed pipeline. ## Managing Opportunity Activities ### Notes Add notes to document conversations, decisions, and next steps. Notes are timestamped and attributed to the author. ### Tasks Create tasks associated with an opportunity: 1. Open the opportunity 2. Click the **Tasks** tab 3. Click **+ Add Task** 4. Set the task title, due date, and assignee 5. Tasks appear in your dashboard and send reminders when due ### File Attachments Attach files to any opportunity: * Proposals and quotes * Contracts * Presentations * Meeting recordings * Any relevant documents > [!NOTE] > > The maximum file size is 50MB per attachment. Supported formats include PDF, DOCX, XLSX, PPTX, PNG, JPG, and MP4. ### History Timeline The timeline tab shows a complete audit trail of every change made to the opportunity: * Stage changes (with who moved it and when) * Value changes * Field updates * Notes added * Files attached * Tasks created and completed ## Closing Deals ### Closing Won When you successfully close a deal: 1. Move the card to **Closed Won** (drag and drop or use the stage dropdown) 2. Confirm the final deal value 3. Optionally add a closing note 4. SalesOS awards gamification points based on the deal value ### Closing Lost When a deal does not proceed: 1. Move the card to **Closed Lost** 2. Select a **loss reason** from the dropdown (configured by your admin): * Lost to competitor * No budget * No decision made * Timing not right * Product fit issues * Other 3. Add a note explaining what happened > [!WARNING] > > Always record a loss reason when closing a deal as lost. This data is critical for understanding patterns and improving your sales process over time. ### Reopening Deals If circumstances change, you can reopen a closed deal: 1. Open the closed opportunity 2. Click **Reopen Deal** 3. Select the stage to return it to 4. The deal reappears on the pipeline board ## Bulk Operations From the opportunity list view, you can perform bulk actions: * **Reassign** — Transfer selected deals to a different sales rep * **Update stage** — Move multiple deals to a new stage * **Add tags** — Apply tags to selected deals * **Export** — Download selected deals as CSV Select multiple deals using the checkboxes, then choose the action from the bulk actions menu. ## Next Steps > [card] [Rankings](/user-guide/gamification/rankings) > > See how closed deals affect your ranking > [card] [Dashboards](/admin/reports/dashboards) > > Analyze opportunity data with reports # Sales Pipeline Source: https://docs.play2sell.com/user-guide/sales/pipeline Manage your deals visually with the Kanban pipeline — move cards between stages, apply filters, and track progress. # Sales Pipeline The sales pipeline is a visual Kanban board where you manage all your deals from first contact to close. Each deal is represented as a card that moves through customizable stages. ## Pipeline View When you open the Pipeline section, you see columns representing each stage of your sales process. The default stages are: 1. **Prospecting** — Initial contact, research phase 2. **Qualification** — Confirming the lead has budget, authority, need, and timeline 3. **Proposal** — Presenting your offer or quote 4. **Negotiation** — Discussing terms, handling objections 5. **Closed Won** — Deal successfully closed 6. **Closed Lost** — Deal did not proceed > [!NOTE] > > Your administrator can customize pipeline stages to match your company's specific sales process. Contact your admin if the default stages do not fit your workflow. ## Working with Deal Cards Each card on the pipeline displays: * **Contact name** and company * **Deal value** in your local currency * **Expected close date** * **Assigned sales rep** (avatar) * **Priority indicator** (color-coded) * **Days in stage** — how long the deal has been in the current column ### Creating a New Deal **1. Click the + button** Click the **+ New Deal** button at the top of the pipeline, or press `N` on your keyboard. **2. Fill in deal details** Enter the contact name, company, deal value, expected close date, and select the initial stage. **3. Add optional information** Include notes, attach files, add custom field values, and link to an existing lead if applicable. **4. Save the deal** Click **Create** to add the deal card to the pipeline. ### Moving Deals Between Stages There are two ways to move a deal: * **Drag and drop** — Click and hold a card, then drag it to the target column * **Card menu** — Click the card to open it, then select the new stage from the **Stage** dropdown When you move a deal, SalesOS automatically: * Records the stage change in the deal history * Updates your pipeline metrics * Awards gamification points for forward movement * Triggers any automation workflows configured for that stage transition > [!TIP] > > Moving a deal to **Closed Won** earns the most gamification points. The point value scales with the deal amount — bigger deals mean more points. ### Editing a Deal Click any card to open the deal detail view. From here you can: * Edit all deal fields (value, close date, stage, priority) * View the complete history of changes * Add notes and comments * Attach files (contracts, proposals, presentations) * See linked leads and contacts * View associated activities and tasks ## Filtering and Sorting The pipeline supports several ways to find and organize deals: ### Quick Filters Use the filter bar above the pipeline to filter by: | Filter | Options | | - | - | | **Assigned to** | Specific sales rep or "My deals" | | **Priority** | High, Medium, Low | | **Value range** | Minimum and maximum deal value | | **Close date** | This week, this month, this quarter, custom range | | **Tags** | Any tags applied to deals | | **Created date** | When the deal was created | ### Sorting Within each column, cards can be sorted by: * **Value** (highest or lowest first) * **Close date** (nearest or farthest) * **Days in stage** (longest or shortest) * **Priority** (highest first) * **Alphabetical** (contact name) ### Saved Views You can save filter and sort combinations as named views for quick access. Click **Save View** after applying your filters, give it a name, and it appears in the view selector dropdown. ## Pipeline Metrics At the top of the pipeline view, you see real-time metrics: * **Total pipeline value** — Sum of all open deals * **Weighted value** — Value adjusted by stage probability * **Deal count** — Number of deals per stage * **Average deal size** — Mean value across all deals * **Average time in stage** — How long deals stay in each column > [!WARNING] > > Deals that stay in the same stage for too long may indicate a stalled opportunity. SalesOS highlights deals that exceed the average time in stage with an orange border. ## Best Practices * **Update deals daily** — Keep card information current so your pipeline reflects reality * **Use notes** — Document key conversations and next steps on each deal * **Set realistic close dates** — Accurate dates improve forecast reliability * **Move or close stale deals** — Do not let dead deals inflate your pipeline value * **Use priority levels** — Focus on high-priority deals first ## Next Steps > [card] [Lead Management](/user-guide/sales/leads) > > Feed your pipeline with qualified leads > [card] [Opportunities](/user-guide/sales/opportunities) > > Deep dive into opportunity management