CRMCustomGroup
This component fetches Advanced CRM Group data attached to CRM Records, Cases, Orders or Event Bookings.
{% component type: "CRMCustomGroup", groupAlias: "<YOUR CUSTOM GROUP ALIAS>" %}
Due to GDPR and privacy regulation CRM contact records will only be output by this component if the "Allow listing my contact data in the CMS" option has been enabled. This option can only be checked by the user during the submission of the "Update Account Form" or a web Form with the "Allow listing my contact data in the CMS" field added to it.
Parameters and Options
CRMCustomGroup
This is the name of the entity that needs to be used for the component retrieving function.
<YourGroupAlias>
<YourFieldAlias>
This value is case sensitive.
contact (default)
form_submission
event_booking
order
<ContactID> (default)
<FormSubmissionID>
<EventBookingID>
<OrderID>
If an empty string or not included, no data will be returned, unless the entityType is set as contact
and the user is logged in - in which case the user's CRM ID will be used by default.
Due to GDPR and privacy regulations, Custom Group fields from an entityType of contact
, will only be output by this component if the 'Allow listing my contact data in the CMS' option has been enabled in the users CRM record. This option can only be checked by the user during the submission of the 'Update Account Form' or a web Form with the 'Allow listing my contact data in the CMS' field added to it.
<path/to/layout>
If an empty string, nothing will be rendered.
If paramater is not included, the default virtual layout will be rendered (see below).
<yourLiquidVariableName>
Your collectionVariable value must only contain English letters, numbers or underscores. Spaces or special characters are not supported.
Liquid Output
The below example is the full Custom Group called "Company" attached to a CRM contact (as this contact record has data viewing enabled), which provides additional data fields for company information, but is otherwise the default structure you will get from this Component.
{
"Fields": [
{
"Name": "Name",
"Alias": "Name",
"CaseFieldType": 7,
"Value": "MyBiz",
"ArrayValue": [
"MyBiz"
]
},
{
"Name": "Business Number",
"Alias": "BusinessNumber",
"CaseFieldType": 7,
"Value": "987654321",
"ArrayValue": [
"987654321"
]
},
{
"Name": "Type",
"Alias": "Type",
"CaseFieldType": 3,
"Value": "Client",
"ArrayValue": [
"Client"
]
}
],
"Alias": "company",
"Params": {
"type": "CRMCustomGroup",
"collectionvariable": "CustomGroup",
"groupalias": "company",
"entityid": "1430",
"layout": ""
}
}
Virtual Layout
Based on the above example, if not using any custom layout or collection, the default virtual layout will output the value of just the first field, eg:
{{this.fields[0]['value']}}
Rendering the value:
MyBizAccessing the Data
JSON Output
You can output the full JSON for your component data by referencing the root Liquid object {{this}}
in your module’s layouts, or directly on your page, if using the collectionVariable
parameter in your component tag.
For example:
{% component type: ... collectionVariable: "myData" %}
You can then render the JSON like so:
{{myData}}
For more details on using this approach, see Part 2 of the free ‘Learning Liquid Course’.
Rendering Property Values
This data is also accessible directly on the Page or Template via a Liquid Collection by adding collectionVariable
to the Component.
An example using collectionVariable
with value "CustomGroup":
{% component type: "CRMCustomGroup", groupAlias: "company", entityId: "1430", collectionVariable: "CustomGroup" %}
Accessing a specific item within the collection. In this case the third item (zero based index), which in our example would render the value Client
{{CustomGroup.fields[2]['value']}}
Related Articles
- CRM
Contacts
Contacts store individual’s contact details and other customer-specific data (including extended custom fields) that is either collected via the website, manually added via the admin, or created via external API connections. - OpenAPI (Admin)
CRM Contacts API
Create, Retrieve, Update and Delete CRM Contacts via the public API endpoint using "where" filtering as well as retrieve a contact's Bookings, Cases and Orders. The contact's Secure Zone details can also be retrieved and password reset via this API. - Reports
Custom Reports
Custom reports can be used to bring CRM data together, as a spreadsheet, based on your requirements. - OpenAPI (Admin)
Customer Types API
Retrieve Customer Types via the public API endpoint. - CRM
Form Submissions
Form Submissions store the captured data from any form submission made on your website (from a form created under ‘Content’ > ‘Forms’). - CRM
Event Bookings
Event Bookings store all registrations made to an Event item, either via the website front-end or manually allocated via the admin. - CRM
Orders
Orders store accounts of any payments made via the website and provide management for additional payments, invoices, order statuses, tracking info, the products purchased within the order and the details of the form submission used to take the order. - CRM
Advanced CRM Groups
Advanced CRM Groups allow you to extend the data fields within multiple areas of the CRM, either globally or on a per-record basis. - Liquid Components
CRMContacts
This component fetches CRM Record data to use on the front-end via Liquid. - Liquid Components
member_update_form
This component renders a contact update form for a specified CRM contact so that a CRM Admin role, who is logged in to the front-end, can update the specified contact’s CRM info or secure zone subscriptions.
External Resources
There are currently no external resources available.
Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.
Questions?
We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@treepl.co and we will consult you as soon as possible.