> For the complete documentation index, see [llms.txt](https://docs.limio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.limio.com/salesforce/setting-up/detailed-salesforce-setup/subscription-identifier.md).

# Subscription Identifier

When browsing customer subscriptions within Salesforce in a Limio for Salesforce component (e.g. Manage Subscriptions page within a case, or a flow component) you can specify what Salesforce identifier to use to fetch subscriptions from the Limio API.

By default, the identifier being used is the contactId in the context; this however can be changed with a more appropriate identifier to use instead.

To do so, in Salesforce navigate to custom metadata > ic Assist Config > App Settings. Update the Config field to include an additional property "subjectIdentityField"

```
{
...,
"subjectIdentityField": "ContactId"
}
```

Do not remove the other, existing properties, just append this one to the list of properties.

The ContactId is the default one, so if the property is not present it will use ContactId by default.

This can be changed to use a more appropriate field; IMPORTANT: the field being used must be on the Contact object in the Salesforce data model.

For example, to use AccountId instead of contact id update the field to have

```
{
...,
"subjectIdentityField": "AccountId"
}
```

To instead use a contact custom field called "my\_custom\_identifier\_\_c" use the following

```
{
...,
"subjectIdentityField": "my_custom_identifier__c"
}
```

Once specified, the logic in LFS will be executed based on the configuration of the subjectIdentityField property, using the following logic. In the 3 use cases described below please bear in mind the following assumption: *the list of subscriptions is being browsed from a Case that is linked to either a contact, an account, or both.*

**USE CASE 1: subjectIdentityField blank**

If the property subjectIdentityField is left blank, or is set as ContactId, then the logic to fetch subscriptions will use, in order

1\. the contact id the case is linked to<br>

<figure><img src="https://284256719-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUgE12kxtw8dDbuEZGzbI%2Fuploads%2Fgit-blob-61ac0c211895597542a298e539a680e722994c11%2Fimage%20(100).png?alt=media" alt=""><figcaption></figcaption></figure>

2\. if the case isn't linked to a contact, but it's linked to an account that is a person account, then it uses the contact id of the person account

3\. if the case is only linked to a business account, and not a contact, the it will use the AccountId of the business account

**USE CASE 2: subjectIdentityField as AccountId**

If the property subjectIdentityField is set as AccountId, then the subscriptions from limio will be fetched based on the AccountId linked to the case, regardless of whether it's a person or business account, and regardless of whether it's linked to a contact.

**USE CASE 3: subjectIdentityField as custom field**

If the property subjectIdentityField is set as a custom field, the value of this field is fetched from the contact the case is linked to, or the person contact the case is linked to via person account relationship. If the field is blank or the case is not related to an account and contact, the logic will fail from fetching subscriptions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.limio.com/salesforce/setting-up/detailed-salesforce-setup/subscription-identifier.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
