Create Custom Actions to configure an HTTPS API request that sends Account or People data to a partner system, or to build Automations that trigger events in the partner’s system. Custom Actions work with out-of-the-box integrations for Marketo, HubSpot, and Salesforce, as well as Custom Integrations.
Important:
- Custom Actions supports any API that uses HTTPS.
- To change status, edit, or delete Custom Actions, see Manage Custom Actions.
Prerequisites
You must have access to Demandbase One for Marketing.
Step 1: Create an Integration
You must have an integration configured before creating a Custom Action:
- See Create and Manage Custom Integrations.
- See Integrate Marketo and Demandbase.
- See Demandbase and Salesforce Integration Overview.
- See Demandbase and HubSpot CRM Integration Overview.
Step 2: Create Custom Action
- From the left navigation bar, go to
Settings > Integrated Systems > Custom Action Configurations.
- Click Create New.
- Select an Integration for this action.
- Enter an Action Name.
- Enter an Action Description.
- In Member Type, select the object the action targets: Accounts or People.
- In HTTPS Request, specify the HTTPS method (GET, POST, PUT, PATCH, or DELETE) and the endpoint URL where the request is sent.
Important: For Salesforce, Marketo, and HubSpot integrations, enter only the relative path (e.g., /api/v1/...). Do not include the base URL/domain - it’s supplied by the configured integration.-
(Optional) To add records to a Demandbase static list, toggle on Enable Pushing Lists and enter the Variable Name (list label). This allows you to save the records from a Custom Action into a static list for reuse in other workflows or analysis.
Important: You can only add records to static lists.
-
(Optional) To add records to a Demandbase static list, toggle on Enable Pushing Lists and enter the Variable Name (list label). This allows you to save the records from a Custom Action into a static list for reuse in other workflows or analysis.
- In Request Body, enter the data to be sent with the HTTP request in JSON format.
Tip: For examples, see Request Body Examples.- Use Jinja syntax within the JSON to reference Demandbase fields as variables and insert dynamic values.
- For key–value pairs:
- Keys should match the parameter names defined in the API documentation.
- Values should be set using Demandbase fields.
- (Optional) In Headers, you can add custom headers to be included in the request.
Important: Variables are not supported here. - Click Create Action.
Next Steps
- To take Custom Actions manually, see Take Action: Custom Actions.
- To take Custom Actions automatically, see Automation: Custom Actions.
Request Body Examples
The Request Body supports Jinja Templates. Use Jinja syntax in JSON values to insert dynamic data.
Reference Object Fields inside Variables
{
"name": "{{Person.name}}"
}- {{ ... }} outputs the value of a variable.
- Person.name reads the name field from the Person object.
- When the action runs, {{ Person.name }} is replaced with the person’s actual name.
Filter Referenced Object Fields inside Variables
Use filters to modify variables. Filters are separated from the variable by a pipe symbol (|).
{
"name": {{Person.lastName | capitalize}}
}- capitalize makes the first of the Person’s last name uppercase
Set Conditions on Value
Use if statement to test if a variable is defined, not empty and not false:
{%- if Person.name -%}
{ "name": "{{ Person.name }}" }
{%- else -%}
{ "name": "Unknown" }
{%- endif -%}- Checks to see if the name field in the Person object exists. If it does, return it. If it doesn’t return “Unknown”.
Create JSON Array Dynamically
Use the set tag and for loops to dynamically create a JSON object.
{%- set names = Account.contacts -%}
{
"id": "{{Account.id}}",
"names": [
{%- for contact in names -%}
{ "name": "{{ contact.name }}" }{{ "," if not loop.last }}
{%- endfor -%}
]
}- {%- set names = Account.contacts -%} sets the names variable to the list of contacts associated with the Account.
- "id": "{{Account.id}}" references the account's unique Id.
- {%- for contact in names -%} is a for loop that iterates through each contact object in the names list.
- { "name": "{{ contact.name }}" } inside the loop accesses the name attribute of each contact object to generate the JSON entry.
- {{ "," if not loop.last }} is a conditional statement that adds a comma after each object in the array, except for the last one.
- {%- endfor -%} marks the end of the for loop.
Full Request to Send a Slack Message
Here is a complete request body example when using the slack API to post a message via https://slack.com/api/chat.postMessage endpoint.
{
"channel": "lead-news",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "📩 New Lead Captured!",
"emoji": true
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*👤 Name:* {{ Person.name }}"
},
{
"type": "mrkdwn",
"text": "*💼 Title:* {{ Person.title }}"
},
{
"type": "mrkdwn",
"text": "*🏢 Company:* {{ Person.company }}"
},
{
"type": "mrkdwn",
"text": "*📧 Email:* {{ Person.email }}"
},
{
"type": "mrkdwn",
"text": "*🌍 Location:* {{ Person.address }}"
}
]
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "✉️ Send Email"
},
"url": "mailto:{{ Person.email }}"
}
]
}
],
"text": "New lead received: {{ Person.name }} from {{ Person.company }}"
}