I am doing an AB Test and need to pass through the Delivery ID in order to then union the data back together and perform some analysis on the results (producing data extracts of recipient activities). However I can't seem to get a delivery ID to be passed through from the deliveries themselves. I've tried adding it as a variable but this doesn't appear to work.
What is passed through is the 'Foreign Key of the link 'Message' (field 'id') field. Whilst this serves almost the same function there are two issues with this field.
Any advice would be much appreciated. Thanks in advance.
I have a solution which is more of a hack, not elegant but should serve your purpose.
instance.vars.dynamicInternalName = "delivery1"
Inside Enrichment define variable to be added to output transition.
Right click on the delivery activity and click on Open option to view the Initialization Script section. Use the following code to dynamically change the delivery internal name
delivery.internalName = instance.vars.dynamicInternalName
Execute the workflow, delivery will be created with internal name of our choice. Also, the output transition will contain this internal name becuase of the hack done inside Enrichment.
Hope this helps.
This below statement passes through the Delivery ID (which will work for what I need)
However I would like to understand how to get the delivery internal name to be referenced. Do I need to define this as a different type of variable?
All the below return null values whilst the deliveryId works.
To clarify here are my steps.
Create workflow > properties > click 'keep the results of the interim populations between two executions'
Right click delivery > Open > Click script and enter 'instance.vars.deliveryIN = vars.deliveryinternalName'
Click 'generate an outbound transition'
Create an enrichment after the delivery
Create a new field DevID = $(instance/vars/@deliveryIN)
Right click the target data from the enrichment.
DevId is usually blank or has 'undefined'
Use 'delivery.id' or 'delivery.internalName' instead of $(instance/vars/@deliveryIN). It should work.
To clarify here are my steps.
I am not sure about message table not having delivery.
But, I can help with defining the variable in delivery and using it later in your workflow. To define a variable in delivery activity, Right click on delivery and click open. It will open a generic workflow activity form instead of delivery form. You can define variables in script tab of this form, it variables will be available in your workflow later on.
As per my understanding variables define in delivery variable tab are only available with in delivery.
I hope it helps.
Thanks for the reply.
I don't seem to be able to put together the correct syntax to find my variable. If I create the variable in the Delivery in the 'variable' tab how do I then call this in a later activity as nothing I'm doing seems to be working.
Thanks for the link on AB testing. AB testing is working perfectly, my only concern was that the winning delivery was not outputting the foreign key to the message table - unlike the normal deliveries.
Below might help
1. to retrieve internal name for any workflow activity you need to use activity.name,this might work for you
2. For AB testing, you can find more detail on below link. You can use delivery code for AB testing
Thanks for the response.
There are two steps here and hopefully solving the first will solve the second as well.