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

Add Connect as recommended product #142

Merged
merged 6 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion cypress/e2e/OutcomeFlow/outcome.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ describe('Outcome Page', () => {
cy.get('[value="exm"]').click();
cy.get('[value="forms"]').click();
cy.get('[value="customanalyticsdashboards"]').click();
cy.get('[value="externaldatasystems"]').click();
cy.get('[value="historicalpersonalization"]').click();
cy.get('[value="patterncards"]').click();
cy.get('[value="customrules"]').click();
Expand All @@ -61,4 +60,27 @@ describe('Outcome Page', () => {
cy.get('#required-products').children().should('contain', 'CDP');
cy.get('#required-products').children().should('contain', 'Send');
});

it('require connect', () => {
cy.visit('/');
cy.get('#start').click();
cy.get('[value="Developer"]').click();
cy.get(':nth-child(9) > .chakra-button').click();
cy.get('.chakra-container > :nth-child(3) > .chakra-button').click();
cy.get('[value="xm"]').click();
cy.get('[value="nosecuredpages"]').click();
cy.get('[value="search-no"]').click();
cy.get('[value="xp-connect-sfmc"]').click();
cy.get('.css-gmuwbf > .chakra-button').click();
cy.get('[value="scs"]').click();
cy.get('[value="vuejs"]').click();
cy.get('.css-gmuwbf > .chakra-button').click();
cy.get('[value="yesexperienceedge"]').click();
cy.wait(5000);
cy.get('.chakra-modal__close-btn').click();
cy.get('#required-products').should('exist').children().should('have.length', 2);
cy.get('#required-products').children().should('contain', 'XM Cloud');
cy.get('#required-products').children().should('contain', 'Connect');
cy.get('#shareButton').click();
});
});
6 changes: 6 additions & 0 deletions src/components/ui/HexagonCollection/HexagonCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export const HexagonCollection: FC<HexagonCollectionProps> = ({ classStyles }) =
: false
}
/>
<HexagonItem
product={TargetProduct.connect}
active={
requiredProducts != undefined && requiredProducts.find((x) => x == TargetProduct.connect) ? true : false
}
/>
<HexagonItem
product={TargetProduct.orderCloud}
active={
Expand Down
4 changes: 3 additions & 1 deletion src/lib/GameContextParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ export class GameContextParser {
dynamics365commerce: false,
dynamics365sales: false,
komfo: false,
sharepoint: false
sharepoint: false,
customDEF: false,
};
}
//If they didn't select None, read the rest of their selections
Expand All @@ -265,6 +266,7 @@ export class GameContextParser {
outcomeConditions.connectorsUsed.dynamics365sales = connectorsUsedOptions.value.includes('xp-connect-dynamics365sales');
outcomeConditions.connectorsUsed.komfo = connectorsUsedOptions.value.includes('xp-komfo');
outcomeConditions.connectorsUsed.sharepoint = connectorsUsedOptions.value.includes('xp-sharepoint');
outcomeConditions.connectorsUsed.customDEF = connectorsUsedOptions.value.includes('connect-custom-def');
}

}
Expand Down
26 changes: 25 additions & 1 deletion src/models/OutcomeConditions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export interface IConnectorsUsed {
dynamics365sales: boolean,
komfo: boolean,
sharepoint: boolean,
customDEF: boolean,
}

export enum ExperienceEdgeOption {
Expand Down Expand Up @@ -184,7 +185,8 @@ export class OutcomeConditions {
dynamics365commerce: false,
dynamics365sales: false,
komfo: false,
sharepoint: false
sharepoint: false,
customDEF: false
};

//If a gameInfoContext was provided, initialize all data from the answers in the context
Expand Down Expand Up @@ -252,6 +254,23 @@ export class OutcomeConditions {
);
}

/**
* Analyzes current answers to determine if the solution has some form of external system integration that could be moved to Connect.
* Any use of Data Exchange Framework or Sitecore external integration module also qualifies for migration
* Not required for some connectors which are included in other products (such as DAM integration)
*/
requiresConnect(): boolean {
return (
this.xpFeaturesUsed.externalDataSystems ||
this.connectorsUsed.customDEF ||
this.connectorsUsed.dynamics365commerce ||
this.connectorsUsed.dynamics365sales ||
this.connectorsUsed.komfo ||
this.connectorsUsed.sfcrm ||
this.connectorsUsed.sfmc
);
}

/**
* Returns a list of products that can be migrated to.
* NOTE: Several product options don't have Prompts yet that can help lead to a result, so are not included.
Expand Down Expand Up @@ -290,6 +309,11 @@ export class OutcomeConditions {
products.push(TargetProduct.orderCloud);
}

//If they are using some form of integration, we direct towards migrating to Sitecore Connect
if (this.requiresConnect()) {
products.push(TargetProduct.connect);
}

return products;
}
}
Loading