No forest, middleware or routes folders?

Hello @grantmac and welcome to our community!

I’m sorry to hear that you have troubles creating smart actions.

All new onboarding will generate an agent that changes the way customization are defined. They are to be declared directly on the agent object found in index.js.

createAgent({
  // These process.env variables should be provided in the onboarding
  authSecret: process.env.FOREST_AUTH_SECRET,
  envSecret: process.env.FOREST_ENV_SECRET,
  ...
})
  .addDataSource(createSqlDataSource(process.env.DATABASE_URL))
  .customizeCollection("customer", (customer) =>
    customer
      .addAction("Refund latest article", {
        execute: async (context, resultBuilder) => {
          return resultBuilder.success(
            `Well done ${context.caller.firstName}!`
          );
          // throw new Error();
          // return resultBuilder.error('this is an error');
        },
        scope: "Single",
      })
      .addAction("Smart Action 1", {
     ...

You could as well define everything in a new file and import your configuration if you wish to keep the index.js file short:

  .customizeCollection("customer", customerCustomization)

// in new file customer-customization.ts

export default (collection: Collection) =>
  collection.addAction("Smart Action 1", {
  ...
  })

I hope this helps.

Best regards,