0

I'm new to using FuelSDK. I'm getting an obscure error when trying to create a sendable data extension using FuelSDK. Below is my code:

dataextension.props = {"Name" : "MyDataExtension", "Description": "My first data extension",  "IsSendable": True, "SendableDataExtensionField": "CustomerID", "SendableSubscriberField": "_SubscriberKey"}


dataextension.columns = [
    {"Name" : "CustomerID", "FieldType" : "Number"},
    {"Name" : "Field1", "FieldType" : "Text", "MaxLength" : "100"},
]

results = dataextension.post()

The error I'm getting back is:

[(CreateResult){
   StatusCode = "Error"
   StatusMessage = "Exception occurred during [Create] ErrorID: 1667725857"
   OrdinalID = 0
   ErrorCode = 2
   NewID = 0
   Object = 
      (DataExtension){
         PartnerKey = None
         ObjectID = None
         Name = "MyDataExtension"
         Description = "My first data extension"
         IsSendable = True
         SendableDataExtensionField = 
            (DataExtensionField){
               PartnerKey = None
               ObjectID = None
            }
         SendableSubscriberField = ""
         Fields = 
            (Fields){
               Field[] = 
                  (DataExtensionField){
                     PartnerKey = None
                     ObjectID = None
                     Name = "CustomerID"
                     FieldType = "Number"
                  },
                  (DataExtensionField){
                     PartnerKey = None
                     ObjectID = None
                     Name = "Field1"
                     MaxLength = 100
                     FieldType = "Text"
                  },
            }
      }
 }]

I thought initially that my SendableSubscriberField value of "_SubscriberKey" was the problem, so I tried using different variations such as "SubscriberKey" and "Subscriber Key", but still to no avail.

What am I doing wrong here? If someone could kindly point me in the right direction, it would be greatly appreciated.

thanks, Mark

1

Instead of:

"SendableDataExtensionField": "CustomerID", "SendableSubscriberField": "_SubscriberKey"

Try:

"SendableDataExtensionField": {"Name": "CustomerID"}, "SendableSubscriberField": {"Name":"Subscriber Key"}
  • This worked for me; other answer produced the same error. Thanks. – Hut8 Jun 17 '16 at 20:45
1

Do you want to do email sends with this data extension or just store data?

If you just want to store data you should remove the "IsSendable", "SendableDataExtensionField" and "SendableSubscriberField" properties from the object.

If you want to use for sending and you are providing a data extension column (field) for matching up to the SubscriberKey then first you will need to sure you have Sendable Data Extensions and Subscriber Key enabled for your account. You can verify using the application UI or asking ExactTarget support. If your account is Subscriber Key based and you have Sendable Data Extensions turned on then you must do the following.

  1. Set the CustomerID column (field) to be text, make it required, make it a primary key, and set the maxlength to 200.

  2. Set the "SendableSubscriberField" to "Subscriber Key" and I would set the CustomerKey for the data extension even though it is not required. That way it can be friendly text instead of a GUID.

    dataextension.props = {"Name": "MyDataExtension", "Description": "My first data extension",  "IsSendable": True, "SendableDataExtensionField": "CustomerID", "SendableSubscriberField": "Subscriber Key"}`
    
    dataextension.columns = [
    {"Name" : "CustomerID", "FieldType" : "Text", "IsPrimaryKey" : "true", "MaxLength" : "200", "IsRequired" : "true"},
    {"Name" : "Field1", "FieldType" : "Text", "MaxLength" : "100"},
    ]
    
    results = dataextension.post()
    

If you try all this and still have issues contact support and ask them to review the logs for your acccount (MID) to see if there is anything in your app logs.

SOAP API Sendable Data Extension Page for non-SDK use (helpful to understand objects and properties)

Good luck,

Jason

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.