aio-crm-integration-processor
v2.10.2-alpha.1
Published
# Purpose The AIO crm integration processor stores a CRM Lead Payload object (Defined in the types folder) that is uploaded to an S3 bucket. Currently that S3 Bucket has a listener attached to it that Vin Integration listens to in order to respond to new
Downloads
3
Readme
aio-crm-integration-processor
Purpose
The AIO crm integration processor stores a CRM Lead Payload object (Defined in the types folder) that is uploaded to an S3 bucket. Currently that S3 Bucket has a listener attached to it that Vin Integration listens to in order to respond to new S3 bucket uploads which are then propagated into their system.
The conditions for this Lambda to upload to an S3 bucket are:
- The Message Type is in the White List
export const TYPE_WHITELIST = [
eventTypes.ACCEPTANCE_UPDATE,
eventTypes.FNI_FAILURE,
eventTypes.FNI_SUCCESS,
eventTypes.RESERVATION_UPDATE,
eventTypes.TEST_DRIVE_UPDATE,
eventTypes.OFFER // TODO: temporariy until client changes for secondary interactions go out
];
2.The Dealer has Vin Integration Enabled. This can be enabled in Admin Settings.
AIO Crm Integration Flow
Operational AIO pillar
Splunk Query
Basic Dev Query Basic QA Query Basic Prod Query
What you need before accessing operational items
- Access to splunk
- Access to AWS console in production for account
awsdrst
Please read this section to get familiar how we operate this service, if you have any questions please reach us out at #dr-team-rocket slack channel.
Always perform operations as code
Changes to AIO workloads (applications or infrastructure) are defined as code and updated it with code. We use AWS Cloudformation templates to define our infrastructure layers: networking, databases, aws resources and the interoperability between them.
Create documentation
We encourage changes in business logic or in infrastructure as code to have annotations that can be use as references for developers. In AIO we use automated tools to create documentation based on annotations, see docs-md
and docs-html
npm tasks in root the package.json.
Make frequent, small, reversible changes
Small changes can be reversed, please discuss with your team how to deliver in small incremental pieces changes for your working stories so impact can be either reversed or it can be identified and fixed as soon as it happens.
Anticipate failures with your code
Adding proper logging to your critical code operations (success and failures) is key to know the status of your changes, test your changes in local environments if possible or promote to a dev environment if you need to, create alarms based on failure for critical path your code need to follow and add alarms in lower environments, think about testing failure scenarios with your team, if you have any questions please reach us at #dr-team-rocket.
How to run locally:
- Get an env.json from one of Team Rocket's members
- Install AWS SAM: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html
- Setup Environment Variables
- Run
npm start
ornpm start-debug
Setting Environment Variables
Some environment variables are required for running this application locally which are typically provided by the template.yaml which will attempt to read from Parameter Store, but locally we won't have this so we can just set some Environment Variables
export AIO_CRM_S3_BUCKET=aio-integration-test
- Setting it to a bucket that we own so that it can actually write to the bucket would be best, but as far as I know we currently don't own a bucket for local testing purposes.
- You'll need the follow environment variables for AWS Auth created by
alks sessions open
- AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
Deploying the Application
- When a PR is merged into the Master branch, CodeBuild should kick off the
aio-crm-integration-processor
build which will kick off the associated CodePipelineaio-crm-integration-processor
which can be deployed to prod.
To deploy manually
Go to CodeBuild to pipeline aio-crm-integration-processor
and click the Start Build
button.
- Pipeline
aio-crm-integration-processor
will be kicked off - Manual approval will be needed to deploy the application further to QA and Production