Skip to main content

Promotion CRM Data Models

This document provides comprehensive documentation for all GraphQL types and models used in the CRM Promotion API.

Core Types​

PromotionCmsModel​

The main promotion entity for CRM operations with full administrative access.

type PromotionCmsModel {
id: ID!
name: LanguageKeyVal!
description: LanguageKeyVal!
slug: String!
category: PromotionCategory!
type: PromotionType!
status: PromotionStatus!
visibility: ViewVisibility!
imageUrl: LanguageKeyVal
altText: LanguageKeyVal
backgroundColor: String
startDate: String
endDate: String

# Button Configuration
primaryButton: PromotionPrimaryButton!
secondaryButton: PromotionSecondaryButton
iconButtons: PromotionExtendedSlide

# Content Components
slider: PromotionSlider
popup: PromotionPopup
videoSlider: PromotionVideoSlider

# SEO and Marketing
seo: PromotionSeo!
howItWorks: PromotionHowItWorks
badge: PromotionBadge

# Administrative Fields
internalNote: String
postOptInAction: PostOptInAction
accessPolicy: AccessPolicy
bonus: ID
relatedBonusStartDate: String
relatedBonusEndDate: String

# Analytics
usersClicks: Int
usersViews: Int
usersClaims: Int
usersClicksSample: [String!]
usersViewsSample: [String!]
usersClaimsSample: [String!]

# Sorting Indexes
indexInPromotions: PromotionSortIndexes
indexInSliderCategory: SliderSortIndexes
indexInPopupCategory: PopupSortIndexes
indexInVideoSliderCategory: VideoSliderSortIndexes

# Translation
translationStatus: TranslateStatus!

# Timestamps
createdAt: String!
updatedAt: String!
}

Button Types​

PromotionPrimaryButton​

type PromotionPrimaryButton {
text: LanguageKeyVal!
action: ActionButton!
loggedOutText: LanguageKeyVal
loggedOutAction: ActionButton
usedText: LanguageKeyVal
}

PromotionSecondaryButton​

type PromotionSecondaryButton {
action: ActionButton!
loggedOutAction: ActionButton
}

Content Component Types​

PromotionSlider​

type PromotionSlider {
name: String
title: LanguageKeyVal!
description: LanguageKeyVal
imageUrl: LanguageKeyVal!
btnText: LanguageKeyVal
link: String
backgroundGradient: String
backgroundFill: String
actionType: SliderAction!
initialClickCount: Int!
altText: LanguageKeyVal
primaryButton: PromotionPrimaryButton
secondaryButton: PromotionSecondaryButton
startDate: String
endDate: String
}

PromotionPopup​

type PromotionPopup {
name: String
title: LanguageKeyVal!
description: LanguageKeyVal
imageUrl: LanguageKeyVal!
btnText: LanguageKeyVal
link: String
backgroundGradient: String
backgroundFill: String
actionType: SliderAction!
layout: PromotionPopupLayout!
initialClickCount: Int!
altText: LanguageKeyVal
primaryButton: PromotionPrimaryButton
secondaryButton: PromotionSecondaryButton
startDate: String
endDate: String
}

PromotionVideoSlider​

type PromotionVideoSlider {
name: String
title: LanguageKeyVal!
description: LanguageKeyVal
videoUrl: LanguageKeyVal!
btnText: LanguageKeyVal
link: String
actionType: SliderAction!
initialClickCount: Int!
altText: LanguageKeyVal
primaryButton: PromotionPrimaryButton
secondaryButton: PromotionSecondaryButton
startDate: String
endDate: String
}

Input Types​

CreateSmallPromotionInput​

input CreateSmallPromotionInput {
promotion: PromotionInput!
promotionSlider: PromotionSliderInput
promotionPopup: PromotionPopupInput
promotionVideoSlider: PromotionVideoSliderInput
}

CreateBigPromotionInput​

input CreateBigPromotionInput {
promotion: PromotionInput!
promotionSlider: PromotionSliderInput
promotionPopup: PromotionPopupInput
promotionVideoSlider: PromotionVideoSliderInput
}

PromotionInput​

input PromotionInput {
name: String!
description: String!
category: PromotionCategory!
slug: String!
visibility: ViewVisibility!
imageFileName: String!
altText: String!
backgroundColor: String
startDate: String
endDate: String

primaryButton: PromotionPrimaryButtonInput!
secondaryButton: PromotionSecondaryButtonInput
iconButtons: PromotionExtendedSlideInput

seo: PromotionSeoInput!
howItWorks: PromotionHowItWorksInput
badge: PromotionBadgeInput

internalNote: String
postOptInAction: PostOptInAction
accessPolicy: AccessPolicyInput
bonus: ID
relatedBonusStartDate: String
relatedBonusEndDate: String
}

Sorting and Index Types​

PromotionSortIndexes​

type PromotionSortIndexes {
PROMOTION: Int
CASINO: Int
SPORTS: Int
GENERAL: Int
}

SliderSortIndexes​

type SliderSortIndexes {
HOME_PAGE: Int
CASINO_LOBBY: Int
SPORTS_LOBBY: Int
PROFILE_PAGE: Int
}

PopupSortIndexes​

type PopupSortIndexes {
POPUP: Int
NOTIFICATION: Int
BANNER: Int
MODAL: Int
}

VideoSliderSortIndexes​

type VideoSliderSortIndexes {
CASINO_EXPLORE: Int
SPORTS_EXPLORE: Int
HOME_FEATURED: Int
PROFILE_SHOWCASE: Int
}

Response Types​

PromotionPaginationResponse​

type PromotionPaginationResponse {
count: Int!
data: [PromotionCmsModel!]!
limit: Int!
offset: Int!
}

PromotionSlidersPaginationResponse​

type PromotionSlidersPaginationResponse {
count: Int!
data: [PromotionCmsModel!]!
limit: Int!
offset: Int!
}

PromotionPopupsPaginationResponse​

type PromotionPopupsPaginationResponse {
count: Int!
data: [PromotionCmsModel!]!
limit: Int!
offset: Int!
}

Enums​

PromotionCategory​

enum PromotionCategory {
CASINO
SPORTS
GENERAL
VIP
SEASONAL
}

PromotionType​

enum PromotionType {
SMALL
BIG
}

PromotionStatus​

enum PromotionStatus {
DRAFT
STAGING_ACTIVE
ACTIVE
INACTIVE
ARCHIVED
}

SliderAction​

enum SliderAction {
AUTH
LINK
BUTTON
}

PromotionPopupLayout​

enum PromotionPopupLayout {
IMAGE
TEXT_AND_BUTTON
FULL_SCREEN
COMPACT
}

ViewVisibility​

enum ViewVisibility {
MOBILE
DESKTOP
BOTH
}

Utility Types​

LanguageKeyVal​

type LanguageKeyVal {
EN: String
ES: String
FR: String
DE: String
IT: String
PT: String
RU: String
JA: String
KO: String
ZH: String
}

ActionButton​

type ActionButton {
modal: ActionsButton
externalUrl: String
internalUrl: String
}

Usage Examples​

Creating a Small Promotion​

mutation CreateSmallPromotion($input: CreateSmallPromotionInput!) {
createSmallPromotion(input: $input) {
id
name
status
category
type
}
}

Updating Promotion Status​

mutation ChangePromotionStatus($id: ID!, $status: PromotionStatus!) {
changePromotionStatus(id: $id, status: $status)
}

Sorting Promotions​

mutation SortPromotions($input: SortPromotionsInput!) {
sortPromotions(input: $input)
}