Skip to main content

CreateBulkEntityImportRequest

contacts object[]required

An array of contacts to import. These could be references to existing contacts or contacts to upsert

  • Array [
  • refIdstring

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given. This is required if an upsert is expected. If an upsert is not required then passing only a known ID is allowed.

    Example: row1
    transactions object[]

    An array of transactions to import. These could be references to existing transactions or transactions to upsert.

  • Array [
  • idstring

    The ID of the contact. If the ID is known beforehand this can be used to insert child entities without updating the contact. If ONLY this property is passed than the refId is not required.

    Example: CTR_asdflQkGpgvqDbL
    refIdstring

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given. This is required if an upsert is expected. If an upsert is not required then passing only a known ID is allowed.

    Example: row1-transaction1
    transactionDatestring<date-time>

    The date the transaction took place

    data object

    Additional data about the contact

    property name*stringnullable
    contactListIdstring

    The contact list to associate with this transaction for opt out

    Example: CG_asdflQkGpgvqDbL
    platformTypestring

    Where the transaction has come from e.g. surveyResponse or supportCall

    extRefIdstring

    An external data reference for the transaction that will be used for deduplication

    systemTypestring

    The type of the transaction when creating a system transaction.

    enrichments object[]

    An array of enrichments to import.

  • Array [
  • refIdstringrequired

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given.

    Example: row1-transaction1-BT_asdflQkGpgvqDbL
    source objectrequired

    The source of the enrichment. The provider and the context are combined with the metric field to determine a unique key for the enrichment.

    providerstring

    The provider of the enrichment

    Example: response_engine
    context object

    The context of the enrichment provides both a unique key and a reference back to the originating data. For example, an enrichment to a survey response will include the survey ID, the question ID and the response ID. This will allow a direct reference back to the raw data.

    property name*string
    metric objectrequired

    The value of the enrichment.

    typestring

    The type of the metric. A Gauge metric tracks a specific value at a point in time

    fieldstring

    The SES attribute for the metric.

    Example: ses://nps
    datestring

    The date that the metric was recorded

    Example: 2022-01-01T00:00:00.000Z
    enumValuestring

    Some SES attributes are enum values. If they are enum values then this should be set to correctly map the numeric value to the appropriate enum value

    Example: enu://9
    numValueinteger<int32>

    The numeric value of the metric

    Example: 9
  • ]
  • batches object[]

    Transaction batches to add the transaction to

  • Array [
  • refIdstringrequired

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given.

    Example: row1-transaction1-BT_asdflQkGpgvqDbL
    batchIdstringrequired

    The batch to add the transaction

    Example: BT_asdflQkGpgvqDbL
  • ]
  • ]
  • interactionTopics object[]

    An array of interaction topics to import. These could be references to existing interaction topics or interaction topics to upsert.

  • Array [
  • idstring

    The ID of the interaction topic. If the ID is known beforehand this can be used to insert child entities without updating the interaction topic. If ONLY this property is passed than the refId is not required.

    Example: CIT_eIHCzFJNUifwz5Q
    refIdstring

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given. This is required if an upsert is expected. If an upsert is not required then passing only a known ID is allowed.

    Example: row1-interaction-topic1
    datestring<date-time>

    The date the interaction topic created or took place

    data object

    Additional data about the contact

    property name*stringnullable
    extRefIdstring

    An external data reference for the transaction that will be used for deduplication

    typestring

    Type of interaction topic e.g. ses://test

    interactions object[]

    An external data reference for the interaction being created

  • Array [
  • idstring

    The ID of the contact. If the ID is known beforehand this can be used to insert child entities without updating the contact. If ONLY this property is passed than the refId is not required.

    Example: CTR_asdflQkGpgvqDbL
    refIdstring

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given. This is required if an upsert is expected. If an upsert is not required then passing only a known ID is allowed.

    Example: row1-transaction1
    transactionDatestring<date-time>

    The date the transaction took place

    data object

    Additional data about the contact

    property name*stringnullable
    contactListIdstring

    The contact list to associate with this transaction for opt out

    Example: CG_asdflQkGpgvqDbL
    platformTypestring

    Where the transaction has come from e.g. surveyResponse or supportCall

    extRefIdstring

    An external data reference for the transaction that will be used for deduplication

    systemTypestring

    The type of the transaction when creating a system transaction.

    enrichments object[]

    An array of enrichments to import.

  • Array [
  • refIdstringrequired

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given.

    Example: row1-transaction1-BT_asdflQkGpgvqDbL
    source objectrequired

    The source of the enrichment. The provider and the context are combined with the metric field to determine a unique key for the enrichment.

    providerstring

    The provider of the enrichment

    Example: response_engine
    context object

    The context of the enrichment provides both a unique key and a reference back to the originating data. For example, an enrichment to a survey response will include the survey ID, the question ID and the response ID. This will allow a direct reference back to the raw data.

    property name*string
    metric objectrequired

    The value of the enrichment.

    typestring

    The type of the metric. A Gauge metric tracks a specific value at a point in time

    fieldstring

    The SES attribute for the metric.

    Example: ses://nps
    datestring

    The date that the metric was recorded

    Example: 2022-01-01T00:00:00.000Z
    enumValuestring

    Some SES attributes are enum values. If they are enum values then this should be set to correctly map the numeric value to the appropriate enum value

    Example: enu://9
    numValueinteger<int32>

    The numeric value of the metric

    Example: 9
  • ]
  • batches object[]

    Transaction batches to add the transaction to

  • Array [
  • refIdstringrequired

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given.

    Example: row1-transaction1-BT_asdflQkGpgvqDbL
    batchIdstringrequired

    The batch to add the transaction

    Example: BT_asdflQkGpgvqDbL
  • ]
  • ]
  • ]
  • idstring

    The ID of the contact. If the ID is known beforehand this can be used to insert child entities without updating the contact. If ONLY this property is passed than the refId is not required.

    Example: CID_asdflQkGpgvqDbL
    firstNamestring

    The given name of the contact

    Example: Bob
    lastNamestring

    The surname of the contact

    Example: Smith
    emailstring

    The email of the contact

    Example: bob.smith@example.com
    extRefstring

    An external reference ID for the contact

    Example: abc1234
    phonestring

    The phone number of the contact

    Example: 8015551234
    languagestring

    The ISO-639-1 code of the language

    Example: en
    unsubscribedboolean

    Whether the contact is unsubscribed from the directory

    Example: true
    unsubscribedDatestringnullable

    The date that the contact was unsubscribed. If not provided and unsubscribed === true, then the default is the current date time.

    Example: 2022-01-01T00:00:00.000Z
    embeddedData object

    Additional data about the contact

    property name*stringnullable
    listMemberships object[]

    Contact lists to add the contact to

  • Array [
  • refIdstringrequired

    A reference to the entity. This has to be unique in this request, but can be reused between requests. This reference will be used in the result to match upserted entities to the input given.

    Example: row1-CG_asdflQkGpgvqDbL
    listIdstringrequired

    The list to subscribed the contact to

    Example: CG_asdflQkGpgvqDbL
    unsubscribedboolean

    Whether the contact is unsubscribed from the contact list

    Example: true
    unsubscribedDatestring

    The date that the contact was unsubscribed. If not provided and unsubscribed === true, then the default is the current date time.

    Example: 2022-01-01T00:00:00.000Z
    embeddedData object

    Additional data about the contact list membership

    property name*stringnullable
  • ]
  • ]
  • CreateBulkEntityImportRequest
    {
    "contacts": [
    {
    "refId": "row1",
    "transactions": [
    {
    "id": "CTR_asdflQkGpgvqDbL",
    "refId": "row1-transaction1",
    "transactionDate": "2024-07-29T15:51:28.071Z",
    "data": {
    "key": "value"
    },
    "contactListId": "CG_asdflQkGpgvqDbL",
    "platformType": "string",
    "extRefId": "string",
    "systemType": "string",
    "enrichments": [
    {
    "refId": "row1-transaction1-BT_asdflQkGpgvqDbL",
    "source": {
    "provider": "response_engine",
    "context": {
    "surveyId": "SV_asdflQkGpgvqDbL",
    "questionId": "QID1",
    "responseId": "R_asdflQkGpgvqDbL"
    }
    },
    "metric": {
    "type": "string",
    "field": "ses://nps",
    "date": "2022-01-01T00:00:00.000Z",
    "enumValue": "enu://9",
    "numValue": 9
    }
    }
    ],
    "batches": [
    {
    "refId": "row1-transaction1-BT_asdflQkGpgvqDbL",
    "batchId": "BT_asdflQkGpgvqDbL"
    }
    ]
    }
    ],
    "interactionTopics": [
    {
    "id": "CIT_eIHCzFJNUifwz5Q",
    "refId": "row1-interaction-topic1",
    "date": "2024-07-29T15:51:28.071Z",
    "data": {
    "key": "value"
    },
    "extRefId": "string",
    "type": "string",
    "interactions": [
    {
    "id": "CTR_asdflQkGpgvqDbL",
    "refId": "row1-transaction1",
    "transactionDate": "2024-07-29T15:51:28.071Z",
    "data": {
    "key": "value"
    },
    "contactListId": "CG_asdflQkGpgvqDbL",
    "platformType": "string",
    "extRefId": "string",
    "systemType": "string",
    "enrichments": [
    {
    "refId": "row1-transaction1-BT_asdflQkGpgvqDbL",
    "source": {
    "provider": "response_engine",
    "context": {
    "surveyId": "SV_asdflQkGpgvqDbL",
    "questionId": "QID1",
    "responseId": "R_asdflQkGpgvqDbL"
    }
    },
    "metric": {
    "type": "string",
    "field": "ses://nps",
    "date": "2022-01-01T00:00:00.000Z",
    "enumValue": "enu://9",
    "numValue": 9
    }
    }
    ],
    "batches": [
    {
    "refId": "row1-transaction1-BT_asdflQkGpgvqDbL",
    "batchId": "BT_asdflQkGpgvqDbL"
    }
    ]
    }
    ]
    }
    ],
    "id": "CID_asdflQkGpgvqDbL",
    "firstName": "Bob",
    "lastName": "Smith",
    "email": "bob.smith@example.com",
    "extRef": "abc1234",
    "phone": 8015551234,
    "language": "en",
    "unsubscribed": true,
    "unsubscribedDate": "2022-01-01T00:00:00.000Z",
    "embeddedData": {
    "key": "value"
    },
    "listMemberships": [
    {
    "refId": "row1-CG_asdflQkGpgvqDbL",
    "listId": "CG_asdflQkGpgvqDbL",
    "unsubscribed": true,
    "unsubscribedDate": "2022-01-01T00:00:00.000Z",
    "embeddedData": {
    "key": "value"
    }
    }
    ]
    }
    ]
    }