---
title: "Show a Salesforce field on the storefront"
source: https://support.storeconnect.com/articles/show-a-salesforce-field-on-the-storefront
type: article
format: markdown
site: StoreConnect Support — product and developer documentation for StoreConnect
site_index: https://storeconnect.com/llms.txt
docs_index: https://support.storeconnect.com/llms.txt
note: Append .md to any page or article URL on this site to get its Markdown form.
---
# Show a Salesforce field on the storefront

Use this process when you know the Salesforce field you want and need the Liquid
that renders it. It works in the other direction too: given an attribute in a
template, it tells you which Salesforce field feeds it.

Two things make this harder than it looks, and both have a fixed answer:

- **A Salesforce object and its Liquid object have different names.** `Product2`
  is `product` in a template, and `s_c__Product_Category__c` is
  `product_category`. Writing the Salesforce name in Liquid returns nothing.
- **The field name changes too.** `s_c__Display_Name__c` is `product.name`. It is
  not a predictable transformation, so it has to be looked up.

## Decide which case you are in

Before writing any template code, establish which of two situations applies. They
have completely different answers.

| Situation | What you need |
|-----------|---------------|
| The field ships with StoreConnect (its API name starts `s_c__`, or it is a standard Salesforce field) | Nothing. It is probably already on the drop. Look up the attribute. |
| You added the field yourself in Salesforce | A **Custom Data Mapping** record, then read it from the drop's `data` attribute |

If you are not sure, check the object's field reference. Every field listed there
ships with the package.

## Look up a field that ships with StoreConnect

1.  Open the object reference for the Salesforce object. If you do not know which
    article that is, find it in [custom objects](custom-objects) or
    [standard objects](standard-objects).
2.  Go to the **On the storefront** section at the end of the article. It names
    the Liquid object that renders this Salesforce object, and the variable a
    theme writes.
3.  Find your field in the **Salesforce field** column. The **Liquid attribute**
    column is the code you write.

For example, on [Product2](product2-object-reference) the **On the storefront**
section gives:

| Salesforce field | Liquid attribute |
|------------------|------------------|
| `s_c__Display_Name__c` | `product.name` |
| `s_c__Slug__c` | `product.identifier`, `product.slug` |

So the display name renders as:


```liquid

{{ product.name }}
```


If the field is not in that table, it is still likely available. The table lists
fields read straight from Salesforce; a drop also exposes derived values such as
`product.can_purchase?`. Check the **Attributes** table on the Liquid object's own
article, reached from the same section.

:::note
Some objects are rendered by more than one Liquid object. **Media** is reached
through five, including `image` and `video`, and **Account** through three,
including `brand`. The **On the storefront** table qualifies each attribute with
its variable so it is clear which one to use.
:::

## Working the other way

Given an attribute in a template and needing the Salesforce field behind it, use
the mirror of that section. Open the Liquid object's article and read
**Backed by**, which names the Salesforce object and lists each attribute against
the field it reads.

This is the faster direction when debugging a value that looks wrong, because it
tells you exactly which field to inspect on the record.

## Add a field you created yourself

A field you added in Salesforce is not on the drop, and no amount of template code
will reach it until it is mapped. The route is:

1.  Create a **Custom Data Mapping** record for the object and field, with the
    access level you need.
2.  Wait for the backfill to finish. Adding a mapping triggers one, and the field
    reads blank until it completes.
3.  Read the value from the drop's `data` attribute, keyed by the field's API
    name.


```liquid

{{ product.data['field_1__c'] }}
```


Note that the object is `product`, not `Product2`, and the key is the Salesforce
field API name. The **On the storefront** section gives the variable to use.

[Add custom data fields to your store](liquid-custom-data-fields) is the full
procedure, including compound fields, multi-picklists, write-back, and the
performance advice on batching mappings.

:::warning
A mapping alone does not make a field readable in a POS template. The POS
downloads a fixed set of columns per object and adds a mapped field only when a
**POS Layout** references it. See
[Verify custom data is available in Liquid](verify-custom-data-in-liquid).
:::

## Confirm it worked

Render the attribute on the page or template you expect it on. The value should
match the field on the record in Salesforce.

If it renders blank, the cause is almost always one of three things: the wrong
Liquid object name, a mapping whose backfill has not finished, or a POS layout
that does not reference the field.
[Verify custom data is available in Liquid](verify-custom-data-in-liquid) lists
the keys a drop actually holds, which settles it quickly.

---

## Follow StoreConnect

- [Email Newsletter](https://storeconnect.com/c/lp-newsletter)
- [LinkedIn Newsletter](https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7444956928444862464)
- [YouTube](https://www.youtube.com/channel/UCngKdP2x8l1wcbAKW3tvU8g)
- [LinkedIn](https://www.linkedin.com/company/storeconnect)
- [X / Twitter](https://x.com/storeconnecthq)

## Popular Links

- [Partners](https://storeconnect.com/partners)
- [Become a Partner](https://storeconnect.com/become-a-partner)
- [News](https://storeconnect.com/articles/news)
- [Events](https://storeconnect.com/articles/events)
- [Live Events](https://storeconnect.com/live-events)
- [Feature Comparison](https://storeconnect.com/how-we-compare)
- [Download a free trial](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT)
- [Book a Demo](https://storeconnect.com/contact)

## Documentation

- [Help documentation](https://support.storeconnect.com/help-documentation)
- [AI agents](https://support.storeconnect.com/ai)
- [Videos & tutorials](https://support.storeconnect.com/videos-tutorials)
- [Developer reference](https://support.storeconnect.com/developer-reference)
- [Release notes](https://support.storeconnect.com/release-notes)
- [Troubleshooting](https://support.storeconnect.com/troubleshooting)
- [Trust Center](https://trust.getstoreconnect.com/)
- [Status Page](https://status.storeconnect.com/)

## Contact

- info@getstoreconnect.com
- US +1 415 745 3230
- AUS +61 2 8365 2308

100 S Ashley Dr, Suite 600-2461
Tampa FL 33602-600 USA

Level 22, Sydney Place
180 George Street
Sydney, NSW, 2000, AUS

## Machine-readable

- [Site index for agents](https://storeconnect.com/llms.txt): curated map of the StoreConnect site in llms.txt format
- [Documentation index for agents](https://support.storeconnect.com/llms.txt): full technical and product documentation map

Every page and article on this site has a Markdown rendering: append `.md` to its URL.

Continue in Markdown: [Help documentation](https://support.storeconnect.com/help-documentation.md) · [Developer reference](https://support.storeconnect.com/developer-reference.md) · [Videos & tutorials](https://support.storeconnect.com/videos-tutorials.md) · [Release notes](https://support.storeconnect.com/release-notes.md)

---

StoreConnect Support — https://support.storeconnect.com/articles/show-a-salesforce-field-on-the-storefront