> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.conversive.ai/api-sdk-docs/salesforce-sdk/get-plan-details/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conversive.ai/_mcp/server. # Get Plan Details > Retrieve plan, subscription, license, and inbound number information for the connected Conversive account. Use `getConversivePlanDetails()` when you need account-level subscription visibility inside Salesforce. ## What this API can tell you The Confluence page documents that this method can return: * account-level subscription details * plan type and plan label * credit information * license allocation and usage * inbound number allocation and usage * plan expiry information ## Method signature ```apex public static ConversiveAPI.PlanResponse getConversivePlanDetails() ``` ## Inputs This API takes **no input parameters**. ## Response type ```apex public class PlanResponse { public String response; // SUCCESS / ERROR public String responseMessage; // human readable message public ConversivePlanDetailsService.ConversivePlanDetailsResponse planDetails; } ``` ## Top-level response fields | Field | Type | Description | | ----------------- | -------- | ---------------------------------------- | | `response` | `String` | Indicates success or failure | | `responseMessage` | `String` | Human-readable result | | `planDetails` | `Object` | Structured plan and subscription details | ## `planDetails` structure ```apex public class ConversivePlanDetailsResponse { public Boolean success; public Integer accountId; public String expirationDateTime; public String countryName; public String crmName; public List planDetails; public String message; } ``` ### Top-level `planDetails` fields | Field | Type | Description | | -------------------- | --------- | ----------------------------------------- | | `success` | `Boolean` | Whether the plan lookup succeeded | | `accountId` | `Integer` | Conversive account ID | | `expirationDateTime` | `String` | Plan or subscription expiration timestamp | | `countryName` | `String` | Country associated with the account | | `crmName` | `String` | CRM platform associated with the account | | `planDetails` | `List` | List of plan entries | | `message` | `String` | Additional service message | ## Plan entry structure ```apex public class PlanDetails { public String planType; public Integer planCode; public List planMetaInfo; public String planLabel; public Integer phoneNumberCount; public String credits; public List licenseDetails; public List inboundNumberDetails; } ``` ### Plan entry fields | Field | Type | Description | | ---------------------- | --------- | ------------------------------------------------ | | `planType` | `String` | Type of plan | | `planCode` | `Integer` | Internal plan code | | `planMetaInfo` | `List` | Additional plan metadata | | `planLabel` | `String` | Human-readable plan label | | `phoneNumberCount` | `Integer` | Number of phone numbers associated with the plan | | `credits` | `String` | Credit information tied to the plan | | `licenseDetails` | `List` | License allocation and usage details | | `inboundNumberDetails` | `List` | Inbound number allocation details | ## License details structure ```apex public class LicenseDetails { public String licenseType; public String licenseLabel; public Boolean isDefault; public Integer licenseUsedCount; public Integer licenseCode; public Integer licenseAllotedCount; public List licenseCRMCategory; public String licenseCategory; public String licenseProductType; } ``` ## Inbound number details structure ```apex public class InboundNumberDetails { public Integer inboundNumberType; public Integer inboundNumberCount; public String inboundNumberLabel; public Integer inboundNumberCountry; public String inboundNumberCountryName; public Integer inboundNumberUsedCount; } ``` ## Example ```apex try { ConversiveAPI.PlanResponse resp = ConversiveAPI.getConversivePlanDetails(); System.debug('response = ' + resp.response); System.debug('responseMessage = ' + resp.responseMessage); System.debug('planDetails = ' + resp.planDetails); } catch (Exception e) { System.debug('ERROR = ' + e.getMessage()); System.debug('STACK = ' + e.getStackTraceString()); } ``` ## Example success response ```apex response = 'SUCCESS' responseMessage = 'Plan details fetched successfully' ``` ## Example error response ```apex response = 'ERROR' responseMessage = 'Unable to fetch plan details' ``` ## Error behavior The documented failure pattern is: * `response = 'ERROR'` * `responseMessage` explains the issue * `planDetails` may be null or incomplete depending on the failure Because this method returns nested structures, the safest implementation is to: * guard all nested list reads * check `response` before reading `planDetails` * log both `responseMessage` and `planDetails` during troubleshooting ## Good use cases * admin consoles * subscription verification * entitlement checks * license usage reviews * inbound number allocation reviews * support troubleshooting > Retrieve plan, subscription, license, and inbound number information for the connected Conversive account.