0

I'm trying to create an Automation with the Node Fuel SDK.

I can create an empty one, but I can't seem to specify the <ActivityObject xsi:type="QueryDefinition"> part. I'm not sure how you specify the type.

Here's an example of my options obj.

let options = {
  CustomerKey: CustomerKey,
  CategoryID: folderName,
  Name: `Automation Name`,
  AutomationType: 'scheduled',
  AutomationTasks: {
    AutomationTask: [
      {
        Name: 'Task 1',
        Activities: {
          Activity: [{
            ObjectID: queryActivity.ObjectID,
            Name: `Name`,
            ActivityObject: {
              ObjectID: queryActivity.ObjectID,
              CustomerKey: queryActivity.CustomerKey,
              Name: 'My Activity Obj',
            }
          }],
        },
      },
    ],
  },
};

The example shows a Soap Envelope like this.

<Activity>
  <ObjectID>30db8c1a-7559-46ae-91d1-b5197db98207</ObjectID>
  <Name>Name</Name>
  <ActivityObject>
    <ObjectID>30db8c1a-7559-46ae-91d1-b5197db98207</ObjectID>
    <CustomerKey>423d9f53-e935-6881-f009-0015deb1a54a</CustomerKey>
    <Name>My Activity Obj</Name>
  </ActivityObject>
</Activity>

Mine is always missing the xsi:type="QueryDefinition on <ActivityObject xsi:type="QueryDefinition">.

Your Answer

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

Browse other questions tagged or ask your own question.