Coveo Cloud V2 Migration Tools
Copy Sources, fields, mappings, schedules, conditions, query pipelines, custom dimensions from a CloudV1 to a CloudV2 organization After specifying the proper parameters the script will first get all sources from Cloud V1, and from Cloud V2.
Then for every source found in V1:
- In the output\ directory you will find:
- ORG_SOURCENAME.json (the json we got from Cloud V1)
- ORG_SOURCENAME_V2.json (the json we are pushing into Cloud V2)
- Check status of V1 source
- If Disabled: will be skipped
- If Edited (in the back-end): will be skipped
- Create a proper JSON for V2
- Create a new source in V2
- Check if there are custom fields defined for Salesforce, if so report them
- Check if there are custom script fields (with JScript) defined
- Output them to OUTPUT\ORG_SOURCE_Scriptname.js
- Translate them to python in OUTPUT\ORG_SOURCE_Scriptname.py (Remark: this is an attempt, never 100% accurate!!!)
- Get all custom fields from V1
- Apply them to V2
- Get all schedules from V1
- Apply them to V2 and put them on ‘Disabled’
When done:
- Get all user defined fields from V1
- Apply them to V2
- Get all mappings from V1
- Apply them to V2
- Get all condition statements from V1
- Apply them to V2
- Get all query pipelines from V1
- If the pipeline contains splittestnames, remove them
- Apply pipeline to V2
- Get all statements for the pipeline from V1
- Apply them to V2
- Get all Custom Dimensions (Analytics) from V1
- Apply them to V2
- Any exceptions/errors are logged into the OUTPUT\ORG_FinalReport.txt file
- An actionlist is created with actions to perform in OUTPUT\ORG_ActionList.txt file
pip install jiphy
pip install jsbeautifier
pip install requests
- Create a new V2 Org: EXACT NAME (See above: Organization Name), If the name is not the same, analytics of Cloud V1 cannot be used!!!!
- Execute the following script:
migrate_v1_to_v2.py --env {DEV,QA,PROD} --v1_org_id V1_ORG_ID --v1_access_token V1_ACCESS_TOKEN --v2_org_id V2_ORG_ID --v2_access_token V2_ACCESS_TOKEN
- REMARK: --env is lowercase!! (dev, qa, prod)
- Look into output\ORG_FinalReport.txt for errors
- Look into output\ORG_ActionList.txt for next steps
Example:
python migrate_v1_to_v2.py --env prod --v1_org_id xxinc --v1_access_token 86926e-acd-418-b44-15cc0396 --v2_org_id wims7j1ne --v2_access_token x8da3-aa1-5f7-2b-d969e113
Remark: Salesforce migrations must manually be fixed:
- Update your Salesforce Refresh Token
- Manually EVICT the source, see ActionList for the URL to execute
migrate_fields_config.py --env {DEV,QA,PROD} --v1_org_id V1_ORG_ID --v1_source_name V1_SOURCE_NAME --v1_access_token V1_ACCESS_TOKEN --v2_org_id V2_ORG_ID --v2_source_id V2_SOURCE_ID --v2_access_token V2_ACCESS_TOKEN [--delete_fields]
copy_user_fields.py --env {DEV,QA,PROD} --v1_org_id V1_ORG_ID --v1_access_token V1_ACCESS_TOKEN --v2_org_id V2_ORG_ID --v2_access_token V2_ACCESS_TOKEN [--dry-run]
V1.1 - 6 March 2019 Evict Salesforce sources, added to report. Must be done after creation. Will force the re-creation of the ObjectsToGet. V1.2 - 7 March 2019 Fixed parser Python, GetFieldValue