UserSegments
Create, Update, Delete and Query the User Segments in Zendesk. A user segment defines who can view the content of a section or topic.
Table Specific Information
Select
The following queries are processed server side while other filters are processed client side within the 本製品.SELECT * FROM UserSegments SELECT * FROM UserSegments WHERE Id = '19236906991121' SELECT * FROM UserSegments WHERE UserId = '19128124956177'
You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any other search criteria will be ignored and an unfiltered response will be returned.
Insert
The Name and UserType columns are required to insert. All fields that are not readonly (readonly="false" in the table) are optional for insert. Allowed for Help Center managers.
INSERT INTO UserSegments (Name, OrTags, UserType, GroupIds, Tags) VALUES ('Test', 'abcd', 'staff', '19236839815825;19236761830161', 'vip;test')
Update
You must specify the Id of the UserSegment to update. All fields that are not readonly (readonly="false" in the table) are optional for insert. Allowed for Help Center managers.
UPDATE UserSegments SET Name = 'UpdatedName' WHERE Id = '19236906991121'
Delete
You must specify the Id of the UserSegment to delete it. Allowed for Help Center managers.
DELETE FROM UserSegments WHERE Id = '19236906991121'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
Automatically assigned when the user segment is created. | |
BuiltIn | Boolean | True |
Whether the user segment is built-in. Built-in user segments cannot be modified. | |
Name | String | False |
User segment name (localized to the locale of the current user for built-in user segments). | |
OrTags | String | False |
A user must have at least one tag in the list to have access. For insertion and updation provide these values separated by semicolon. | |
GroupIds | String | False |
The ids of the groups that have access. For insertion and updation provide these values separated by semicolon. | |
OrganizationIds | String | False |
The ids of the organizations that have access. For insertion and updation provide these values separated by semicolon. | |
Tags | String | False |
All the tags a user must have to have access. For insertion and updation provide these values separated by semicolon. | |
UserType | String | False |
The set of users who can view content. The UserType can be 'signed_in_users' for only authenticated users and 'staff' for only agents and Help Center managers. | |
CreatedAt | Datetime | True |
When the user segment was created. | |
UpdatedAt | Datetime | True |
When the user segment was last updated. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
UserId | Long |
Id of the User. |