New Agent Smart Action Hooks

Feature(s) impacted

Smart Action Hooks

Observed behavior

We have been using the Sequelize package, and we are now migrating to the new Node agent. We are encountering issues with the hooks and their migration, as the documentation does not provide an in-depth outline of the process.

For example, we have a field that loads all of our partners from a model. The type is an Enum. In previous versions, we were able to use findAll to retrieve all partners and then map them to display in a certain way.

  const allPartnerCompanies = await models.partnersPartnercompany.findAll()
                    
                    allPartnerCompanies.map((singlePartnerCompany) => {
                        partnerCompanyOptions.push(`${singlePartnerCompany.name} ${singlePartnerCompany.partnerTypes} | ID: ${singlePartnerCompany.id}`)
                    })
                    
                    companyPartnerFieldName.enums = partnerCompanyOptions

                    return fields

In the new Node version, we are running into errors. It seems we can use “const allPartnerCompanies = context.collections.partnersPartnercompany.” in a simple way to retrieve the data, but nothing is coming back.

Do you have any suggestions?

Also additional documentation, especially expanded sections on Scopes and Context with examples for each, would also be greatly appreciated.

Expected behavior

For the smart action field to show the records in the dropdown

Failure Logs

Context

  • Project name:
  • Team name: …
  • Environment name: …
  • Agent (forest package) name & version: 1.34.1
  • Database type: Sequelize Data Source Package - postgres
  • Recent changes made on your end if any: …

Hello @Zero :wave:

Can you tell me what is your project name, team name and environment name please ? :pray: It will help me to investigate on your issue.

Kind regards,

Florian

Project ame: Ourboro
Team Name: Customer Experience
Environment: Rebirth

@Florian_Gonzales thank you for the help for this part it’s not deployed as it’s in my local, this might be more of a question on the proper way of doing this. As well not sure if there is a possibility for a call with one of your team members as I also had a few questions about the migration process and the proper way to go about it.

Hey @Zero :wave:

Very good idea to test our new agent :wink:

Could you please schedule a call with me to go further?

:point_right: https://meetings-eu1.hubspot.com/lionel-bouzonville

I’ll invite one of our engineers to discuss the best way to proceed.

1 Like