> 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/integrations/setting-up-limio-for-salesforce/detailed-salesforce-setup/subscription-identifier.md).

# Specify 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="/files/5gWnFBfahEmXqFgvTVdp" 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
