struct Mailjet::Contactfilter
- Mailjet::Contactfilter
- Mailjet::Resource
- Struct
- Value
- Object
Overview
Segmentation is an extremely useful tool used to target a specific group of customers with a dedicated campaign. Create segments based on contact properties or the contact activity (opens, clicks). Segmentation helps you focus your campaigns on specific demographics, create re-engagement campaigns, etc.
https://dev.mailjet.com/email/reference/segmentation/
Defined in:
mailjet/resources/contactfilter.crClass Method Summary
-
.all(query : Hash | NamedTuple = Hash(String, String).new, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Find all contactfilters
-
.create(payload : Hash | NamedTuple, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Create a contactfilter
-
.delete(id : ResourceId, client : Client = Client.new)
Delete a contactfilter
-
.find(params : Hash | NamedTuple = Hash(String, String).new, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Find a contactfilter
-
.find(id : ResourceId, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Find a contactfilter
-
.update(params : Hash | NamedTuple = Hash(String, String).new, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Update a contactfilter
-
.update(id : ResourceId, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
Update a contactfilter
Instance methods inherited from struct Mailjet::Resource
initialize
initialize
Constructor methods inherited from struct Mailjet::Resource
new
new
Class Method Detail
def self.all(query : Hash | NamedTuple = Hash(String, String).new, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Find all contactfilters
response = Mailjet::Contactfilter.all
contactfilters = response.data
def self.create(payload : Hash | NamedTuple, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Create a contactfilter
contactfilter = Mailjet::Contactfilter.create({
description: "Users that have not clicked on an email link in the last 14 days",
expression: "((not hasclickedsince(14)))",
name: "Inactive customers",
})
Delete a contactfilter
Mailjet::Contactfilter.delete(112334)
def self.find(params : Hash | NamedTuple = Hash(String, String).new, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Find a contactfilter
contactfilter = Mailjet::Contactfilter.find(112334)
def self.find(id : ResourceId, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Find a contactfilter
contactfilter = Mailjet::Contactfilter.find(112334)
def self.update(params : Hash | NamedTuple = Hash(String, String).new, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Update a contactfilter
contactfilter = Mailjet::Contactfilter.update(112334, {
description: "Users that have not clicked on an email link in the last 7 days",
expression: "((not hasclickedsince(7)))",
name: "Inactive customers",
})
def self.update(id : ResourceId, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new)
#
Update a contactfilter
contactfilter = Mailjet::Contactfilter.update(112334, {
description: "Users that have not clicked on an email link in the last 7 days",
expression: "((not hasclickedsince(7)))",
name: "Inactive customers",
})