CRM App Backend Template
.NET — Schema, API & AI Guide
A production-ready .NET CRM backend schema and Starter Kit on Back4app: Contact, Company, Deal, Activity, pipeline stages, ER diagram, data dictionary, JSON schema, API playground, and a one-click AI Agent prompt to deploy in minutes.
Key Takeaways
On this page you get a production-ready CRM schema, a one-click AI prompt, and step-by-step .NET code — so you can ship a CRM app without building the backend.
- Deploy in minutes — Paste the AI Agent prompt and get a running app with contacts, companies, deals, and pipeline.
- Secure by default — ACLs and role-based access so users see only their assigned deals and data.
- .NET-native SDK — Typed objects, async/await, offline pinning, and Live Queries for pipeline updates.
- REST + GraphQL — Both APIs auto-generated; filter deals by stage, list activities by relatedTo.
- Five classes — _User (built-in), Company, Contact, Deal (pipeline), Activity (tasks/events).
What Is the .NET CRM API Template?
Back4app's .NET CRM template provides the Parse .NET SDK with Task and async/await, nullable reference types, and typed access to Deal, Contact, and Activity. Build C# clients or backend services that query by stage, assign deals to users, and subscribe to Live Queries. Enterprise-ready without hosting your own CRM API.
Best for:
Overview
.NET clients and services can use the Parse .NET SDK to connect to Back4app's CRM backend. Typed ParseObject, async FindAsync and SaveAsync, and optional Live Queries for pipeline updates. No custom REST client required.
The schema — _User, Company, Contact, Deal, Activity — is the same as for other stacks. Use ParseObject.GetQuery("Deal").WhereEqualTo("stage", "qualified").FindAsync() and assign deals to ParseUser.CurrentUser; Back4app enforces permissions.
Core CRM Features
.NET CRM API with C# and the Parse SDK: contact management, deal pipeline, Task-based async, and built-in user and ACL support for enterprise-ready backends.
Contact management
Store and manage contacts with name, email, phone, company, and notes. Ideal for .NET apps.
Company management
Track companies with name, website, industry, and address. Links to contacts and deals.
Deal pipeline
Sales pipeline with stages, amount, expected close date, and assignment. Built for .NET backends.
Activity tracking
Log calls, emails, meetings, and notes linked to contacts and deals. Works with .NET SDK.
User & permissions
Built-in user model and pointers for ownership and assignment. ACLs out of the box for .NET.
Why Build Your .NET CRM Backend with Back4app?
Back4app fits .NET shops that need a reliable, deployable CRM backend without managing infrastructure.
- •Parse .NET SDK: Use the official Parse SDK with Task and async/await; typed ParseObject and queries keep your C# code type-safe for Contact, Deal, Activity.
- •Enterprise stability: Deploy your .NET app against a hosted backend; Back4app handles scaling and availability.
- •Fits existing tooling: Integrate with Entity Framework patterns or use the SDK alone; REST and GraphQL available for other clients.
Fits .NET shops building CRM or sales tools with standard async patterns.
Core Benefits
A production-ready CRM backend so you can ship faster and focus on your app.
Ship Faster, No Backend Code
REST & GraphQL APIs and a ready-to-use schema — connect your app and go.
Secure by Default
ACLs and class-level permissions; restrict by assignedTo and createdBy.
Real-Time Pipeline
Live Queries over WebSockets for instant deal and activity updates.
Built-In Auth
User sign-up, login, and session handling out of the box.
Works Offline
Local pinning keeps contacts and deals available offline and syncs when you reconnect.
Deploy in Minutes
Use the AI Agent to create and deploy your CRM app from this template.
Ready to try it?
Let the Back4app AI Agent create your CRM app backend, connect the .NET frontend, and deploy — all from a single prompt.
Free to start — 50 AI Agent prompts/month, no credit card required
Technical Stack
Everything powering this CRM app template at a glance.
ER Diagram
Entity-Relationship diagram for the .NET CRM app data model.
CRM schema: _User, Company, Contact, Deal, Activity with pointers for company, contact, deal, assignedTo, relatedTo, createdBy.
View diagram source
erDiagram
_User {
String objectId PK
String username
String email
String password
Date createdAt
Date updatedAt
}
Company {
String objectId PK
String name
String website
String industry
String address
String notes
Pointer createdBy FK
Date createdAt
Date updatedAt
}
Contact {
String objectId PK
String name
String email
String phone
Pointer company FK
String notes
Pointer createdBy FK
Date createdAt
Date updatedAt
}
Deal {
String objectId PK
String title
Number amount
String stage
Pointer contact FK
Pointer company FK
Date expectedCloseDate
String notes
Pointer assignedTo FK
Date createdAt
Date updatedAt
}
Activity {
String objectId PK
String type
String subject
String description
Date dueDate
Date completedAt
Pointer relatedTo FK
Pointer createdBy FK
Date createdAt
Date updatedAt
}
Company ||--o{ Contact : "has"
Company ||--o{ Deal : "has"
Contact ||--o{ Deal : "has"
_User ||--o{ Deal : "assignedTo"
_User ||--o{ Activity : "createdBy"
Contact ||--o{ Activity : "relatedTo"
Deal ||--o{ Activity : "relatedTo"
_User ||--o{ Company : "createdBy"
_User ||--o{ Contact : "createdBy"
Integration Flow
Auth-to-CRUD sequence: how your .NET app talks to Back4app — login, then query contacts and deals, update pipeline.
View diagram source
sequenceDiagram
participant User
participant App as .NET App
participant Back4app as Back4app Cloud
User->>App: Login
App->>Back4app: ParseUser.LogInAsync(username, password)
Back4app-->>App: Session token
App-->>User: Logged in
User->>App: Load contacts and deals
App->>Back4app: ParseObject.GetQuery("Deal").FindAsync() or GetQuery("Contact").FindAsync()
Back4app-->>App: IEnumerable<ParseObject>
App-->>User: Show pipeline
User->>App: Create deal or contact
App->>Back4app: deal.SaveAsync() or contact.SaveAsync()
Back4app-->>App: Deal (ObjectId)
App-->>User: Updated listData Dictionary
Complete field reference for every class in the schema.
| Field | Type | Description | Required |
|---|---|---|---|
| objectId | String | Auto-generated unique identifier | auto |
| name | String | Full name of the contact | |
| String | Email address | — | |
| phone | String | Phone number | — |
| company | Pointer<Company> | Company this contact belongs to | — |
| notes | String | Free-form notes | — |
| createdBy | Pointer<_User> | User who created this contact | — |
| createdAt | Date | Auto-generated creation timestamp | auto |
| updatedAt | Date | Auto-generated last-update timestamp | auto |
9 fields in Contact
Security & Permissions
How ownership, ACLs, and class-level permissions protect data in this CRM schema.
Row-Level ACLs
Use ACLs and pointers (assignedTo, createdBy) so users only see and edit their assigned deals and related data.
Class-Level Permissions
CLPs restrict which roles or users can create, read, update, or delete objects at the class level.
Pointer-Based Ownership
Deal.assignedTo and Activity.createdBy link to _User; Cloud Code can enforce visibility and edits by role.
Schema (JSON)
Raw JSON schema definition — copy and use in your Back4app app or import via the API.
{
"classes": [
{
"className": "Contact",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"name": {
"type": "String",
"required": true
},
"email": {
"type": "String",
"required": false
},
"phone": {
"type": "String",
"required": false
},
"company": {
"type": "Pointer",
"targetClass": "Company",
"required": false
},
"notes": {
"type": "String",
"required": false
},
"createdBy": {
"type": "Pointer",
"targetClass": "_User",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Company",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"name": {
"type": "String",
"required": true
},
"website": {
"type": "String",
"required": false
},
"industry": {
"type": "String",
"required": false
},
"address": {
"type": "String",
"required": false
},
"notes": {
"type": "String",
"required": false
},
"createdBy": {
"type": "Pointer",
"targetClass": "_User",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Deal",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"title": {
"type": "String",
"required": true
},
"amount": {
"type": "Number",
"required": false
},
"stage": {
"type": "String",
"required": false
},
"contact": {
"type": "Pointer",
"targetClass": "Contact",
"required": false
},
"company": {
"type": "Pointer",
"targetClass": "Company",
"required": false
},
"expectedCloseDate": {
"type": "Date",
"required": false
},
"notes": {
"type": "String",
"required": false
},
"assignedTo": {
"type": "Pointer",
"targetClass": "_User",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "Activity",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"type": {
"type": "String",
"required": false
},
"subject": {
"type": "String",
"required": false
},
"description": {
"type": "String",
"required": false
},
"dueDate": {
"type": "Date",
"required": false
},
"completedAt": {
"type": "Date",
"required": false
},
"relatedTo": {
"type": "Pointer",
"required": false
},
"createdBy": {
"type": "Pointer",
"targetClass": "_User",
"required": false
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
},
{
"className": "_User",
"fields": {
"objectId": {
"type": "String",
"required": false
},
"username": {
"type": "String",
"required": true
},
"email": {
"type": "String",
"required": true
},
"password": {
"type": "String",
"required": true
},
"createdAt": {
"type": "Date",
"required": false
},
"updatedAt": {
"type": "Date",
"required": false
}
}
}
]
}Build with AI Agent
Use the Back4app AI Agent to build a real CRM app from this template: it will create the frontend, the backend (this schema, auth, and APIs), and deploy it — no manual setup. The prompt below describes this CRM stack so the Agent can generate a production-ready app in one go.
Create a CRM app on Back4app with this exact schema and behavior. Schema: 1. _User (use Back4app built-in): username (String, required), email (String, required), password (String, required); objectId, createdAt, updatedAt (system). 2. Company: name (String, required), website (String), industry (String), address (String), notes (String), createdBy (Pointer to _User); objectId, createdAt, updatedAt (system). 3. Contact: name (String, required), email (String), phone (String), company (Pointer to Company), notes (String), createdBy (Pointer to _User); objectId, createdAt, updatedAt (system). 4. Deal: title (String, required), amount (Number), stage (String; e.g. lead, qualified, proposal, negotiation, won, lost), contact (Pointer to Contact), company (Pointer to Company), expectedCloseDate (Date), notes (String), assignedTo (Pointer to _User); objectId, createdAt, updatedAt (system). 5. Activity: type (String; e.g. call, email, meeting, note), subject (String), description (String), dueDate (Date), completedAt (Date), relatedTo (Pointer to Contact or Deal), createdBy (Pointer to _User); objectId, createdAt, updatedAt (system). Security: - Set ACLs so only authenticated users can access data; use role-based or owner-based rules where appropriate (e.g. assignedTo, createdBy). - Use Class-Level Permissions so only authenticated users can create/read/update/delete these classes. Auth: - Sign-up (username, email, password) and login; support logout/session. Behavior: - Full CRUD for Company, Contact, Deal, and Activity. - List deals with filter by stage and order by expectedCloseDate or updatedAt (pipeline view). - List activities by relatedTo (Contact or Deal). - Optional: real-time Live Queries for Deal and Activity for dashboard/pipeline updates. - Optional: offline pinning for mobile (Contacts, Deals, Activities). Deliver: - Create the Back4app app with the schema above, ACLs, and any Cloud Code needed. - Generate the frontend and connect it to this backend; deploy so the app is runnable end-to-end.
Press the button below to open the Agent with this template's prompt pre-filled.
API Playground
Try the REST and GraphQL endpoints for the CRM schema. Responses from the example data above — no Back4app account needed.
Uses the same CRM schema (Contact, Company, Deal, Activity) as this template.
Step-by-Step .NET Integration
Connect to your Back4app backend from a .NET app using the Back4app .NET SDK.
Step 1: Install Back4app .NET SDK
Add the Back4app SDK for your stack (e.g. npm, pubspec, or package manager).
C#dotnet add package ParseStep 2: Initialize Back4app in your app
Initialize the Back4app SDK at app startup with your App ID and server URL.
C#// Startup or Program.cs ParseClient.Initialize(new ParseClient.Configuration { ApplicationId = "YOUR_APP_ID", Server = "https://parseapi.back4app.com/", WindowsKey = "YOUR_WINDOWS_KEY" // or use Key for REST });Step 3: Query contacts and deals
Use the SDK to fetch Contact and Deal objects; filter deals by stage for the pipeline.
C#public static async Task<IEnumerable<ParseObject>> GetDealsAsync(string stage = "qualified") { var query = ParseObject.GetQuery("Deal") .WhereEqualTo("stage", stage) .OrderBy("expectedCloseDate"); return await query.FindAsync(); } public static async Task<IEnumerable<ParseObject>> GetContactsAsync() { return await ParseObject.GetQuery("Contact").FindAsync(); }Step 4: Create a contact or deal
Create a new Contact or Deal with the required fields and pointers (company, contact, assignedTo), then save.
C#public static async Task<ParseObject> CreateDealAsync(string title, string stage = "lead", double? amount = null) { var deal = new ParseObject("Deal"); deal["title"] = title; deal["stage"] = stage; if (amount.HasValue) deal["amount"] = amount.Value; await deal.SaveAsync(); return deal; } public static async Task<ParseObject> CreateContactAsync(string name, string email = null, string phone = null) { var contact = new ParseObject("Contact"); contact["name"] = name; if (!string.IsNullOrEmpty(email)) contact["email"] = email; if (!string.IsNullOrEmpty(phone)) contact["phone"] = phone; await contact.SaveAsync(); return contact; }Step 5: Update deal stage and activities
Update Deal.stage when moving in the pipeline; create and list Activity by relatedTo.
C#public static async Task UpdateDealStageAsync(string objectId, string stage) { var deal = await ParseObject.GetQuery("Deal").GetAsync(objectId); deal["stage"] = stage; await deal.SaveAsync(); } public static async Task DeleteDealAsync(string objectId) { var deal = await ParseObject.GetQuery("Deal").GetAsync(objectId); await deal.DeleteAsync(); }
Full Data Model
Copy a complete CRM model for type-safe serialization (e.g. class, interface, or type definition).
// Deal.cs — matches Back4app schema
public class Deal
{
public string? ObjectId { get; set; }
public string Title { get; set; } = "";
public double? Amount { get; set; }
public string Stage { get; set; } = "lead";
public DateTime? ExpectedCloseDate { get; set; }
public ParseObject? Contact { get; set; }
public ParseObject? Company { get; set; }
public ParseUser? AssignedTo { get; set; }
public DateTime? CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public static Deal From(ParseObject obj) => new Deal
{
ObjectId = obj.ObjectId,
Title = obj.Get<string>("title") ?? "",
Amount = obj.Get<double?>("amount"),
Stage = obj.Get<string>("stage") ?? "lead",
ExpectedCloseDate = obj.Get<DateTime?>("expectedCloseDate"),
Contact = obj.Get<ParseObject>("contact"),
Company = obj.Get<ParseObject>("company"),
AssignedTo = obj.Get<ParseUser>("assignedTo"),
CreatedAt = obj.CreatedAt,
UpdatedAt = obj.UpdatedAt
};
}Frequently Asked Questions
Common questions about the CRM app backend template.
Ready to Build Your CRM App?
Start your .NET project in minutes. No credit card required.