Update Pinpoint Journey to ACTIVE and set a timezone schedule

0

Hi,

We try to create a Journey in Pinpoint using the node sdk. When we set the state of the journey to "ACTIVE", we cannot set the timezone in the schedule of the Journey. We always get an error that the StratTime and EndTime of the schedule have no offset as the timezone.

We found no way to submit the StartTime and EndTime with offset as the only supported format (it seems) for them is the ISOString which has no timezone offset.

Is there any way that we can publish (activate) a Journey using the node sdk?!

  • Hello,

    For Pinpoint Journey, the 'Create Journey' api call event has 'Schedule' attribute which specifices the schedule settings for the journey. For this, we can set the EndTime, StartTime and Timezone. Please refer the below snippet of the event:

    Schedule — (map) The schedule settings for the journey.

    EndTime — (Date) The scheduled time, in ISO 8601 format, when the journey ended or will end.

    Example: If date is 12 September, 2023 1:15:02 PM UTC. This can be specified using the ISO 8601 format, such as 2023-09-12T13:15:02.001Z (2023-09-12T18:15:02+05:00).

    StartTime — (Date) The scheduled time, in ISO 8601 format, when the journey began or will begin.

    Example: If date is 12 September, 2023 1:35:02 PM UTC. This can be specified using the ISO 8601 format, such as 2023-09-12T13:35:02.001Z (2023-09-12T18:35:02+05:00).

    Timezone — (String) The starting UTC offset for the journey schedule, if the value of the journey's LocalTime property is true. Valid values are: UTC, UTC+01, UTC+02, UTC+03, UTC+03:30, UTC+04, UTC+04:30, UTC+05, UTC+05:30, UTC+05:45, UTC+06, UTC+06:30, UTC+07, UTC+08, UTC+08:45, UTC+09, UTC+09:30, UTC+10, UTC+10:30, UTC+11, UTC+12, UTC+12:45, UTC+13, UTC+13:45, UTC-02, UTC-02:30, UTC-03, UTC-03:30, UTC-04, UTC-05, UTC-06, UTC-07, UTC-08, UTC-09, UTC-09:30, UTC-10, and UTC-11.

    References: [+]https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Pinpoint.html [+]https://greenwichmeantime.com/articles/clocks/iso/

  • Hi - Thank you for the comment but this does not work and that is why I submit the question.

    This can be specified using the ISO 8601 format, such as 2023-09-12T13:15:02.001Z (2023-09-12T18:15:02+05:00).

    We can only set 2023-09-12T13:15:02.001Z but not this 2023-09-12T18:15:02+05:00 due to a bug maybe. Then, timezone has to be UTC.

    This only happens when state="ACTIVE" in API request

Bahaa
asked 8 months ago255 views
1 Answer
1

Hello,

Geovanni here from AWS Premium Support. As I understand, when attempting to create a journey, you are unable to set StartTime/Endtime with a respective timezone offset apart from Z, UTC.

I believe I was able to replicate your observance but I do wish for you to confirm this is what you are also seeing. When setting the schedule [1], the three required fields are EndTime, StartTime, and Timezone. The issue StartTime and Endtime are to be given in ISO 8601 format however anytime the field is set to anything apart from UTC the sdk returns an error similar to

Journey validation failed, Start time 2023-09-12T15:56:35Z doesn't have the same offset as the journey's schedule offset: UTC-05

What seems to be happening is that regardless of what UTC is mentioned in StartTime and Endtime, a bug introduces itself that automatically resets the time offset to UTC. As such, this would fail the validation step where it compares the above times and the value set for the field Timezone. This validation steps only occurs when journey state is set to Active Note: Again, please correct me if this is not what you are observing (if not, send a snippet of your code and error response).

As for the api failure itself, I did confirm that this is indeed a bug and have highlighted this to the responsible team. Unfortunately, as I am not within the development team, I cannot provide an ETA on when this issue will be resolved. Please subscribe to [2] for all the latest updates to the package. As for now, please convert all times to UTC.

   

Disclaimer


I am not familiar with using JavaScript so my replication was done with the latest version of Python Boto3 SDK - boto3-1.28.44 botocore-1.31.44.

References


[1] Journeys - JourneySchedule - https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-journeys.html#apps-application-id-journeys-model-journeyschedule [2] https://github.com/aws/aws-sdk-js/releases

AWS
SUPPORT ENGINEER
answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions