{"title":"Show a Salesforce field on the storefront","slug":"show-a-salesforce-field-on-the-storefront","url":"https://support.storeconnect.com/articles/show-a-salesforce-field-on-the-storefront","url_markdown":"https://support.storeconnect.com/articles/show-a-salesforce-field-on-the-storefront.md","subtitle":null,"summary":"Trace any Salesforce field to the Liquid attribute that renders it, and work out whether the field is already on the drop or needs a Custom Data Mapping first. Use this when you know the Salesforce field you want and need the template code for it.","type":"Developer_Documentation","video_url":"","keywords":"salesforce field, liquid attribute, drop, custom data mapping, product.data, on the storefront, backed by, field mapping, liquid object, storefront output, api name","last_modified":"2026-09-17T05:42:27+0000","body_markdown":"Use this process when you know the Salesforce field you want and need the Liquid\nthat renders it. It works in the other direction too: given an attribute in a\ntemplate, it tells you which Salesforce field feeds it.\n\nTwo things make this harder than it looks, and both have a fixed answer:\n\n- **A Salesforce object and its Liquid object have different names.** `Product2`\n  is `product` in a template, and `s_c__Product_Category__c` is\n  `product_category`. Writing the Salesforce name in Liquid returns nothing.\n- **The field name changes too.** `s_c__Display_Name__c` is `product.name`. It is\n  not a predictable transformation, so it has to be looked up.\n\n## Decide which case you are in\n\nBefore writing any template code, establish which of two situations applies. They\nhave completely different answers.\n\n| Situation | What you need |\n|-----------|---------------|\n| 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. |\n| You added the field yourself in Salesforce | A **Custom Data Mapping** record, then read it from the drop's `data` attribute |\n\nIf you are not sure, check the object's field reference. Every field listed there\nships with the package.\n\n## Look up a field that ships with StoreConnect\n\n1.  Open the object reference for the Salesforce object. If you do not know which\n    article that is, find it in [custom objects](custom-objects) or\n    [standard objects](standard-objects).\n2.  Go to the **On the storefront** section at the end of the article. It names\n    the Liquid object that renders this Salesforce object, and the variable a\n    theme writes.\n3.  Find your field in the **Salesforce field** column. The **Liquid attribute**\n    column is the code you write.\n\nFor example, on [Product2](product2-object-reference) the **On the storefront**\nsection gives:\n\n| Salesforce field | Liquid attribute |\n|------------------|------------------|\n| `s_c__Display_Name__c` | `product.name` |\n| `s_c__Slug__c` | `product.identifier`, `product.slug` |\n\nSo the display name renders as:\n\n\n```liquid\n\n{{ product.name }}\n```\n\n\nIf the field is not in that table, it is still likely available. The table lists\nfields read straight from Salesforce; a drop also exposes derived values such as\n`product.can_purchase?`. Check the **Attributes** table on the Liquid object's own\narticle, reached from the same section.\n\n:::note\nSome objects are rendered by more than one Liquid object. **Media** is reached\nthrough five, including `image` and `video`, and **Account** through three,\nincluding `brand`. The **On the storefront** table qualifies each attribute with\nits variable so it is clear which one to use.\n:::\n\n## Working the other way\n\nGiven an attribute in a template and needing the Salesforce field behind it, use\nthe mirror of that section. Open the Liquid object's article and read\n**Backed by**, which names the Salesforce object and lists each attribute against\nthe field it reads.\n\nThis is the faster direction when debugging a value that looks wrong, because it\ntells you exactly which field to inspect on the record.\n\n## Add a field you created yourself\n\nA field you added in Salesforce is not on the drop, and no amount of template code\nwill reach it until it is mapped. The route is:\n\n1.  Create a **Custom Data Mapping** record for the object and field, with the\n    access level you need.\n2.  Wait for the backfill to finish. Adding a mapping triggers one, and the field\n    reads blank until it completes.\n3.  Read the value from the drop's `data` attribute, keyed by the field's API\n    name.\n\n\n```liquid\n\n{{ product.data['field_1__c'] }}\n```\n\n\nNote that the object is `product`, not `Product2`, and the key is the Salesforce\nfield API name. The **On the storefront** section gives the variable to use.\n\n[Add custom data fields to your store](liquid-custom-data-fields) is the full\nprocedure, including compound fields, multi-picklists, write-back, and the\nperformance advice on batching mappings.\n\n:::warning\nA mapping alone does not make a field readable in a POS template. The POS\ndownloads a fixed set of columns per object and adds a mapped field only when a\n**POS Layout** references it. See\n[Verify custom data is available in Liquid](verify-custom-data-in-liquid).\n:::\n\n## Confirm it worked\n\nRender the attribute on the page or template you expect it on. The value should\nmatch the field on the record in Salesforce.\n\nIf it renders blank, the cause is almost always one of three things: the wrong\nLiquid object name, a mapping whose backfill has not finished, or a POS layout\nthat does not reference the field.\n[Verify custom data is available in Liquid](verify-custom-data-in-liquid) lists\nthe keys a drop actually holds, which settles it quickly."}