Cmdlets for SendGrid

Build 24.0.9060

NMCSegments

Create, update, delete, and query New Marketing Campaign Segments in SendGrid.

Table-Specific Information

NMC prefix stands for New Marketing Campaign.

Select

You can retrieve all the segments or filter them by Id.

SELECT * FROM NMCSegments WHERE Id = '1'

Insert

A Segment divides NMCContacts by certain criteria. To specify these criteria use the QueryDSL filter.

INSERT INTO NMCSegments (Name, QueryDSL) VALUES ("New Segment", "Segment Cdata", "first_name LIKE '%test%'"))

The statement above creates NMCSegments containing NMCContacts with FirstName containing the value "test".

Update

You can update the name or the conditions. Since the whole set will be overwritten, specify a full set.

UPDATE NMCSegments SET Name = "Name Updated", QueryDSL = "first_name LIKE '%test update%'" WHERE Id = '123'

Delete

You can only delete NMCSegments by Id:

DELETE FROM NMCSegments WHERE Id = '123'

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The Id of the segment.

Name String False

The name of the segment.

ParentListId String False

The Id of the list associated with the segment.

ContactsCount Integer True

The recipient count of the segment.

CreatedAt Datetime True

Field name for the first condition.

SampleUpdatedAt Datetime False

Field name for the first condition.

UpdatedAt Datetime True

Field name for the first condition.

QueryDSL String False

Field name for the first condition.

NextSampleUpdate Datetime True

The last updated samples date.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060