Gigya Job Openings

Mailchimp Dataflow - Inbound

Skip to end of metadata
Go to start of metadata

The dataflow that loads data from Mailchimp into Gigya involves field renaming to match Gigya's format, and using a JEXL expression in the field.evaluate step to transform the list subscription data to a format which can be interpreted by Gigya. In the inbound dataflow, only the subscription status of the user to a list is updated. The various dataflow steps are described in greater detail here: Component Repository

Following is a code sample of a full dataflow for passing data from Mailchimp to Gigya: 

 {
	"id" : "...",
	"name" : "mailchimp template",
	"description" : "mailchimp inbound",
	"steps" : [{
			"id" : "mailchimp",
			"type" : "datasource.read.mailchimp",
			"params" : {
				"apiUrl" : "https://<dc>.api.mailchimp.com/3.0/",  // Replace <dc> with the data center for your account, e.g., us6
				"apiKey" : "...",
				"listId" : "..." // the ID of the list for which the subscription status is updated
			},
			"next" : ["evaluate"]
		}, {
			"id" : "evaluate",
			"type" : "field.evaluate",
			"params" : {
				"fields" : [{
						"field" : "status",
						"expression" : "status eq 'subscribed' ? true : false"
					}
				],
				"language" : "jexl"
			},
			"next" : ["rename_UID"]
		}, {
			"id" : "rename_UID",
			"type" : "field.rename",
			"params" : {
				"fields" : [{
						"sourceField" : "merge_fields.UID",
						"targetField" : "UID"
					}
				]
			},
			"next" : ["select"]
		}, {
			"id" : "select",
			"type" : "field.select",
			"params" : {
				"fields" : ["UID", "status"]
			},
			"next" : ["rename_status"]
		}, {
			"id" : "rename_status",
			"type" : "field.rename",
			"params" : {
				"fields" : [{
						"sourceField" : "status",
						"targetField" : "data.subscribeToOurNewsletter"
					}
				]
			},
			"next" : ["gigya"]
		}, {
			"id" : "gigya",
			"type" : "datasource.write.gigya.account"
		}
	]
}


  • No labels