Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't upload to a secondary private Label only the primary #41

Open
leonardosalatino opened this issue Jun 27, 2022 · 2 comments
Open

Comments

@leonardosalatino
Copy link

Tried with several ways to upload an interaction to a seconday private Label, changed interaction name, extension name, privateLabelIds property, etc.

The interaction is always populated to the primary private label defined in the user defined in the environment json file.

The only way I was able to upload an interaction to the different private label was by changing the "Private Label:" on user profile. The deploy is not working for other private labels regardless these are correctly set on the "Additional Private Labels:" field on user profile.

@miola03
Copy link

miola03 commented Jun 27, 2022

@leonardosalatino - do you have the second private label set up within your environment.prod.json file? Each PL you want to deploy to should be set up as its own user within that config. Something like this:

{
  "users": [
    {
      "username": "user.name.pl1",
      "password": "password1",
      "privateLabelId": "1"
    },
    {
      "username": "user.name.pl2",
      "password": "password2",
      "privateLabelId": "2"
    }
  ]
}

These users need to be set up in BH ahead of deploying interactions through them which should be pretty straight forward as long as you have the admin rights to do so in the system

If the above is set up then each interaction you deploy should go to both PL's. If you want to restrict what PL the interaction deploys to you can configure your field interaction to utilize the privateLabelIds property:

const interaction: FieldInteraction = {
  fieldName: 'dateBegin',
  name: 'FI Name',
  enabled: true,
  event: 'init',
  sortOrder: 1,
  invokeOnInit: true,
  **privateLabelIds: [ '1', '2' ],**
}

That second to last line will restrict where the interaction gets deployed no matter how many users you have set up in your environment file.

If you have done all of the above maybe share a sample of the interaction you are trying to deploy along with your environment file set up and i can take a further look.

Hope this helps!

@leonardosalatino
Copy link
Author

@miola03 - thanks for the help!
Right, I tried the both of the above.

In issue #40 I uploaded a log file, in there you can see the two:

  • "Upoading for 38303"
  • "Upoading for 38305"

This means that the app is correctly reading the environment.json file and trying to upload to both private labels. But only the 1st deploy is correct; the 2nd deploy to the 2nd private label is failing because of duplicate interaction, this is because it is actually doing the deploy to the same 1st private label.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants