Skip to content

Cycle Source

The Cycle source extracts customer data from Cycle CRM workspaces via the GraphQL API.

Terminal window
pip install bizon[cycle]
name: cycle-pipeline
source:
name: cycle
stream: customers
slug: your-workspace-slug
authentication:
type: api_key
params:
token: BIZON_ENV_CYCLE_TOKEN
destination:
name: bigquery
config:
project_id: my-project
dataset_id: crm
gcs_buffer_bucket: my-bucket
StreamDescriptionIncremental
customersCRM customers with company dataNo
FieldTypeRequiredDescription
slugstringYesCycle workspace slug

Cycle uses API key authentication:

source:
name: cycle
stream: customers
slug: my-workspace
authentication:
type: api_key
params:
token: BIZON_ENV_CYCLE_TOKEN

To get your API token:

  1. Log in to your Cycle workspace
  2. Go to Settings > API
  3. Generate a new API token
  4. Copy and store securely
name: cycle-customers
source:
name: cycle
stream: customers
slug: my-workspace
authentication:
type: api_key
params:
token: BIZON_ENV_CYCLE_TOKEN
destination:
name: bigquery
config:
project_id: my-project
dataset_id: crm
dataset_location: US
gcs_buffer_bucket: my-staging-bucket
record_schemas:
- destination_id: my-project.crm.customers
record_schema:
- name: id
type: STRING
mode: REQUIRED
- name: email
type: STRING
mode: NULLABLE
- name: name
type: STRING
mode: NULLABLE
- name: company
type: JSON
mode: NULLABLE

Customer records include:

FieldDescription
idCustomer ID
emailCustomer email address
nameCustomer name
companyCompany object with id, name, domain
FieldDescription
idCompany ID
nameCompany name
domainCompany domain

Flatten company data:

transforms:
- label: flatten-company
python: |
company = data.get('company', {}) or {}
data = {
'id': data.get('id'),
'email': data.get('email'),
'name': data.get('name'),
'company_id': company.get('id'),
'company_name': company.get('name'),
'company_domain': company.get('domain')
}